The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
Anna Bridge
Date:
Fri Jun 22 15:38:59 2018 +0100
Revision:
169:a7c7b631e539
Parent:
109:9296ab0bfc11
mbed library. Release version 162

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 109:9296ab0bfc11 1 /**
Kojto 109:9296ab0bfc11 2 ******************************************************************************
Kojto 109:9296ab0bfc11 3 * @file
Kojto 109:9296ab0bfc11 4 * @author
Kojto 109:9296ab0bfc11 5 * @version
Kojto 109:9296ab0bfc11 6 * @date
Kojto 109:9296ab0bfc11 7 * @brief This file contains all the functions prototypes for the ADC
Kojto 109:9296ab0bfc11 8 * firmware library.
Kojto 109:9296ab0bfc11 9 ******************************************************************************
Kojto 109:9296ab0bfc11 10 *
Kojto 109:9296ab0bfc11 11 ******************************************************************************
Kojto 109:9296ab0bfc11 12 */
Kojto 109:9296ab0bfc11 13
Kojto 109:9296ab0bfc11 14 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 109:9296ab0bfc11 15 #ifndef __W7500X_ADC_H
Kojto 109:9296ab0bfc11 16 #define __W7500X_ADC_H
Kojto 109:9296ab0bfc11 17
Kojto 109:9296ab0bfc11 18 #ifdef __cplusplus
Kojto 109:9296ab0bfc11 19 extern "C" {
Kojto 109:9296ab0bfc11 20 #endif
Kojto 109:9296ab0bfc11 21
Kojto 109:9296ab0bfc11 22 /* Includes ------------------------------------------------------------------*/
Kojto 109:9296ab0bfc11 23 #include "W7500x.h"
Kojto 109:9296ab0bfc11 24
Kojto 109:9296ab0bfc11 25 typedef enum { ADC_CH0 = 0,
Kojto 109:9296ab0bfc11 26 ADC_CH1 = 1,
Kojto 109:9296ab0bfc11 27 ADC_CH2 = 2,
Kojto 109:9296ab0bfc11 28 ADC_CH3 = 3,
Kojto 109:9296ab0bfc11 29 ADC_CH4 = 4,
Kojto 109:9296ab0bfc11 30 ADC_CH5 = 5,
Kojto 109:9296ab0bfc11 31 ADC_CH6 = 6,
Kojto 109:9296ab0bfc11 32 ADC_CH7 = 7,
Kojto 109:9296ab0bfc11 33 ADC_CH15 = 15} ADC_CH;
Kojto 109:9296ab0bfc11 34
Kojto 109:9296ab0bfc11 35 #define IS_ADC_CH_NUM(NUM) (((NUM) == ADC_CH0) || \
Kojto 109:9296ab0bfc11 36 ((NUM) == ADC_CH1) || \
Kojto 109:9296ab0bfc11 37 ((NUM) == ADC_CH2) || \
Kojto 109:9296ab0bfc11 38 ((NUM) == ADC_CH3) || \
Kojto 109:9296ab0bfc11 39 ((NUM) == ADC_CH4) || \
Kojto 109:9296ab0bfc11 40 ((NUM) == ADC_CH5) || \
Kojto 109:9296ab0bfc11 41 ((NUM) == ADC_CH6) || \
Kojto 109:9296ab0bfc11 42 ((NUM) == ADC_CH7) || \
Kojto 109:9296ab0bfc11 43 ((NUM) == ADC_CH15))
Kojto 109:9296ab0bfc11 44
Kojto 109:9296ab0bfc11 45 void ADC_Init(void);
Kojto 109:9296ab0bfc11 46 void ADC_DeInit(void);
Kojto 109:9296ab0bfc11 47 void ADC_PowerDownEnable (FunctionalState NewState);
Kojto 109:9296ab0bfc11 48 void ADC_ChannelSelect (ADC_CH num);
Kojto 109:9296ab0bfc11 49 void ADC_Start (void);
Kojto 109:9296ab0bfc11 50 uint16_t ADC_ReadData (void);
Kojto 109:9296ab0bfc11 51 void ADC_InterruptMask (FunctionalState NewState);
Kojto 109:9296ab0bfc11 52 uint8_t ADC_IsInterrupt (void);
Kojto 109:9296ab0bfc11 53 void ADC_InterruptClear (void);
Kojto 109:9296ab0bfc11 54
Kojto 109:9296ab0bfc11 55 #ifdef __cplusplus
Kojto 109:9296ab0bfc11 56 }
Kojto 109:9296ab0bfc11 57 #endif
Kojto 109:9296ab0bfc11 58
Kojto 109:9296ab0bfc11 59 #endif //__W7500X_ADC_H