STC15W408AS library
0.9.0
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
#include <
sys.h
>
14
20
#define CHIP_ID_SIZE 7
21
27
#define CHIP_ID_ADDR_ROM 0x1ff9
28
36
__code
__at
(
CHIP_ID_ADDR_ROM
) uint8_t chip_id;
37
46
#define get_chipid(cid) { \
47
const uint8_t *id = &chip_id; \
48
for(uint8_t i = 0; i < CHIP_ID_SIZE; i++) \
49
{ \
50
cid[i] = id[i]; \
51
} \
52
}
53
54
#endif
CHIP_ID_ADDR_ROM
#define CHIP_ID_ADDR_ROM
Chip id address in flash memory.
Definition:
chip_id.h:27
__at
__code __at(CHIP_ID_ADDR_ROM) uint8_t chip_id
First byte of chip id in flash.
sys.h
Generated by
1.9.4