From 5b381c80976c76bb7e0d779f1ff878416c93db78 Mon Sep 17 00:00:00 2001 From: Guo Wenxue <guowenxue@gmail.com> Date: Thu, 11 Apr 2024 11:31:56 +0800 Subject: [PATCH] Add TLV packet support --- modules/w25qflash.c | 33 +++++++++++++++++++++------------ 1 files changed, 21 insertions(+), 12 deletions(-) diff --git a/modules/w25qflash.c b/modules/w25qflash.c index 345f0b6..449a9c7 100644 --- a/modules/w25qflash.c +++ b/modules/w25qflash.c @@ -1,16 +1,25 @@ /********************************************************************************* - * Copyright: (C) 2023 LingYun IoT System Studio. All Rights Reserved. + * Copyright: (C) 2023 LingYun IoT System Studio + * All rights reserved. + * + * Filename: at24c.c + * Description: This file is AT24Cxx EEPROM code + * + * Version: 1.0.0(10/08/23) * Author: Guo Wenxue <guowenxue@gmail.com> + * ChangeLog: 1, Release initial version on "10/08/23 17:52:00" * - * Description: This file is W25Qxx SPI Norflash driver on RaspberryPi 40Pin. + * Pin connection: + * W25QXX Raspberry Pi 40Pin + * VCC <---> Pin#1 (3.3V) + * CS <---> Pin#24(CS) + * DO <---> Pin#21(MISO) + * GND <---> Pin#9 (GND) + * CLK <---> Pin#23(SCLK) + * DI <---> Pin#19(MOSI) * - * W25QXX RaspberryPi 40Pin - * VCC <---> 3.3V(Pin#1) - * CS <---> CS(Pin#24) - * DO <---> MISO(Pin#21) - * GND <---> GND(Pin#9) - * CLK <---> SCLK(Pin#23) - * DI <---> MOSI(Pin#19) + * /boot/config.txt: + * dtparam=spi=on * ********************************************************************************/ @@ -745,9 +754,9 @@ } while ((buf[1] & 0x01) == 0x01); } -/*+----------------+ - *| dump_buf | - *+----------------+*/ +/*+----------------------+ + *| Misc functions | + *+----------------------+*/ void print_buf(const char *prompt, uint8_t *buf, int size) { -- Gitblit v1.9.1