Browse Source

Support for Pi5 and the latest Raspberry PI system, Arudino upper and lower case character issues fixed

shhds 1 year ago
parent
commit
dec61d3139

+ 0 - 162
RaspberryPi_JetsonNano/c/examples/EPD_13in3_test.c

@@ -1,162 +0,0 @@
-/*****************************************************************************
-* | File      	:   EPD_13IN3_test.c
-* | Author      :   Waveshare team
-* | Function    :   13.3inch e-paper test demo
-* | Info        :
-*----------------
-* |	This version:   V1.0
-* | Date        :   2021-01-20
-* | Info        :
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documnetation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to  whom the Software is
-# furished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-#
-******************************************************************************/
-#include "EPD_Test.h"
-#include "EPD_13in3.h"
-#include <time.h> 
-
-int EPD_13in3_test(void)
-{
-    printf("EPD_13IN3_test Demo\r\n");
-    if(DEV_Module_Init()!=0){
-        return -1;
-    }
-
-    printf("e-Paper Init and Clear...\r\n");
-	EPD_13IN3_Init();
-
-	struct timespec start={0,0}, finish={0,0}; 
-    clock_gettime(CLOCK_REALTIME,&start);
-    EPD_13IN3_Clear();
-	clock_gettime(CLOCK_REALTIME,&finish);
-    printf("%ld S\r\n",finish.tv_sec-start.tv_sec);	
-
-    //Create a new image cache
-    UBYTE *BlackImage;
-    UDOUBLE Imagesize = ((EPD_13IN3_WIDTH % 8 == 0)? (EPD_13IN3_WIDTH / 8 ): (EPD_13IN3_WIDTH / 8 + 1)) * EPD_13IN3_HEIGHT;
-    if((BlackImage = (UBYTE *)malloc(Imagesize)) == NULL) {
-        printf("Failed to apply for black memory...\r\n");
-        return -1;
-    }
-    printf("Paint_NewImage\r\n");
-    Paint_NewImage(BlackImage, EPD_13IN3_WIDTH, EPD_13IN3_HEIGHT, 0, WHITE);
-	Paint_Clear(WHITE);
-	
-#if 1   // show bmp
-	Paint_NewImage(BlackImage, EPD_13IN3_WIDTH, EPD_13IN3_HEIGHT, 0, WHITE);
-    printf("show bmp------------------------\r\n");
-    Paint_SelectImage(BlackImage);
-    GUI_ReadBmp("./pic/13in3.bmp", 0, 0);
-    EPD_13IN3_Display(BlackImage);
-    DEV_Delay_ms(3000);
-#endif
-
-#if 1   // show bmp
-	Paint_NewImage(BlackImage, EPD_13IN3_WIDTH, EPD_13IN3_HEIGHT, 0, WHITE);
-    printf("show bmp------------------------\r\n");
-    Paint_SelectImage(BlackImage);
-    GUI_ReadBmp("./pic/13in3_1.bmp", 0, 0);
-    EPD_13IN3_Display(BlackImage);
-    DEV_Delay_ms(3000);
-#endif
-
-#if 1   // show bmp
-	Paint_NewImage(BlackImage, EPD_13IN3_WIDTH, EPD_13IN3_HEIGHT, 0, WHITE);
-    printf("show bmp------------------------\r\n");
-    Paint_SelectImage(BlackImage);
-    GUI_ReadBmp("./pic/13in3_2.bmp", 0, 0);
-    EPD_13IN3_Display(BlackImage);
-    DEV_Delay_ms(3000);
-#endif
-
-#if 0  //show image for array  
-    Paint_NewImage(BlackImage, EPD_13IN3_WIDTH, EPD_13IN3_HEIGHT, 0, WHITE);  
-    printf("show image for array\r\n");
-    Paint_SelectImage(BlackImage);
-    Paint_Clear(WHITE);
-    Paint_DrawBitMap(gImage_2in9);
-
-    EPD_13IN3_Display(BlackImage);
-    DEV_Delay_ms(3000);
-#endif
-
-#if 1  // Drawing on the image
-	Paint_NewImage(BlackImage, EPD_13IN3_WIDTH, EPD_13IN3_HEIGHT, 0, WHITE);  	
-    printf("Drawing\r\n");
-    //1.Select Image
-    Paint_SelectImage(BlackImage);
-    Paint_Clear(WHITE);
-	
-    // 2.Drawing on the image
-    printf("Drawing:BlackImage\r\n");
-    Paint_DrawPoint(10, 80, BLACK, DOT_PIXEL_1X1, DOT_STYLE_DFT);
-    Paint_DrawPoint(10, 90, BLACK, DOT_PIXEL_2X2, DOT_STYLE_DFT);
-    Paint_DrawPoint(10, 100, BLACK, DOT_PIXEL_3X3, DOT_STYLE_DFT);
-
-    Paint_DrawLine(20, 70, 70, 120, BLACK, DOT_PIXEL_1X1, LINE_STYLE_SOLID);
-    Paint_DrawLine(70, 70, 20, 120, BLACK, DOT_PIXEL_1X1, LINE_STYLE_SOLID);
-
-    Paint_DrawRectangle(20, 70, 70, 120, BLACK, DOT_PIXEL_1X1, DRAW_FILL_EMPTY);
-    Paint_DrawRectangle(80, 70, 130, 120, BLACK, DOT_PIXEL_1X1, DRAW_FILL_FULL);
-
-    Paint_DrawCircle(45, 95, 20, BLACK, DOT_PIXEL_1X1, DRAW_FILL_EMPTY);
-    Paint_DrawCircle(105, 95, 20, WHITE, DOT_PIXEL_1X1, DRAW_FILL_FULL);
-
-    Paint_DrawLine(85, 95, 125, 95, BLACK, DOT_PIXEL_1X1, LINE_STYLE_DOTTED);
-    Paint_DrawLine(105, 75, 105, 115, BLACK, DOT_PIXEL_1X1, LINE_STYLE_DOTTED);
-
-    Paint_DrawString_EN(10, 0, "waveshare", &Font16, BLACK, WHITE);
-    Paint_DrawString_EN(10, 20, "hello world", &Font12, WHITE, BLACK);
-
-    Paint_DrawNum(10, 33, 123456789, &Font12, BLACK, WHITE);
-    Paint_DrawNum(10, 50, 987654321, &Font16, WHITE, BLACK);
-
-    Paint_DrawString_CN(130, 0,"ÄãºÃabc", &Font12CN, BLACK, WHITE);
-    Paint_DrawString_CN(130, 20, "΢ѩµç×Ó", &Font24CN, WHITE, BLACK);
-
-    Paint_DrawCircle(200, 310, 90, BLACK, DOT_PIXEL_1X1, DRAW_FILL_EMPTY);
-    Paint_DrawCircle(200, 310, 40, BLACK, DOT_PIXEL_1X1, DRAW_FILL_FULL);
-	
-    Paint_DrawCircle(480, 480, 150, BLACK, DOT_PIXEL_1X1, DRAW_FILL_FULL);
-    Paint_DrawCircle(480, 480, 110, WHITE, DOT_PIXEL_1X1, DRAW_FILL_FULL);
-
-    Paint_DrawCircle(750, 270, 100, BLACK, DOT_PIXEL_1X1, DRAW_FILL_EMPTY);
-    Paint_DrawCircle(750, 270, 70, BLACK, DOT_PIXEL_1X1, DRAW_FILL_FULL);
-	
-    Paint_DrawLine(200, 310, 480, 480, BLACK, DOT_PIXEL_3X3, LINE_STYLE_DOTTED);
-    Paint_DrawLine(480, 480, 750, 270, BLACK, DOT_PIXEL_3X3, LINE_STYLE_DOTTED);
-    Paint_DrawLine(750, 270, 200, 310, BLACK, DOT_PIXEL_3X3, LINE_STYLE_SOLID);	
-	
-    EPD_13IN3_Display(BlackImage);
-    DEV_Delay_ms(3000);
-#endif
-
-	printf("Clear...\r\n");
-    EPD_13IN3_Clear();
-	
-    printf("Goto Sleep...\r\n");
-    EPD_13IN3_Sleep();
-    free(BlackImage);
-    BlackImage = NULL;
-    DEV_Delay_ms(2000);//important, at least 2s
-    // close 5V
-    printf("close 5V, Module enters 0 power consumption ...\r\n");
-    DEV_Module_Exit();
-    return 0;
-}

