Skip to content

Commit 40b491f

Browse files
committed
V2.0.0
- Rewrite - Support printf
1 parent 3d43eb4 commit 40b491f

7 files changed

+588
-986
lines changed

LICENSE

-674
This file was deleted.

LICENSE.TXT

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
This software is dual-licensed: you can redistribute it and/or modify
2+
it under the terms of the GNU General Public License version 2 as
3+
published by the Free Software Foundation. For the terms of this
4+
license, see <http://www.gnu.org/licenses/>.
5+
6+
You are free to use this software under the terms of the GNU General
7+
Public License, but WITHOUT ANY WARRANTY; without even the implied
8+
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9+
See the GNU General Public License for more details.
10+
11+
Alternatively, you can license this software under a commercial
12+
license. The commercial license removes all GPLv2 restrictions and allows
13+
you to redistribute your closed source products with the Library embedded.
14+
This license provides access to software maintenance for updates,
15+
upgrades, and priority technical support.
16+
17+
NO WARRANTY: THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTIES,
18+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
19+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
20+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
21+
DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE,
22+
ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
23+
IN THE SOFTWARE.
24+
25+
For inquiries regarding the commercial license,
26+
please contact e-mail: [email protected]
27+
28+
Copyright (c) 2025 NimaLTD - Nima Askari
29+
All rights reserved.

NimaLTD.NimaLTD-TM1637_conf.h

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
/*
3+
* @author Nima Askari
4+
* @license See the LICENSE file in the root folder.
5+
*
6+
* @github https://www.github.com/nimaltd
7+
* @linkedin https://www.linkedin.com/in/nimaltd
8+
* @youtube https://www.youtube.com/@nimaltd
9+
* @instagram https://instagram.com/github.nimaltd
10+
*
11+
* Copyright (C) 2025 Nima Askari - NimaLTD. All rights reserved.
12+
*
13+
*/
14+
15+
/* Define to prevent recursive inclusion -------------------------------------*/
16+
#ifndef _NIMALTD_TM1637_CONF_H_
17+
#define _NIMALTD_TM1637_CONF_H_
18+
19+
#ifdef __cplusplus
20+
extern "C" {
21+
#endif
22+
23+
/* Includes ------------------------------------------------------------------*/
24+
25+
/**
26+
MiddleWare name : NimaLTD.NimaLTD-TM1637.2.0.0
27+
MiddleWare fileName : NimaLTD.NimaLTD-TM1637_conf.h
28+
MiddleWare version : 2.0.0
29+
*/
30+
/*---------- TM1637_DELAY -----------*/
31+
#define TM1637_DELAY 10
32+
33+
/*---------- TM1637_ENABLE_ALFABET -----------*/
34+
#define TM1637_ENABLE_ALFABET false
35+
36+
#ifdef __cplusplus
37+
}
38+
#endif
39+
#endif /*_ NIMALTD_TM1637_CONF_H_ */

README.md

+26-34
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,30 @@
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:
222

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>
726

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
1429

15-
example:
1630

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

Comments
 (0)