|
1 |
| -# TM1637 Display driver for STM32 |
| 1 | +# SPI FLASH Library for STM32 |
| 2 | +--- |
| 3 | +## Please Do not Forget to get STAR, DONATE and support me on social networks. Thank you. :sparkling_heart: |
| 4 | +--- |
| 5 | +- Author: Nima Askari |
| 6 | +- Github: https://www.github.com/NimaLTD |
| 7 | +- Youtube: https://www.youtube.com/@nimaltd |
| 8 | +- LinkedIn: https://www.linkedin.com/in/nimaltd |
| 9 | +- Instagram: https://instagram.com/github.NimaLTD |
| 10 | +--- |
| 11 | +- I have tested on w25q64. please test other devices and tell me. |
| 12 | +--- |
| 13 | +* Install Library from https://github.com/nimaltd/STM32-PACK/raw/main/SPIF/NimaLTD.I-CUBE-SPIF.pdsc |
| 14 | +* Add and enable it. |
| 15 | +* Enable SPI and a GPIO as output-pushpull (CS pin).Connect WP and HOLD to VCC. |
| 16 | +* Select 'Generate peripheral initialization as a pair of .c/.h files per peripheral' on the Code Generator Tab. |
| 17 | +* Generate Code. |
| 18 | +* Define a structure of `SPIF_HandleTypeDef`. |
| 19 | +* Call `SPIF_Init()` and enjoy. |
| 20 | +--- |
| 21 | +# Watch the Video: |
2 | 22 |
|
3 |
| - * WebSite: https://www.github.com/NimaLTD |
4 |
| - * Instagram: https://www.instagram.com/github.NimaLTD |
5 |
| - * LinkedIn: https://www.linkedin.com/in/NimaLTD |
6 |
| - * Youtube: https://www.youtube.com/channel/UCUhY7qY1klJm1d2kulr9ckw |
| 23 | +<div align="center"> |
| 24 | + <a href="https://www.youtube.com/watch?v=_baNId6cDi4"><img src="https://img.youtube.com/vi/_baNId6cDi4/0.jpg" alt="Video"></a> |
| 25 | +</div> |
7 | 26 |
|
8 |
| -How to use this Library: |
9 |
| -* Put all files into your project. |
10 |
| -* Set your Configuration in `tm1637_config.h`. |
11 |
| -* Select 2 pins on cubemx as gpio open drain. |
12 |
| -* Create a strcuture `tm1637_t your_struct`. |
13 |
| -* Call `tm1637_init()`. |
| 27 | +--- |
| 28 | +The old Version: https://github.com/nimaltd/SPIF/archive/refs/tags/1.20.0.zip |
14 | 29 |
|
15 |
| -example: |
16 | 30 |
|
17 |
| -``` |
18 |
| -#include "tm1637.h" |
19 |
| -tm1637_t disp; |
20 |
| -
|
21 |
| -const uint8_t seg_LOAD[4] = {0x38, 0x5c, 0x77, 0x5e}; // display LOAD |
22 |
| -. |
23 |
| -. |
24 |
| -. |
25 |
| -int main() |
26 |
| -{ |
27 |
| - . |
28 |
| - . |
29 |
| - . |
30 |
| - tm1637_init(&disp, CLK1_GPIO_Port, CLK1_Pin, DIO1_GPIO_Port, DIO1_Pin); |
31 |
| - tm1637_write_segment(&disp, seg_LOAD, 4, 0); |
32 |
| - HAL_Delay(1000); |
33 |
| - tm1637_write_float(&disp, -1.23, 2, 0); |
34 |
| - HAL_Delay(1000); |
35 |
| - tm1637_write_int(&disp, 56, 0); |
36 |
| -} |
37 |
| -
|
38 |
| -``` |
0 commit comments