+ 0 - 152
RaspberryPi_JetsonNano/c/lib/Config/RPI_sysfs_gpio.c

@@ -1,152 +0,0 @@
-/*****************************************************************************
-* | File        :   SYSFS_GPIO.c
-* | Author      :   Waveshare team
-* | Function    :   Drive SYSFS_ GPIO
-* | Info        :   Read and write /sys/class/gpio
-*----------------
-* |	This version:   V1.0
-* | Date        :   2019-06-04
-* | Info        :   Basic version
-*
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documnetation files (the "Software"), to deal
-# SYSFS_GPIO_IN the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to  whom the Software is
-# furished to do so, subject to the folSYSFS_GPIO_LOWing conditions:
-#
-# The above copyright notice and this permission notice shall be included SYSFS_GPIO_IN
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. SYSFS_GPIO_IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY WHETHER SYSFS_GPIO_IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# SYSFS_GPIO_OUT OF OR SYSFS_GPIO_IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS SYSFS_GPIO_IN
-# THE SOFTWARE.
-#
-******************************************************************************/
-#include "RPI_sysfs_gpio.h"
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-int SYSFS_GPIO_Export(int Pin)
-{
-    char buffer[NUM_MAXBUF];
-    int len;
-    int fd;
-
-    fd = open("/sys/class/gpio/export", O_WRONLY);
-    if (fd < 0) {
-        SYSFS_GPIO_Debug( "Export Failed: Pin%d\n", Pin);
-        return -1;
-    }
-
-    len = snprintf(buffer, NUM_MAXBUF, "%d", Pin);
-    write(fd, buffer, len);
-    
-    SYSFS_GPIO_Debug( "Export: Pin%d\r\n", Pin);
-
-    close(fd);
-    return 0;
-}
-
-int SYSFS_GPIO_Unexport(int Pin)
-{
-    char buffer[NUM_MAXBUF];
-    int len;
-    int fd;
-
-    fd = open("/sys/class/gpio/unexport", O_WRONLY);
-    if (fd < 0) {
-        SYSFS_GPIO_Debug( "unexport Failed: Pin%d\n", Pin);
-        return -1;
-    }
-
-    len = snprintf(buffer, NUM_MAXBUF, "%d", Pin);
-    write(fd, buffer, len);
-    
-    SYSFS_GPIO_Debug( "Unexport: Pin%d\r\n", Pin);
-    
-    close(fd);
-    return 0;
-}
-
-int SYSFS_GPIO_Direction(int Pin, int Dir)
-{
-    const char dir_str[]  = "in\0out";
-    char path[DIR_MAXSIZ];
-    int fd;
-    
-    snprintf(path, DIR_MAXSIZ, "/sys/class/gpio/gpio%d/direction", Pin);
-    fd = open(path, O_WRONLY);
-    if (fd < 0) {
-        SYSFS_GPIO_Debug( "Set Direction failed: Pin%d\n", Pin);
-        return -1;
-    }
-
-    if (write(fd, &dir_str[Dir == SYSFS_GPIO_IN ? 0 : 3], Dir == SYSFS_GPIO_IN ? 2 : 3) < 0) {
-        SYSFS_GPIO_Debug("failed to set direction!\r\n");
-        return -1;
-    }
-
-    if(Dir == SYSFS_GPIO_IN){
-        SYSFS_GPIO_Debug("Pin%d:intput\r\n", Pin);
-    }else{
-        SYSFS_GPIO_Debug("Pin%d:Output\r\n", Pin);
-    }
-    
-    close(fd);
-    return 0;
-}
-
-int SYSFS_GPIO_Read(int Pin)
-{
-    char path[DIR_MAXSIZ];
-    char value_str[3];
-    int fd;
-    
-    snprintf(path, DIR_MAXSIZ, "/sys/class/gpio/gpio%d/value", Pin);
-    fd = open(path, O_RDONLY);
-    if (fd < 0) {
-        SYSFS_GPIO_Debug( "Read failed Pin%d\n", Pin);
-        return -1;
-    }
-
-    if (read(fd, value_str, 3) < 0) {
-        SYSFS_GPIO_Debug( "failed to read value!\n");
-        return -1;
-    }
-
-    close(fd);
-    return(atoi(value_str));
-}
-
-int SYSFS_GPIO_Write(int Pin, int value)
-{
-    const char s_values_str[] = "01";
-    char path[DIR_MAXSIZ];
-    int fd;
-    
-    snprintf(path, DIR_MAXSIZ, "/sys/class/gpio/gpio%d/value", Pin);
-    fd = open(path, O_WRONLY);
-    if (fd < 0) {
-        SYSFS_GPIO_Debug( "Write failed : Pin%d,value = %d\n", Pin, value);
-        return -1;
-    }
-
-    if (write(fd, &s_values_str[value == SYSFS_GPIO_LOW ? 0 : 1], 1) < 0) {
-        SYSFS_GPIO_Debug( "failed to write value!\n");
-        return -1;
-    }
-    
-    close(fd);
-    return 0;
-}

