app3
Dependencies: EthernetInterface WebSocketClient mbed-rtos mbed
Fork of Code_APP1 by
header.h
- Committer:
- ericbisson
- Date:
- 2017-01-17
- Revision:
- 8:6f2b7f9b0d0d
- Parent:
- 7:a57409bdf777
File content as of revision 8:6f2b7f9b0d0d:
/********************************/ // Configuration /********************************/ #define IS_USING_SPI false #define MOVING_AVG_SIZE 10 /********************************/ #define PI 3.1416 int* PINSEL0 = (int*)0x4002C000; int* U3FCR = (int*)0x4009C008; int* U3LCR = (int*)0x4009C00C; int* U3DLM = (int*)0x4009C004; int* U3DLL = (int*)0x4009C000; int* PCONP = (int*)0x400FC0C4; int* PCLKSEL1 = (int*)0x400FC1AC; int* U3TER = (int*)0x4009C030; int* U3THR = (int*)0x4009C000; int* U3LSR = (int*)0x4009C014; struct MovingAverage_t { int buffer[MOVING_AVG_SIZE]; char cursor; bool bFilled; }; MovingAverage_t MovingAverage = { {}, 0, false }; void write_to_7segment(char d1, char d2, char d3, char d4); int moyenne_mobile(int newData); void calculer_angle(char bufferAngle[], int accZ); void change_dots(char dot); void chip_select(bool bSet); void SetClockAndMode(int Speed, char Mode); void ResetCursor(); unsigned char reverse(unsigned char b); void write_uart(unsigned char value);