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.
OTP.h@2:af09cade52df, 2014-05-13 (annotated)
- Committer:
- piyamate
- Date:
- Tue May 13 10:38:10 2014 +0000
- Revision:
- 2:af09cade52df
- Child:
- 4:1f708415c442
OTP class
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| piyamate | 2:af09cade52df | 1 | #include "mbed.h" |
| piyamate | 2:af09cade52df | 2 | |
| piyamate | 2:af09cade52df | 3 | class OTP |
| piyamate | 2:af09cade52df | 4 | { |
| piyamate | 2:af09cade52df | 5 | public: |
| piyamate | 2:af09cade52df | 6 | OTP(PinName PDIO_pin, PinName CLK_pin, PinName CSn_pin, Serial &pc); |
| piyamate | 2:af09cade52df | 7 | void setup(); |
| piyamate | 2:af09cade52df | 8 | void exit(); |
| piyamate | 2:af09cade52df | 9 | void read(); |
| piyamate | 2:af09cade52df | 10 | void write(); |
| piyamate | 2:af09cade52df | 11 | void prog(); |
| piyamate | 2:af09cade52df | 12 | void set_id(uint8_t id); |
| piyamate | 2:af09cade52df | 13 | |
| piyamate | 2:af09cade52df | 14 | uint32_t factory_section; |
| piyamate | 2:af09cade52df | 15 | uint32_t I2C_A; //I2C address <5:1> |
| piyamate | 2:af09cade52df | 16 | uint32_t CCW; //change increasing/decreasing code with encoder movement |
| piyamate | 2:af09cade52df | 17 | uint32_t Z; //zero position |
| piyamate | 2:af09cade52df | 18 | uint32_t output_md1, output_md0; |
| piyamate | 2:af09cade52df | 19 | uint32_t pwmDIS; |
| piyamate | 2:af09cade52df | 20 | uint32_t MagCompEN; |
| piyamate | 2:af09cade52df | 21 | uint32_t PWMhalfEN_IndexWidth; |
| piyamate | 2:af09cade52df | 22 | |
| piyamate | 2:af09cade52df | 23 | private: |
| piyamate | 2:af09cade52df | 24 | DigitalInOut PDIO, CLK; |
| piyamate | 2:af09cade52df | 25 | DigitalOut CSn; |
| piyamate | 2:af09cade52df | 26 | Serial pc; |
| piyamate | 2:af09cade52df | 27 | void read_bits(uint32_t *dest, int bit_length); |
| piyamate | 2:af09cade52df | 28 | uint8_t ID_to_I2C_A(uint8_t id); |
| piyamate | 2:af09cade52df | 29 | }; |