+ 0 - 82
RaspberryPi_JetsonNano/c/lib/Config/RPI_sysfs_gpio.h

@@ -1,82 +0,0 @@
-/*****************************************************************************
-* | File        :   sysfs_gpio.h
-* | Author      :   Waveshare team
-* | Function    :   Drive SC16IS752 GPIO
-* | Info        :   Read and write /sys/class/gpio
-*----------------
-* |	This version:   V1.0
-* | Date        :   2019-06-04
-* | Info        :   Basic version
-*
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documnetation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to  whom the Software is
-# furished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-#
-******************************************************************************/
-#ifndef __SYSFS_GPIO_
-#define __SYSFS_GPIO_
-
-#include <stdio.h>
-
-#define SYSFS_GPIO_IN  0
-#define SYSFS_GPIO_OUT 1
-
-#define SYSFS_GPIO_LOW  0
-#define SYSFS_GPIO_HIGH 1
-
-#define NUM_MAXBUF  4
-#define DIR_MAXSIZ  60
-
-#define SYSFS_GPIO_DEBUG 0
-#if SYSFS_GPIO_DEBUG 
-	#define SYSFS_GPIO_Debug(__info,...) printf("Debug: " __info,##__VA_ARGS__)
-#else
-	#define SYSFS_GPIO_Debug(__info,...)  
-#endif 
-
-// BCM GPIO for Jetson nano
-#define GPIO4 4 // 7, 4
-#define GPIO17 7 // 11, 17
-#define GPIO18 18 // 12, 18
-#define GPIO27 27 // 13, 27
-#define GPIO22 22 // 15, 22
-#define GPIO23 23 // 16, 23
-#define GPIO24 24 // 18, 24
-#define SPI0_MOSI 10 // 19, 10
-#define SPI0_MISO 9 // 21, 9
-#define GPIO25 28 // 22, 25
-#define SPI0_SCK 11 // 23, 11
-#define SPI0_CS0 8 // 24, 8
-#define SPI0_CS1 7 // 26, 7
-#define GPIO5 5 // 29, 5
-#define GPIO6 6 // 31, 6
-#define GPIO12 12 // 32, 12
-#define GPIO13 13 // 33, 13
-#define GPIO19 19 // 35, 19
-#define GPIO16 16 // 36, 16
-#define GPIO26 26 // 37, 26
-#define GPIO20 20 // 38, 20
-#define GPIO21 21 // 40, 21
-
-int SYSFS_GPIO_Export(int Pin);
-int SYSFS_GPIO_Unexport(int Pin);
-int SYSFS_GPIO_Direction(int Pin, int Dir);
-int SYSFS_GPIO_Read(int Pin);
-int SYSFS_GPIO_Write(int Pin, int value);
-
-#endif

