STM32 EEPROM Testing

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "cal.h"
00003 
00004 
00005 /*------------------------------------------------------------------------------
00006 Before to use this example, ensure that you an hyperterminal installed on your
00007 computer. More info here: https://developer.mbed.org/handbook/Terminals
00008 
00009 The default serial comm port uses the SERIAL_TX and SERIAL_RX pins (see their
00010 definition in the PinNames.h file).
00011 
00012 The default serial configuration in this case is 9600 bauds, 8-bit data, no parity
00013 
00014 If you want to change the baudrate for example, you have to redeclare the
00015 serial object in your code:
00016 
00017 Serial pc(SERIAL_TX, SERIAL_RX);
00018 
00019 Then, you can modify the baudrate and print like this:
00020 
00021 pc.baud(115200);
00022 pc.printf("Hello World !\n");
00023 ------------------------------------------------------------------------------*/
00024 BusOut FunctionLEDs(PB_15, PA_8);
00025 BusOut LevelLEDs(PA_11,PA_12);
00026 
00027 Serial pc(PA_9, PA_10); //tx,rx
00028 
00029 
00030 //StartupLEDs
00031 #define Blank    0x00
00032 #define AllLEDs  0xFF
00033 
00034 //Function LED Defines
00035 #define pHG  0x01
00036 #define ORPG 0x02
00037 #define mAOutput 0x04
00038 
00039 //LevelOut LED Defines
00040 #define LowLED 0x01
00041 #define MidLED 0x02
00042 #define HighLED 0x04
00043 
00044 
00045 
00046 int main()
00047 {
00048     pc.baud(115200);
00049 
00050     //cal_test();
00051 
00052 
00053     //initialize Calibration Data
00054     //cal_init();
00055 
00056     cal_test();
00057     cal_factory();
00058     cal_test();
00059     cal_init();
00060     cal_test();
00061     g_cal.vis_cal_ppb = 2.0;
00062     cal_save();
00063     cal_init();
00064     cal_test();
00065     
00066       //cal_init();
00067     //cal_test();
00068 
00069 
00070 
00071 
00072 
00073     //cal_test();
00074     //cal_init();
00075     //cal_test();
00076     //g_cal.vis_cal_ppb = 2.0;
00077     //cal_save();
00078     // cal_test();
00079 
00080 
00081 
00082 
00083 }