SAADC library and drivers for nrf52832.
Dependents: acd52832_SAADC_Differential_input_EPD acd52832_Car_battery_ch acd52832_Car_battery_ch_2
Library to use aconno drivers for Nordic Semiconductor nrf52832 SAADC.
acd_nrf52_saadc.h
- Committer:
- Dautor
- Date:
- 2017-08-23
- Revision:
- 3:fcada8b3b567
- Parent:
- 1:2d6e904c6843
- Child:
- 5:f797719350a6
File content as of revision 3:fcada8b3b567:
/* * Made by Jurica Resetar and Karlo Milicevic @ aconno, 2017 * jurica_resetar@yahoo.com * aconno.de * All rights reserved * */ #ifndef ACD_NRF52_SAADC_H #define ACD_NRF52_SAADC_H #include "mbed.h" /** NRF52 adc library */ class NRF52_SAADC{ public: /** Initializes adc module */ NRF52_SAADC(); ~NRF52_SAADC(); /** @returns * 0 on success, 1 otherwise */ bool addChannel(uint8_t pin); void calibrate(); void updateData(); int16_t *getData() { return data; } private: int16_t data[sizeof(int16_t)*8]; // 8 channels }; #endif // ACD_NRF52_SAADC_H