Bruno Allaire-Lemay
/
APP1test
df
Fork of APP1 by
UARTDisplayer.hpp@16:c77e34bc69bc, 2017-01-17 (annotated)
- Committer:
- dupm2216
- Date:
- Tue Jan 17 06:01:05 2017 +0000
- Revision:
- 16:c77e34bc69bc
- Parent:
- 14:2f89279586cb
- Child:
- 21:a111be2582be
Fix everything; ; - Change UART0 (USB) to UART1 (pin 13); - Add the pin select instructions; - Reintroduced the tests run; - Reintegrate with the accelerometer
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
GaiSensei | 13:bb9669053eb3 | 1 | #include <mbed.h> //PinName |
GaiSensei | 13:bb9669053eb3 | 2 | #include "DisplayerConstants.hpp" |
GaiSensei | 13:bb9669053eb3 | 3 | |
GaiSensei | 13:bb9669053eb3 | 4 | class HomemadeUART |
GaiSensei | 13:bb9669053eb3 | 5 | { |
GaiSensei | 13:bb9669053eb3 | 6 | public: |
GaiSensei | 13:bb9669053eb3 | 7 | void init(); |
GaiSensei | 14:2f89279586cb | 8 | void set_baud_rate(unsigned int baud_rate); |
GaiSensei | 14:2f89279586cb | 9 | void set_fifo(); |
GaiSensei | 14:2f89279586cb | 10 | void set_lcr(); |
GaiSensei | 14:2f89279586cb | 11 | |
GaiSensei | 14:2f89279586cb | 12 | void write(unsigned char value); |
GaiSensei | 13:bb9669053eb3 | 13 | }; |
GaiSensei | 2:b8a20f7e2912 | 14 | |
GaiSensei | 2:b8a20f7e2912 | 15 | class UARTDisplayer |
GaiSensei | 2:b8a20f7e2912 | 16 | { |
GaiSensei | 2:b8a20f7e2912 | 17 | public: |
dupm2216 | 16:c77e34bc69bc | 18 | UARTDisplayer(); |
GaiSensei | 2:b8a20f7e2912 | 19 | void displayAngle(float angle); |
GaiSensei | 2:b8a20f7e2912 | 20 | void reset(); |
GaiSensei | 13:bb9669053eb3 | 21 | private: |
GaiSensei | 13:bb9669053eb3 | 22 | HomemadeUART device; |
GaiSensei | 2:b8a20f7e2912 | 23 | }; |