Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: MFS_ADC MFS-7_Segment-Interrupt MFS_USART_Test_HAL MFS_02-Luftschlange ... more
MFS.h@11:64f579b3fd14, 2021-03-12 (annotated)
- Committer:
- jack1930
- Date:
- Fri Mar 12 10:03:30 2021 +0000
- Revision:
- 11:64f579b3fd14
- Parent:
- 10:dcfa32556a25
L152+F411+F103
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| jack1930 | 11:64f579b3fd14 | 1 | //#include "stm32f4xx_hal.h" |
| jack1930 | 0:92e4253d430a | 2 | #include "mbed.h" |
| jack1930 | 0:92e4253d430a | 3 | |
| jack1930 | 0:92e4253d430a | 4 | #define USART_TX_Pin GPIO_PIN_2 |
| jack1930 | 0:92e4253d430a | 5 | #define USART_TX_GPIO_Port GPIOA |
| jack1930 | 0:92e4253d430a | 6 | #define USART_RX_Pin GPIO_PIN_3 |
| jack1930 | 0:92e4253d430a | 7 | #define USART_RX_GPIO_Port GPIOA |
| jack1930 | 0:92e4253d430a | 8 | #define beep_Pin GPIO_PIN_3 |
| jack1930 | 0:92e4253d430a | 9 | #define beep_GPIO_Port GPIOB |
| jack1930 | 0:92e4253d430a | 10 | #define latch_Pin GPIO_PIN_5 |
| jack1930 | 0:92e4253d430a | 11 | #define latch_GPIO_Port GPIOB |
| jack1930 | 0:92e4253d430a | 12 | |
| jack1930 | 11:64f579b3fd14 | 13 | #ifndef GPIO_SPEED_FREQ_VERY_HIGH |
| jack1930 | 11:64f579b3fd14 | 14 | #define GPIO_SPEED_FREQ_VERY_HIGH GPIO_SPEED_FREQ_HIGH |
| jack1930 | 11:64f579b3fd14 | 15 | #endif |
| jack1930 | 11:64f579b3fd14 | 16 | |
| jack1930 | 11:64f579b3fd14 | 17 | #ifndef GPIO_AF7_USART1 |
| jack1930 | 11:64f579b3fd14 | 18 | #define GPIO_AF7_USART1 1 |
| jack1930 | 11:64f579b3fd14 | 19 | #endif |
| jack1930 | 11:64f579b3fd14 | 20 | |
| jack1930 | 0:92e4253d430a | 21 | class MFS |
| jack1930 | 0:92e4253d430a | 22 | { |
| jack1930 | 0:92e4253d430a | 23 | private: |
| jack1930 | 0:92e4253d430a | 24 | uint8_t dieAuswahl=0; |
| jack1930 | 0:92e4253d430a | 25 | uint8_t dieSegmente=0xFF; |
| jack1930 | 4:49654888d57b | 26 | char seg7[10]={0xFC,0x60,0xDA, 0xF2, 0x66, 0xB6, 0xBE, 0xE0, 0xFE, 0xF6}; |
| jack1930 | 0:92e4253d430a | 27 | USART_HandleTypeDef husart1; |
| jack1930 | 0:92e4253d430a | 28 | public: |
| jack1930 | 1:774b96b00aed | 29 | void operator=(unsigned int wert); |
| jack1930 | 5:babdf868f544 | 30 | operator int(void); |
| jack1930 | 0:92e4253d430a | 31 | MFS(void); |
| jack1930 | 0:92e4253d430a | 32 | void siebensegment(uint8_t wert); |
| jack1930 | 0:92e4253d430a | 33 | void siebensegment(uint8_t awert,uint8_t wert); |
| jack1930 | 0:92e4253d430a | 34 | void bcd(int wert); |
| jack1930 | 0:92e4253d430a | 35 | void bcd(uint8_t awert, int wert); |
| jack1930 | 0:92e4253d430a | 36 | void auswahl(uint8_t wert); |
| jack1930 | 0:92e4253d430a | 37 | private: |
| jack1930 | 0:92e4253d430a | 38 | void send(void); |
| jack1930 | 0:92e4253d430a | 39 | }; |