-
Notifications
You must be signed in to change notification settings - Fork 21
/
devices.h
38 lines (30 loc) · 902 Bytes
/
devices.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef DEVICES_H
#define DEVICES_H
#include <stdint.h>
#define DEVICES_NAME_LEN (16)
#define DEVICE_UNKNOWN_ID (-1)
#define DEVICE_LOCKBIT_ADDR (0x0A)
typedef struct
{
char name[DEVICES_NAME_LEN];
uint16_t flash_start;
uint16_t flash_size;
uint16_t flash_pagesize;
uint16_t syscfg_address;
uint16_t nvmctrl_address;
uint16_t sigrow_address;
uint16_t fuses_address;
uint16_t userrow_address;
uint8_t number_of_fuses;
} tDevice;
extern tDevice DEVICES_List[];
int8_t DEVICES_GetId(char *name);
uint16_t DEVICES_GetFlashLength(void);
uint16_t DEVICES_GetFlashStart(void);
uint16_t DEVICES_GetPageSize(void);
uint16_t DEVICES_GetNvmctrlAddress(void);
uint16_t DEVICES_GetFusesAddress(void);
uint8_t DEVICES_GetFusesNumber(void);
uint8_t DEVICES_GetNumber(void);
char *DEVICES_GetNameByNumber(uint8_t number);
#endif // DEVICES_H