+ 0 - 229
RaspberryPi_JetsonNano/c/lib/e-Paper/EPD_13in3.c

@@ -1,229 +0,0 @@
-/*****************************************************************************
-* | File      	:  	EPD_13in3.c
-* | Author      :   Waveshare team
-* | Function    :   13.3inch e-paper
-* | Info        :
-*----------------
-* |	This version:   V1.0
-* | Date        :   2021-01-20
-* | Info        :
-* -----------------------------------------------------------------------------
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documnetation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to  whom the Software is
-# furished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-#
-******************************************************************************/
-#include "EPD_13in3.h"
-#include "Debug.h"
-
-/******************************************************************************
-function :	Software reset
-parameter:
-******************************************************************************/
-static void EPD_13IN3_Reset(void)
-{
-    DEV_Digital_Write(EPD_RST_PIN, 1);
-    DEV_Delay_ms(100);
-    DEV_Digital_Write(EPD_RST_PIN, 0);
-    DEV_Delay_ms(2);
-    DEV_Digital_Write(EPD_RST_PIN, 1);
-    DEV_Delay_ms(100);
-}
-
-/******************************************************************************
-function :	send command
-parameter:
-     Reg : Command register
-******************************************************************************/
-static void EPD_13IN3_SendCommand(UBYTE Reg)
-{
-    DEV_Digital_Write(EPD_DC_PIN, 0);
-    DEV_Digital_Write(EPD_CS_PIN, 0);
-    DEV_SPI_WriteByte(Reg);
-    DEV_Digital_Write(EPD_CS_PIN, 1);
-}
-
-/******************************************************************************
-function :	send data
-parameter:
-    Data : Write data
-******************************************************************************/
-static void EPD_13IN3_SendData(UBYTE Data)
-{
-    DEV_Digital_Write(EPD_DC_PIN, 1);
-    DEV_Digital_Write(EPD_CS_PIN, 0);
-    DEV_SPI_WriteByte(Data);
-    DEV_Digital_Write(EPD_CS_PIN, 1);
-}
-
-/******************************************************************************
-function :	Wait until the busy_pin goes LOW
-parameter:
-******************************************************************************/
-void EPD_13IN3_ReadBusy(void)
-{
-    Debug("e-Paper busy\r\n");
-	while(1)
-	{	 //=1 BUSY
-		if(DEV_Digital_Read(EPD_BUSY_PIN)==0) 
-			break;
-		DEV_Delay_ms(20);
-	}
-	DEV_Delay_ms(20);
-    Debug("e-Paper busy release\r\n");
-}
-
-/******************************************************************************
-function :	Turn On Display
-parameter:
-******************************************************************************/
-static void EPD_13IN3_TurnOnDisplay(void)
-{
-	EPD_13IN3_SendCommand(0x22); //Display Update Control
-	EPD_13IN3_SendData(0xC7);
-	EPD_13IN3_SendCommand(0x20); //Activate Display Update Sequence
-	EPD_13IN3_ReadBusy();
-}
-
-/******************************************************************************
-function :	Setting the display window
-parameter:
-******************************************************************************/
-static void EPD_13IN3_SetWindows(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend)
-{
-    EPD_13IN3_SendCommand(0x44); // SET_RAM_X_ADDRESS_START_END_POSITION
-    EPD_13IN3_SendData(Xstart & 0xFF);
-    EPD_13IN3_SendData((Xstart>>8) & 0x03);
-    EPD_13IN3_SendData(Xend & 0xFF);
-    EPD_13IN3_SendData((Xend>>8) & 0x03);
-	
-    EPD_13IN3_SendCommand(0x45); // SET_RAM_Y_ADDRESS_START_END_POSITION
-    EPD_13IN3_SendData(Ystart & 0xFF);
-    EPD_13IN3_SendData((Ystart>>8) & 0x03);
-    EPD_13IN3_SendData(Yend & 0xFF);
-    EPD_13IN3_SendData((Yend>>8) & 0x03);
-}
-
-/******************************************************************************
-function :	Set Cursor
-parameter:
-******************************************************************************/
-static void EPD_13IN3_SetCursor(UWORD Xstart, UWORD Ystart)
-{
-    EPD_13IN3_SendCommand(0x4E); // SET_RAM_X_ADDRESS_COUNTER
-    EPD_13IN3_SendData(Xstart & 0xFF);
-    EPD_13IN3_SendData((Xstart>>8) & 0x03);
-
-    EPD_13IN3_SendCommand(0x4F); // SET_RAM_Y_ADDRESS_COUNTER
-    EPD_13IN3_SendData(Ystart & 0xFF);
-    EPD_13IN3_SendData((Ystart>>8) & 0x03);
-}
-
-/******************************************************************************
-function :	Initialize the e-Paper register
-parameter:
-******************************************************************************/
-void EPD_13IN3_Init(void)
-{
-	EPD_13IN3_Reset();
-	DEV_Delay_ms(100);
-
-	EPD_13IN3_ReadBusy();   
-	EPD_13IN3_SendCommand(0x12);  //SWRESET
-	EPD_13IN3_ReadBusy();   
-
-	EPD_13IN3_SendCommand(0x0C); //set soft start     
-	EPD_13IN3_SendData(0xAE);
-	EPD_13IN3_SendData(0xC7);
-	EPD_13IN3_SendData(0xC3);
-	EPD_13IN3_SendData(0xC0);
-	EPD_13IN3_SendData(0x80);
-
-	EPD_13IN3_SendCommand(0x01);   //      drive output control    
-	EPD_13IN3_SendData(0xA7); //  Y  
-	EPD_13IN3_SendData(0x02); //  Y 
-	EPD_13IN3_SendData(0x00);
-
-	EPD_13IN3_SendCommand(0x11);        //    data  entry  mode
-	EPD_13IN3_SendData(0x03);           //       X-mode  x+ y-    
-
-	EPD_13IN3_SetWindows(0, 0, EPD_13IN3_WIDTH-1, EPD_13IN3_HEIGHT-1);
-
-	EPD_13IN3_SendCommand(0x3C);        // Border       Border setting 
-	EPD_13IN3_SendData(0x01);
-
-	EPD_13IN3_SendCommand(0x18); // use the internal temperature sensor
-	EPD_13IN3_SendData(0x80);
-
-    EPD_13IN3_SendCommand(0x22);  
-    EPD_13IN3_SendData(0xB1); 
-    EPD_13IN3_SendCommand(0x20); 
-	
-	EPD_13IN3_SetCursor(0, 0);
-	
-	EPD_13IN3_ReadBusy();
-}
-
-/******************************************************************************
-function :	Clear screen
-parameter:
-******************************************************************************/
-void EPD_13IN3_Clear(void)
-{
-	UWORD i, j;
-	UWORD height = EPD_13IN3_HEIGHT;
-	UWORD width = EPD_13IN3_WIDTH/8;	
-	
-	EPD_13IN3_SendCommand(0x24);   //write RAM for black(0)/white (1)
-	for(i=0; i<height; i++)
-	{
-		for(j=0; j<width; j++)
-			EPD_13IN3_SendData(0xff);
-	}
-	EPD_13IN3_TurnOnDisplay();
-}
-
-/******************************************************************************
-function :	Sends the image buffer in RAM to e-Paper and displays
-parameter:
-******************************************************************************/
-void EPD_13IN3_Display(UBYTE *Image)
-{
-	UWORD i, j;
-	UWORD height = EPD_13IN3_HEIGHT;
-	UWORD width = EPD_13IN3_WIDTH/8;
-	
-	EPD_13IN3_SendCommand(0x24);   //write RAM for black(0)/white (1)
-	for(i=0; i<height; i++)
-	{
-		for(j=0; j<width; j++)
-			EPD_13IN3_SendData(Image[j + i*width]);
-	}
-	EPD_13IN3_TurnOnDisplay();	
-}
-
-/******************************************************************************
-function :	Enter sleep mode
-parameter:
-******************************************************************************/
-void EPD_13IN3_Sleep(void)
-{
-	EPD_13IN3_SendCommand(0x10); //enter deep sleep
-	EPD_13IN3_SendData(0x03); 
-	DEV_Delay_ms(100);
-}

