Clean up HAL ADC, old test scripts

This commit is contained in:
Scott Lahteine
2020-01-17 02:39:22 -06:00
parent 0d0dfba203
commit a578749622
24 changed files with 30 additions and 139 deletions

View File

@ -426,7 +426,7 @@ void HAL_adc_init() {
memset(HAL_adc_results, 0xFF, sizeof(HAL_adc_results)); // Fill result with invalid values
for (uint8_t pi = 0; pi < COUNT(adc_pins); ++pi)
pinPeripheral(adc_pins[pi], PIO_ANALOG);
pinPeripheral(adc_pins[pi], PIO_ANALOG);
for (uint8_t ai = FIRST_ADC; ai <= LAST_ADC; ++ai) {
Adc* adc = ((Adc*[])ADC_INSTS)[ai];
@ -471,8 +471,4 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) {
HAL_adc_result = 0xFFFF;
}
uint16_t HAL_adc_get_result() {
return HAL_adc_result;
}
#endif // __SAMD51__

View File

@ -135,7 +135,7 @@ void HAL_adc_init();
#define HAL_ADC_READY() true
void HAL_adc_start_conversion(const uint8_t adc_pin);
uint16_t HAL_adc_get_result();
inline uint16_t HAL_adc_get_result() { return HAL_adc_result; }
//
// Pin Map