Éric Bisson
/
Code_APP3_R
app3
Fork of Code_APP1 by
Diff: header.h
- Revision:
- 9:dc81d8ee4a97
- Parent:
- 8:6f2b7f9b0d0d
--- a/header.h Tue Jan 17 02:09:22 2017 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/********************************/ -// 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); \ No newline at end of file