Bruno Allaire-Lemay
/
APP1test
df
Fork of APP1 by
UARTDisplayer.hpp@23:2531e72d92b9, 2017-02-09 (annotated)
- Committer:
- GaiSensei
- Date:
- Thu Feb 09 15:55:18 2017 +0000
- Revision:
- 23:2531e72d92b9
- Parent:
- 21:a111be2582be
gh
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dupm2216 | 21:a111be2582be | 1 | ///////////////////////////////////////////////////////////// |
dupm2216 | 21:a111be2582be | 2 | // APP 1: Systèmes à microprocesseurs // |
dupm2216 | 21:a111be2582be | 3 | // // |
dupm2216 | 21:a111be2582be | 4 | // Université de Sherbrooke // |
dupm2216 | 21:a111be2582be | 5 | // Génie informatique // |
dupm2216 | 21:a111be2582be | 6 | // Session 5, Hiver 2017 // |
dupm2216 | 21:a111be2582be | 7 | // // |
dupm2216 | 21:a111be2582be | 8 | // Date: 17 janvier 2017 // |
dupm2216 | 21:a111be2582be | 9 | // // |
dupm2216 | 21:a111be2582be | 10 | // Auteurs: Maxime Dupuis, dupm2216 // |
dupm2216 | 21:a111be2582be | 11 | // Bruno Allaire-Lemay, allb2701 // |
dupm2216 | 21:a111be2582be | 12 | ///////////////////////////////////////////////////////////// |
dupm2216 | 21:a111be2582be | 13 | |
GaiSensei | 13:bb9669053eb3 | 14 | #include <mbed.h> //PinName |
GaiSensei | 13:bb9669053eb3 | 15 | #include "DisplayerConstants.hpp" |
GaiSensei | 13:bb9669053eb3 | 16 | |
GaiSensei | 13:bb9669053eb3 | 17 | class HomemadeUART |
GaiSensei | 13:bb9669053eb3 | 18 | { |
GaiSensei | 13:bb9669053eb3 | 19 | public: |
GaiSensei | 13:bb9669053eb3 | 20 | void init(); |
GaiSensei | 14:2f89279586cb | 21 | void set_baud_rate(unsigned int baud_rate); |
GaiSensei | 14:2f89279586cb | 22 | void set_fifo(); |
GaiSensei | 14:2f89279586cb | 23 | void set_lcr(); |
GaiSensei | 14:2f89279586cb | 24 | |
GaiSensei | 14:2f89279586cb | 25 | void write(unsigned char value); |
GaiSensei | 13:bb9669053eb3 | 26 | }; |
GaiSensei | 2:b8a20f7e2912 | 27 | |
GaiSensei | 2:b8a20f7e2912 | 28 | class UARTDisplayer |
GaiSensei | 2:b8a20f7e2912 | 29 | { |
GaiSensei | 2:b8a20f7e2912 | 30 | public: |
dupm2216 | 16:c77e34bc69bc | 31 | UARTDisplayer(); |
GaiSensei | 2:b8a20f7e2912 | 32 | void displayAngle(float angle); |
GaiSensei | 2:b8a20f7e2912 | 33 | void reset(); |
GaiSensei | 13:bb9669053eb3 | 34 | private: |
GaiSensei | 13:bb9669053eb3 | 35 | HomemadeUART device; |
GaiSensei | 2:b8a20f7e2912 | 36 | }; |