+ 0 - 45
RaspberryPi_JetsonNano/c/lib/e-Paper/EPD_13in3.h

@@ -1,45 +0,0 @@
-/*****************************************************************************
-* | File      	:   EPD_13in3.h
-* | Author      :   Waveshare team
-* | Function    :   13.3inch e-paper
-* | Info        :
-*----------------
-* |	This version:   V1.0
-* | Date        :   2021-01-20
-* | Info        :
-* -----------------------------------------------------------------------------
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documnetation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to  whom the Software is
-# furished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-#
-******************************************************************************/
-#ifndef __EPD_13IN3_H_
-#define __EPD_13IN3_H_
-
-#include "DEV_Config.h"
-
-// Display resolution
-#define EPD_13IN3_WIDTH       960
-#define EPD_13IN3_HEIGHT      680
-
-void EPD_13IN3_Init(void);
-void EPD_13IN3_Clear(void);
-void EPD_13IN3_Display(UBYTE *Image);
-void EPD_13IN3_Sleep(void);
-
-#endif

BIN
RaspberryPi_JetsonNano/python/lib/waveshare_epd/__init__.pyc


BIN
RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in7.pyc


BIN
RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in7_V2.pyc


BIN
RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in9_V2.pyc


BIN
RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd7in5_V2.pyc


BIN
RaspberryPi_JetsonNano/python/lib/waveshare_epd/epdconfig.pyc