Combine channel-based SPI headers

This commit is contained in:
Scott Lahteine
2019-09-04 23:23:31 -05:00
parent 70b3f4ded5
commit 8d036e94bf
9 changed files with 31 additions and 90 deletions

View File

@@ -86,14 +86,6 @@ inline void HAL_init(void) { }
int freeMemory(void);
#pragma GCC diagnostic pop
// SPI: Extended functions which take a channel number (hardware SPI only)
/** Write single byte to specified SPI channel */
void spiSend(uint32_t chan, byte b);
/** Write buffer to specified SPI channel */
void spiSend(uint32_t chan, const uint8_t* buf, size_t n);
/** Read single byte from specified SPI channel */
uint8_t spiRec(uint32_t chan);
// ADC
#define HAL_ANALOG_SELECT(pin) HAL_adc_enable_channel(pin)
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)