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.
System.h
00001 #ifndef _SYSTEM_H 00002 #define _SYSTEM_H 00003 00004 00005 #include "DataTypes.h" 00006 #include "mbed.h" 00007 #include "Serial.h" 00008 #include "ADC.h" 00009 #include "Configuration.h" 00010 #include "stdio.h" 00011 #include "FixedMath.h" 00012 #include "KeyValue.h" 00013 #include "SmartSwitch.h" 00014 #include "GFX.h" 00015 #include "ff.h" 00016 #include "FIRMWARE_VERSION.h" 00017 #include "Terminal.h" 00018 00019 #define SYSTEM_STATE_INIT 0 00020 #define SYSTEM_STATE_LOGGING 1 00021 #define SYSTEM_STATE_IDLE 2 00022 00023 void EnterSystemState(BYTE NextState); 00024 void InitButton(); 00025 void InitRobotPowerMeasurementSystem(); 00026 00027 void CheckButton(); 00028 void UpdateDisplay(); 00029 void CheckSDCardStatus(); 00030 void UpdateHostTerminal(); 00031 00032 extern BYTE SystemState; 00033 00034 #define DATA_BLOCK_SIZE 1024 00035 00036 typedef struct { 00037 00038 float Voltage[DATA_BLOCK_SIZE]; 00039 float Current[DATA_BLOCK_SIZE]; 00040 00041 SIGNED_DWORD WriteOutPtr; 00042 SIGNED_DWORD ReadInPtr; 00043 00044 }DataBlock; 00045 00046 extern DataBlock MyDataBlock; 00047 extern SIGNED_DWORD ReadWriteDifferential; 00048 00049 #define MIN_WRITE_BLOCK_THRESH (16) 00050 #define MAX_WRITE_BLOCK_THRESH ((DATA_BLOCK_SIZE/2)-1) 00051 00052 void InitDataBlocks(DataBlock * DB); 00053 extern BOOL DataLogError; 00054 extern CHAR *ErrorMsg; 00055 void LogData(); 00056 void DisplayBootMsg(); 00057 00058 #endif
Generated on Thu Jul 14 2022 09:05:34 by
1.7.2