analogIn with DMA
Diff: AnaloginDMA.h
- Revision:
- 4:2844a210bd46
- Parent:
- 2:08779d8f1873
--- a/AnaloginDMA.h Sat Jan 03 14:28:35 2015 +0000 +++ b/AnaloginDMA.h Sat Jan 03 15:41:29 2015 +0000 @@ -58,13 +58,12 @@ } - /** Read the input voltage, represented as an unsigned short in the range [0x0, 0xFFFF] + /** Read the 'Length' input voltage(s), represented as an array of unsigned short pData * - * @returns - * 16-bit unsigned short representing the current input voltage, normalised to a 16-bit value + * @returns status: 0 = OK, 1 = ERROR, 2=BUSY, 3 = TIMEOUT */ - void read(uint16_t* pData, uint32_t Length) { - analoginDMA_read_u16(&_adc, pData, Length); + HAL_StatusTypeDef read(uint16_t* pData, uint32_t Length) { + return analoginDMA_read_u16(&_adc, pData, Length); }