![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
app3
Dependencies: EthernetInterface WebSocketClient mbed-rtos mbed
Fork of Code_APP1 by
header.h@8:6f2b7f9b0d0d, 2017-01-17 (annotated)
- Committer:
- ericbisson
- Date:
- Tue Jan 17 02:09:22 2017 +0000
- Revision:
- 8:6f2b7f9b0d0d
- Parent:
- 7:a57409bdf777
test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ericbisson | 5:1a60144f7163 | 1 | /********************************/ |
ericbisson | 5:1a60144f7163 | 2 | // Configuration |
ericbisson | 5:1a60144f7163 | 3 | /********************************/ |
ericbisson | 7:a57409bdf777 | 4 | #define IS_USING_SPI false |
ericbisson | 5:1a60144f7163 | 5 | #define MOVING_AVG_SIZE 10 |
ericbisson | 5:1a60144f7163 | 6 | /********************************/ |
ericbisson | 6:2ec2a74c807f | 7 | #define PI 3.1416 |
ericbisson | 6:2ec2a74c807f | 8 | |
ericbisson | 8:6f2b7f9b0d0d | 9 | int* PINSEL0 = (int*)0x4002C000; |
ericbisson | 8:6f2b7f9b0d0d | 10 | int* U3FCR = (int*)0x4009C008; |
ericbisson | 8:6f2b7f9b0d0d | 11 | int* U3LCR = (int*)0x4009C00C; |
ericbisson | 8:6f2b7f9b0d0d | 12 | int* U3DLM = (int*)0x4009C004; |
ericbisson | 8:6f2b7f9b0d0d | 13 | int* U3DLL = (int*)0x4009C000; |
ericbisson | 8:6f2b7f9b0d0d | 14 | int* PCONP = (int*)0x400FC0C4; |
ericbisson | 8:6f2b7f9b0d0d | 15 | int* PCLKSEL1 = (int*)0x400FC1AC; |
ericbisson | 8:6f2b7f9b0d0d | 16 | int* U3TER = (int*)0x4009C030; |
ericbisson | 8:6f2b7f9b0d0d | 17 | int* U3THR = (int*)0x4009C000; |
ericbisson | 8:6f2b7f9b0d0d | 18 | int* U3LSR = (int*)0x4009C014; |
ericbisson | 7:a57409bdf777 | 19 | |
ericbisson | 5:1a60144f7163 | 20 | struct MovingAverage_t |
ericbisson | 5:1a60144f7163 | 21 | { |
ericbisson | 5:1a60144f7163 | 22 | int buffer[MOVING_AVG_SIZE]; |
ericbisson | 5:1a60144f7163 | 23 | char cursor; |
ericbisson | 5:1a60144f7163 | 24 | bool bFilled; |
ericbisson | 5:1a60144f7163 | 25 | }; |
ericbisson | 5:1a60144f7163 | 26 | MovingAverage_t MovingAverage = { |
ericbisson | 5:1a60144f7163 | 27 | {}, |
ericbisson | 5:1a60144f7163 | 28 | 0, |
ericbisson | 5:1a60144f7163 | 29 | false |
ericbisson | 5:1a60144f7163 | 30 | }; |
ericbisson | 5:1a60144f7163 | 31 | |
ericbisson | 5:1a60144f7163 | 32 | void write_to_7segment(char d1, char d2, char d3, char d4); |
ericbisson | 5:1a60144f7163 | 33 | int moyenne_mobile(int newData); |
ericbisson | 5:1a60144f7163 | 34 | void calculer_angle(char bufferAngle[], int accZ); |
ericbisson | 5:1a60144f7163 | 35 | void change_dots(char dot); |
ericbisson | 5:1a60144f7163 | 36 | void chip_select(bool bSet); |
ericbisson | 5:1a60144f7163 | 37 | void SetClockAndMode(int Speed, char Mode); |
ericbisson | 8:6f2b7f9b0d0d | 38 | void ResetCursor(); |
ericbisson | 8:6f2b7f9b0d0d | 39 | unsigned char reverse(unsigned char b); |
ericbisson | 8:6f2b7f9b0d0d | 40 | void write_uart(unsigned char value); |