Revision 312
analog works on updating. Need to do code cleanup. Tested everything except analog8 and analog10.
analog.h | ||
---|---|---|
70 | 70 |
/** @brief Analog port 9 **/ |
71 | 71 |
#define AN9 0x09 |
72 | 72 |
/** @brief Analog port 10 **/ |
73 |
#define AN10 0x0a
|
|
73 |
#define AN10 0x0A
|
|
74 | 74 |
/** @brief Analog port 11 **/ |
75 |
#define AN11 0x0b
|
|
75 |
#define AN11 0x0B
|
|
76 | 76 |
/** @brief Analog port 12 **/ |
77 |
#define AN12 0x0c
|
|
77 |
#define AN12 0x0C
|
|
78 | 78 |
/** @brief Analog port 13 **/ |
79 |
#define AN13 0x0d
|
|
79 |
#define AN13 0x0D
|
|
80 | 80 |
/** @brief Analog port 14 **/ |
81 |
#define AN14 0x0e
|
|
81 |
#define AN14 0x0E
|
|
82 | 82 |
/** @brief Analog port 15 **/ |
83 |
#define AN15 0x0f
|
|
83 |
#define AN15 0x0F
|
|
84 | 84 |
|
85 | 85 |
/** @brief BOM_PORT analog port for BOM **/ |
86 | 86 |
#define BOM_PORT AN0 |
... | ... | |
94 | 94 |
#define ADC_START 1 |
95 | 95 |
#define ADC_STOP 0 |
96 | 96 |
|
97 |
#define ADMUX_OPT 0x60 |
|
97 | 98 |
|
98 |
typedef union adc_t{
|
|
99 |
typedef struct {
|
|
99 | 100 |
uint8_t adc8; |
100 | 101 |
uint16_t adc10; |
101 | 102 |
} adc_t; |
102 | 103 |
|
103 |
extern adc_t an_val[9];
|
|
104 |
//extern adc_t an_val[10];
|
|
104 | 105 |
|
105 | 106 |
/** @brief Initialize analog ports. **/ |
106 | 107 |
void analog_init(int start_conversion); |
Also available in: Unified diff