STC15W408AS library
0.18.0
Loading...
Searching...
No Matches
include
chip_id.h
Go to the documentation of this file.
1
#ifndef STC15_CHIPIDH
2
#define STC15_CHIPIDH
3
12
#include <stdint.h>
13
19
#define CHIP_ID_SIZE 7
20
26
#define CHIP_ID_ADDR_ROM 0x1ff9
27
35
__code
__at
(
CHIP_ID_ADDR_ROM
)
const
uint8_t CHIP_ID;
36
45
#define get_chip_id(cid) do { \
46
const uint8_t *id = &CHIP_ID; \
47
for(uint8_t i = 0; i < CHIP_ID_SIZE; i++) \
48
{ \
49
cid[i] = id[i]; \
50
} \
51
} while(0)
52
53
54
#endif
__at
__code __at(CHIP_ID_ADDR_ROM) const uint8_t CHIP_ID
First byte of chip id in flash.
CHIP_ID_ADDR_ROM
#define CHIP_ID_ADDR_ROM
Chip id address in flash memory.
Definition
chip_id.h:26
Generated by
1.9.8