Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: OTP.h
- Revision:
- 2:af09cade52df
- Child:
- 4:1f708415c442
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/OTP.h Tue May 13 10:38:10 2014 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+
+class OTP
+{
+ public:
+ OTP(PinName PDIO_pin, PinName CLK_pin, PinName CSn_pin, Serial &pc);
+ void setup();
+ void exit();
+ void read();
+ void write();
+ void prog();
+ void set_id(uint8_t id);
+
+ uint32_t factory_section;
+ uint32_t I2C_A; //I2C address <5:1>
+ uint32_t CCW; //change increasing/decreasing code with encoder movement
+ uint32_t Z; //zero position
+ uint32_t output_md1, output_md0;
+ uint32_t pwmDIS;
+ uint32_t MagCompEN;
+ uint32_t PWMhalfEN_IndexWidth;
+
+ private:
+ DigitalInOut PDIO, CLK;
+ DigitalOut CSn;
+ Serial pc;
+ void read_bits(uint32_t *dest, int bit_length);
+ uint8_t ID_to_I2C_A(uint8_t id);
+};
\ No newline at end of file