Bruno Allaire-Lemay
/
APP1test
df
Fork of APP1 by
UARTDisplayer.hpp@14:2f89279586cb, 2017-01-16 (annotated)
- Committer:
- GaiSensei
- Date:
- Mon Jan 16 02:28:40 2017 +0000
- Revision:
- 14:2f89279586cb
- Parent:
- 13:bb9669053eb3
- Child:
- 16:c77e34bc69bc
Bonne nuit; ; Tout est bris?; ; Ajouter mask dans write_bits pour que les reserved soit des 0
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 | HomemadeUART(PinName tx_pin); |
GaiSensei | 13:bb9669053eb3 | 8 | void init(); |
GaiSensei | 14:2f89279586cb | 9 | void set_baud_rate(unsigned int baud_rate); |
GaiSensei | 14:2f89279586cb | 10 | void set_fifo(); |
GaiSensei | 14:2f89279586cb | 11 | void set_lcr(); |
GaiSensei | 14:2f89279586cb | 12 | |
GaiSensei | 14:2f89279586cb | 13 | void write(unsigned char value); |
GaiSensei | 13:bb9669053eb3 | 14 | private: |
GaiSensei | 13:bb9669053eb3 | 15 | PinName tx_pin; |
GaiSensei | 13:bb9669053eb3 | 16 | }; |
GaiSensei | 2:b8a20f7e2912 | 17 | |
GaiSensei | 2:b8a20f7e2912 | 18 | class UARTDisplayer |
GaiSensei | 2:b8a20f7e2912 | 19 | { |
GaiSensei | 2:b8a20f7e2912 | 20 | public: |
GaiSensei | 13:bb9669053eb3 | 21 | UARTDisplayer(PinName tx_pin); |
GaiSensei | 2:b8a20f7e2912 | 22 | void displayAngle(float angle); |
GaiSensei | 2:b8a20f7e2912 | 23 | void reset(); |
GaiSensei | 13:bb9669053eb3 | 24 | private: |
GaiSensei | 13:bb9669053eb3 | 25 | HomemadeUART device; |
GaiSensei | 2:b8a20f7e2912 | 26 | }; |