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@10:dcfa32556a25, 2021-03-12 (annotated)
- Committer:
- jack1930
- Date:
- Fri Mar 12 08:36:07 2021 +0000
- Revision:
- 10:dcfa32556a25
- Parent:
- 9:8924db86f383
- Child:
- 11:64f579b3fd14
L152+F411
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| jack1930 | 10:dcfa32556a25 | 1 | //#include "stm32l1xx_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 | 0:92e4253d430a | 13 | class MFS |
| jack1930 | 0:92e4253d430a | 14 | { |
| jack1930 | 0:92e4253d430a | 15 | private: |
| jack1930 | 0:92e4253d430a | 16 | uint8_t dieAuswahl=0; |
| jack1930 | 0:92e4253d430a | 17 | uint8_t dieSegmente=0xFF; |
| jack1930 | 4:49654888d57b | 18 | char seg7[10]={0xFC,0x60,0xDA, 0xF2, 0x66, 0xB6, 0xBE, 0xE0, 0xFE, 0xF6}; |
| jack1930 | 0:92e4253d430a | 19 | USART_HandleTypeDef husart1; |
| jack1930 | 0:92e4253d430a | 20 | public: |
| jack1930 | 1:774b96b00aed | 21 | void operator=(unsigned int wert); |
| jack1930 | 5:babdf868f544 | 22 | operator int(void); |
| jack1930 | 0:92e4253d430a | 23 | MFS(void); |
| jack1930 | 0:92e4253d430a | 24 | void siebensegment(uint8_t wert); |
| jack1930 | 0:92e4253d430a | 25 | void siebensegment(uint8_t awert,uint8_t wert); |
| jack1930 | 0:92e4253d430a | 26 | void bcd(int wert); |
| jack1930 | 0:92e4253d430a | 27 | void bcd(uint8_t awert, int wert); |
| jack1930 | 0:92e4253d430a | 28 | void auswahl(uint8_t wert); |
| jack1930 | 0:92e4253d430a | 29 | private: |
| jack1930 | 0:92e4253d430a | 30 | void send(void); |
| jack1930 | 0:92e4253d430a | 31 | }; |