🎨 EXP headers, ST7920 delays (#22641)
This commit is contained in:
		
				
					committed by
					
						
						Scott Lahteine
					
				
			
			
				
	
			
			
			
						parent
						
							9b0e196ba2
						
					
				
				
					commit
					7704d84419
				
			@@ -39,6 +39,19 @@
 | 
			
		||||
#include <avr/interrupt.h>
 | 
			
		||||
#include <avr/io.h>
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Default graphical display delays
 | 
			
		||||
//
 | 
			
		||||
#if F_CPU >= 20000000
 | 
			
		||||
  #define CPU_ST7920_DELAY_1 DELAY_NS(150)
 | 
			
		||||
  #define CPU_ST7920_DELAY_2 DELAY_NS(  0)
 | 
			
		||||
  #define CPU_ST7920_DELAY_3 DELAY_NS(150)
 | 
			
		||||
#elif F_CPU == 16000000
 | 
			
		||||
  #define CPU_ST7920_DELAY_1 DELAY_NS(125)
 | 
			
		||||
  #define CPU_ST7920_DELAY_2 DELAY_NS(  0)
 | 
			
		||||
  #define CPU_ST7920_DELAY_3 DELAY_NS(188)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef pgm_read_ptr
 | 
			
		||||
  // Compatibility for avr-libc 1.8.0-4.1 included with Ubuntu for
 | 
			
		||||
  // Windows Subsystem for Linux on Windows 10 as of 10/18/2019
 | 
			
		||||
 
 | 
			
		||||
@@ -63,9 +63,9 @@ uint8_t _getc();
 | 
			
		||||
extern MSerialT usb_serial;
 | 
			
		||||
#define MYSERIAL1 usb_serial
 | 
			
		||||
 | 
			
		||||
#define ST7920_DELAY_1 DELAY_NS(600)
 | 
			
		||||
#define ST7920_DELAY_2 DELAY_NS(750)
 | 
			
		||||
#define ST7920_DELAY_3 DELAY_NS(750)
 | 
			
		||||
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
 | 
			
		||||
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
 | 
			
		||||
#define CPU_ST7920_DELAY_3 DELAY_NS(750)
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Interrupts
 | 
			
		||||
 
 | 
			
		||||
@@ -50,15 +50,9 @@ extern "C" volatile uint32_t _millis;
 | 
			
		||||
//
 | 
			
		||||
// Default graphical display delays
 | 
			
		||||
//
 | 
			
		||||
#ifndef ST7920_DELAY_1
 | 
			
		||||
  #define ST7920_DELAY_1 DELAY_NS(600)
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef ST7920_DELAY_2
 | 
			
		||||
  #define ST7920_DELAY_2 DELAY_NS(750)
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef ST7920_DELAY_3
 | 
			
		||||
  #define ST7920_DELAY_3 DELAY_NS(750)
 | 
			
		||||
#endif
 | 
			
		||||
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
 | 
			
		||||
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
 | 
			
		||||
#define CPU_ST7920_DELAY_3 DELAY_NS(750)
 | 
			
		||||
 | 
			
		||||
typedef ForwardSerial1Class< decltype(UsbSerial) > DefaultSerial1;
 | 
			
		||||
extern DefaultSerial1 USBSerial;
 | 
			
		||||
 
 | 
			
		||||
@@ -99,9 +99,9 @@ extern MSerialT serial_stream_3;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define ST7920_DELAY_1 DELAY_NS(600)
 | 
			
		||||
#define ST7920_DELAY_2 DELAY_NS(750)
 | 
			
		||||
#define ST7920_DELAY_3 DELAY_NS(750)
 | 
			
		||||
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
 | 
			
		||||
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
 | 
			
		||||
#define CPU_ST7920_DELAY_3 DELAY_NS(750)
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Interrupts
 | 
			
		||||
 
 | 
			
		||||
@@ -37,6 +37,13 @@
 | 
			
		||||
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Default graphical display delays
 | 
			
		||||
//
 | 
			
		||||
#define CPU_ST7920_DELAY_1 DELAY_NS(300)
 | 
			
		||||
#define CPU_ST7920_DELAY_2 DELAY_NS( 40)
 | 
			
		||||
#define CPU_ST7920_DELAY_3 DELAY_NS(340)
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Serial Ports
 | 
			
		||||
//
 | 
			
		||||
 
 | 
			
		||||
@@ -51,6 +51,13 @@
 | 
			
		||||
// Defines
 | 
			
		||||
// ------------------------
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Default graphical display delays
 | 
			
		||||
//
 | 
			
		||||
#define CPU_ST7920_DELAY_1 DELAY_NS(300)
 | 
			
		||||
#define CPU_ST7920_DELAY_2 DELAY_NS( 40)
 | 
			
		||||
#define CPU_ST7920_DELAY_3 DELAY_NS(340)
 | 
			
		||||
 | 
			
		||||
#ifndef STM32_FLASH_SIZE
 | 
			
		||||
  #if ANY(MCU_STM32F103RE, MCU_STM32F103VE, MCU_STM32F103ZE)
 | 
			
		||||
    #define STM32_FLASH_SIZE 512
 | 
			
		||||
 
 | 
			
		||||
@@ -36,9 +36,9 @@
 | 
			
		||||
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
 | 
			
		||||
#define ST7920_DELAY_1 DELAY_NS(600)
 | 
			
		||||
#define ST7920_DELAY_2 DELAY_NS(750)
 | 
			
		||||
#define ST7920_DELAY_3 DELAY_NS(750)
 | 
			
		||||
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
 | 
			
		||||
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
 | 
			
		||||
#define CPU_ST7920_DELAY_3 DELAY_NS(750)
 | 
			
		||||
 | 
			
		||||
//#undef MOTHERBOARD
 | 
			
		||||
//#define MOTHERBOARD BOARD_TEENSY31_32
 | 
			
		||||
 
 | 
			
		||||
@@ -37,9 +37,9 @@
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
#include <util/atomic.h>
 | 
			
		||||
 | 
			
		||||
#define ST7920_DELAY_1 DELAY_NS(600)
 | 
			
		||||
#define ST7920_DELAY_2 DELAY_NS(750)
 | 
			
		||||
#define ST7920_DELAY_3 DELAY_NS(750)
 | 
			
		||||
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
 | 
			
		||||
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
 | 
			
		||||
#define CPU_ST7920_DELAY_3 DELAY_NS(750)
 | 
			
		||||
 | 
			
		||||
// ------------------------
 | 
			
		||||
// Defines
 | 
			
		||||
 
 | 
			
		||||
@@ -41,9 +41,9 @@
 | 
			
		||||
  #include "../../feature/ethernet.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
//#define ST7920_DELAY_1 DELAY_NS(600)
 | 
			
		||||
//#define ST7920_DELAY_2 DELAY_NS(750)
 | 
			
		||||
//#define ST7920_DELAY_3 DELAY_NS(750)
 | 
			
		||||
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
 | 
			
		||||
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
 | 
			
		||||
#define CPU_ST7920_DELAY_3 DELAY_NS(750)
 | 
			
		||||
 | 
			
		||||
// ------------------------
 | 
			
		||||
// Defines
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user