Описание библиотеки микросхемы 5023ВС016 процессора "Спутник"
types.h
См. документацию.
1 
29 #ifndef TYPES_H_
30 #define TYPES_H_
31 
32 #include <stdint.h>
33 #include <stdbool.h>
34 
35 
36 
37 #define __RO volatile const
38 #define __WO volatile
39 #define __RW volatile
44 #if !defined(MAX)
45 #define MAX(a, b) (((a) > (b)) ? (a) : (b))
46 #endif
47 #if !defined(MIN)
48 #define MIN(a, b) (((a) < (b)) ? (a) : (b))
49 #endif
50 
51 
52 #define PORT_A 0
53 #define PORT_B 1
54 #define PORT_C 2
55 #define PORT_D 3
56 #define PORT_E 4
57 #define PORT_F 5
58 #define PORT_G 6
59 #define PORT_H 7
60 
61 
64 typedef enum {RESET = 0, SET = 1} FlagStatus, IntStatus, SetState;
65 #define PARAM_SETSTATE(State) ((State == RESET) || (State == SET))
66 
70 typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
71 #define PARAM_FUNCTIONALSTATE(State) ((State == DISABLE) || (State == ENABLE))
72 
76 typedef enum {ERROR = 0, SUCCESS = !ERROR} Status;
77 
78 #endif
Definition: types.h:76
Definition: types.h:70
enum FlagStatus IntStatus
FunctionalState
Тип для функционального состояния
Definition: types.h:70
Definition: types.h:76
enum FlagStatus SetState
Definition: types.h:70
FlagStatus
Тип для состояний флагов
Definition: types.h:64
Definition: types.h:64
Status
Тип для статуса операции
Definition: types.h:76
Definition: types.h:64