-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSfr_types.h
43 lines (33 loc) · 1.15 KB
/
Sfr_types.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
39
40
41
42
43
#ifndef SFR_TYPES_H
#define SFR_TYPES_H
/** Standard libs **/
#include <stdint.h>
#include <stdbool.h>
/******************************************************************************/
/*---------------------------------Macros-------------------------------------*/
/******************************************************************************/
/* NOTE: These aren't used for SFR types but are used everywhere else, where SFR
* types are used as well
*/
#ifndef INLINE
#define INLINE inline __attribute__ ((always_inline))
#endif
#ifndef bool
#define bool bool
#endif
/******************************************************************************/
/*-----------------------------Data Structures--------------------------------*/
/******************************************************************************/
/** Used on protected regions of memory **/
typedef const uint32_t Rsrvd_t;
/** Basic SFR type with atomic access **/
typedef struct {
uint32_t W;
uint32_t CLR;
uint32_t SET;
uint32_t INV;
} Sfr_t;
typedef struct {
uint32_t W;
} Word_t;
#endif /* SFR_TYPES_H */