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@1:774b96b00aed, 2021-02-03 (annotated)
- Committer:
- jack1930
- Date:
- Wed Feb 03 16:34:01 2021 +0000
- Revision:
- 1:774b96b00aed
- Parent:
- 0:92e4253d430a
- Child:
- 4:49654888d57b
Version 1.1 mit Operator =
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| jack1930 | 0:92e4253d430a | 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 | 0:92e4253d430a | 18 | char seg7[10]={0x03,0x9F,0x25, 0x0D, 0x99, 0x49, 0x41, 0x1F, 0x01, 0x09}; |
| jack1930 | 0:92e4253d430a | 19 | USART_HandleTypeDef husart1; |
| jack1930 | 0:92e4253d430a | 20 | public: |
| jack1930 | 1:774b96b00aed | 21 | void operator=(unsigned int wert); |
| jack1930 | 0:92e4253d430a | 22 | MFS(void); |
| jack1930 | 0:92e4253d430a | 23 | void siebensegment(uint8_t wert); |
| jack1930 | 0:92e4253d430a | 24 | void siebensegment(uint8_t awert,uint8_t wert); |
| jack1930 | 0:92e4253d430a | 25 | void bcd(int wert); |
| jack1930 | 0:92e4253d430a | 26 | void bcd(uint8_t awert, int wert); |
| jack1930 | 0:92e4253d430a | 27 | void auswahl(uint8_t wert); |
| jack1930 | 0:92e4253d430a | 28 | private: |
| jack1930 | 0:92e4253d430a | 29 | void send(void); |
| jack1930 | 0:92e4253d430a | 30 | }; |