Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
targets/hal/TARGET_WIZNET/TARGET_W7500x/W7500x_Peripheral_Library/W7500x_adc.h@0:9b334a45a8ff, 2015-10-01 (annotated)
- Committer:
- bogdanm
- Date:
- Thu Oct 01 15:25:22 2015 +0300
- Revision:
- 0:9b334a45a8ff
- Child:
- 144:ef7eb2e8f9f7
Initial commit on mbed-dev
Replaces mbed-src (now inactive)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 0:9b334a45a8ff | 1 | /** |
bogdanm | 0:9b334a45a8ff | 2 | ****************************************************************************** |
bogdanm | 0:9b334a45a8ff | 3 | * @file |
bogdanm | 0:9b334a45a8ff | 4 | * @author |
bogdanm | 0:9b334a45a8ff | 5 | * @version |
bogdanm | 0:9b334a45a8ff | 6 | * @date |
bogdanm | 0:9b334a45a8ff | 7 | * @brief This file contains all the functions prototypes for the ADC |
bogdanm | 0:9b334a45a8ff | 8 | * firmware library. |
bogdanm | 0:9b334a45a8ff | 9 | ****************************************************************************** |
bogdanm | 0:9b334a45a8ff | 10 | * |
bogdanm | 0:9b334a45a8ff | 11 | ****************************************************************************** |
bogdanm | 0:9b334a45a8ff | 12 | */ |
bogdanm | 0:9b334a45a8ff | 13 | |
bogdanm | 0:9b334a45a8ff | 14 | /* Define to prevent recursive inclusion -------------------------------------*/ |
bogdanm | 0:9b334a45a8ff | 15 | #ifndef __W7500X_ADC_H |
bogdanm | 0:9b334a45a8ff | 16 | #define __W7500X_ADC_H |
bogdanm | 0:9b334a45a8ff | 17 | |
bogdanm | 0:9b334a45a8ff | 18 | #ifdef __cplusplus |
bogdanm | 0:9b334a45a8ff | 19 | extern "C" { |
bogdanm | 0:9b334a45a8ff | 20 | #endif |
bogdanm | 0:9b334a45a8ff | 21 | |
bogdanm | 0:9b334a45a8ff | 22 | /* Includes ------------------------------------------------------------------*/ |
bogdanm | 0:9b334a45a8ff | 23 | #include "W7500x.h" |
bogdanm | 0:9b334a45a8ff | 24 | |
bogdanm | 0:9b334a45a8ff | 25 | typedef enum { ADC_CH0 = 0, |
bogdanm | 0:9b334a45a8ff | 26 | ADC_CH1 = 1, |
bogdanm | 0:9b334a45a8ff | 27 | ADC_CH2 = 2, |
bogdanm | 0:9b334a45a8ff | 28 | ADC_CH3 = 3, |
bogdanm | 0:9b334a45a8ff | 29 | ADC_CH4 = 4, |
bogdanm | 0:9b334a45a8ff | 30 | ADC_CH5 = 5, |
bogdanm | 0:9b334a45a8ff | 31 | ADC_CH6 = 6, |
bogdanm | 0:9b334a45a8ff | 32 | ADC_CH7 = 7, |
bogdanm | 0:9b334a45a8ff | 33 | ADC_CH15 = 15} ADC_CH; |
bogdanm | 0:9b334a45a8ff | 34 | |
bogdanm | 0:9b334a45a8ff | 35 | #define IS_ADC_CH_NUM(NUM) (((NUM) == ADC_CH0) || \ |
bogdanm | 0:9b334a45a8ff | 36 | ((NUM) == ADC_CH1) || \ |
bogdanm | 0:9b334a45a8ff | 37 | ((NUM) == ADC_CH2) || \ |
bogdanm | 0:9b334a45a8ff | 38 | ((NUM) == ADC_CH3) || \ |
bogdanm | 0:9b334a45a8ff | 39 | ((NUM) == ADC_CH4) || \ |
bogdanm | 0:9b334a45a8ff | 40 | ((NUM) == ADC_CH5) || \ |
bogdanm | 0:9b334a45a8ff | 41 | ((NUM) == ADC_CH6) || \ |
bogdanm | 0:9b334a45a8ff | 42 | ((NUM) == ADC_CH7) || \ |
bogdanm | 0:9b334a45a8ff | 43 | ((NUM) == ADC_CH15)) |
bogdanm | 0:9b334a45a8ff | 44 | |
bogdanm | 0:9b334a45a8ff | 45 | void ADC_Init(void); |
bogdanm | 0:9b334a45a8ff | 46 | void ADC_DeInit(void); |
bogdanm | 0:9b334a45a8ff | 47 | void ADC_PowerDownEnable (FunctionalState NewState); |
bogdanm | 0:9b334a45a8ff | 48 | void ADC_ChannelSelect (ADC_CH num); |
bogdanm | 0:9b334a45a8ff | 49 | void ADC_Start (void); |
bogdanm | 0:9b334a45a8ff | 50 | uint16_t ADC_ReadData (void); |
bogdanm | 0:9b334a45a8ff | 51 | void ADC_InterruptMask (FunctionalState NewState); |
bogdanm | 0:9b334a45a8ff | 52 | uint8_t ADC_IsInterrupt (void); |
bogdanm | 0:9b334a45a8ff | 53 | void ADC_InterruptClear (void); |
bogdanm | 0:9b334a45a8ff | 54 | |
bogdanm | 0:9b334a45a8ff | 55 | #ifdef __cplusplus |
bogdanm | 0:9b334a45a8ff | 56 | } |
bogdanm | 0:9b334a45a8ff | 57 | #endif |
bogdanm | 0:9b334a45a8ff | 58 | |
bogdanm | 0:9b334a45a8ff | 59 | #endif //__W7500X_ADC_H |