|
|
|
@ -89,14 +89,6 @@ typedef int8_t pin_t;
|
|
|
|
|
#undef pgm_read_word
|
|
|
|
|
#define pgm_read_word(addr) (*((uint16_t*)(addr)))
|
|
|
|
|
|
|
|
|
|
#define RST_POWER_ON 1
|
|
|
|
|
#define RST_EXTERNAL 2
|
|
|
|
|
#define RST_BROWN_OUT 4
|
|
|
|
|
#define RST_WATCHDOG 8
|
|
|
|
|
#define RST_JTAG 16
|
|
|
|
|
#define RST_SOFTWARE 32
|
|
|
|
|
#define RST_BACKUP 64
|
|
|
|
|
|
|
|
|
|
// Clear the reset reason
|
|
|
|
|
void HAL_clear_reset_source(void);
|
|
|
|
|
|
|
|
|
@ -128,25 +120,11 @@ void HAL_adc_init();
|
|
|
|
|
#define HAL_READ_ADC() HAL_adc_get_result()
|
|
|
|
|
#define HAL_ADC_READY() true
|
|
|
|
|
|
|
|
|
|
#define HAL_ANALOG_SELECT(pin) NOOP;
|
|
|
|
|
#define HAL_ANALOG_SELECT(pin)
|
|
|
|
|
|
|
|
|
|
void HAL_adc_start_conversion(const uint8_t adc_pin);
|
|
|
|
|
|
|
|
|
|
uint16_t HAL_adc_get_result(void);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
uint16_t HAL_getAdcReading(uint8_t chan);
|
|
|
|
|
|
|
|
|
|
void HAL_startAdcConversion(uint8_t chan);
|
|
|
|
|
uint8_t HAL_pinToAdcChannel(int pin);
|
|
|
|
|
|
|
|
|
|
uint16_t HAL_getAdcFreerun(uint8_t chan, bool wait_for_conversion = false);
|
|
|
|
|
//uint16_t HAL_getAdcSuperSample(uint8_t chan);
|
|
|
|
|
|
|
|
|
|
void HAL_enable_AdcFreerun(void);
|
|
|
|
|
//void HAL_disable_AdcFreerun(uint8_t chan);
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#define GET_PIN_MAP_PIN(index) index
|
|
|
|
|
#define GET_PIN_MAP_INDEX(pin) pin
|
|
|
|
|
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
|
|
|
|
|