Library Functions.
More...
Library Functions.
| #define TM_OTP_BlockLocked |
( |
|
block | ) |
((*(__IO uint8_t *) (OTP_LOCK_ADDR + block)) == 0x00 ? 1 : 0) |
Checks if block is locked or not.
- Parameters
-
| block | OTP block number, 0 to 15 is allowed |
- Return values
-
| Block | lock status
- 0: Block is not locked
- > 0: Block locked
|
Locks entire block to prevent future programming inside.
- Note
- When you lock your block, then you are not able to program it anymore. Even, if it is totally empty. You can't unlock it back!
- Parameters
-
| block | OTP block number, 0 to 15 is allowed |
- Return values
-
| uint8_t TM_OTP_Read |
( |
uint8_t |
block, |
|
|
uint8_t |
byte |
|
) |
| |
Reads data from specific block and specific byte in this block.
- Note
- You can read data unlimited times from locations
- Parameters
-
| block | OTP block number, 0 to 15 is allowed |
| byte | OTP byte inside one block, 0 to 31 is allowed |
- Return values
-
| Value | at specific block and byte location, or 0 if location is invalid |
Writes one-time data to specific block and specific byte in this block.
- Note
- You can only ONCE write data at desired byte in specific block, if you will try to do it more times, you can have broken data at this location.
- Parameters
-
| block | OTP block number, 0 to 15 is allowed |
| byte | OTP byte inside one block, 0 to 31 is allowed |
| data | Data to be written to OTP memory |
- Return values
-