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.
ana.h
00001 #include "mbed.h" 00002 00003 00004 00005 //--------------------------------------- 00006 // Definitions 00007 //--------------------------------------- 00008 #define ANA_SW_TIMER_PERIOD 10000 // [us] Period time of call 00009 #define ANA_LP_FILTER_SHIFT_ANA1 3 00010 #define ANA_LP_FILTER_SHIFT_ANA2 3 00011 #define ANA_LP_FILTER_SHIFT_ANA3 3 00012 00013 00014 //--------------------------------------- 00015 // Enums 00016 //--------------------------------------- 00017 00018 typedef enum 00019 { 00020 ANA_CH1, 00021 ANA_CH2, 00022 ANA_CH3, 00023 //----------------- 00024 CNT_eANA_Channels 00025 }eANA_Channels; 00026 00027 00028 //--------------------------------------- 00029 // Structures 00030 //--------------------------------------- 00031 00032 00033 00034 //--------------------------------------- 00035 // Global Variables 00036 //--------------------------------------- 00037 00038 00039 00040 //--------------------------------------- 00041 // Global Functions 00042 //--------------------------------------- 00043 void ANA_init( void ); 00044 unsigned short ANA_getRaw(int channel); 00045 unsigned short ANA_getFiltered( int channel ); 00046 float ANA_scale(float offset, float gain, unsigned short input);
Generated on Sat Jul 16 2022 03:23:51 by
