Better handling of DELAY_NS and DELAY_US (#10716)
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
This commit is contained in:
@@ -176,19 +176,14 @@
|
||||
//
|
||||
// ST7920 Delays
|
||||
//
|
||||
|
||||
#define STM_NOP __asm__("nop\n\t")
|
||||
#define STM_DELAY_SHORT { STM_NOP; STM_NOP; STM_NOP; STM_NOP; }
|
||||
#define STM_DELAY_LONG { STM_DELAY_SHORT; STM_DELAY_SHORT; STM_NOP; STM_NOP; }
|
||||
|
||||
#ifndef ST7920_DELAY_1
|
||||
#define ST7920_DELAY_1 { STM_DELAY_SHORT; STM_DELAY_SHORT; }
|
||||
#define ST7920_DELAY_1 DELAY_NS(96)
|
||||
#endif
|
||||
|
||||
#ifndef ST7920_DELAY_2
|
||||
#define ST7920_DELAY_2 { STM_DELAY_SHORT; }
|
||||
#define ST7920_DELAY_2 DELAY_NS(48)
|
||||
#endif
|
||||
|
||||
#ifndef ST7920_DELAY_3
|
||||
#define ST7920_DELAY_3 { STM_DELAY_LONG; STM_DELAY_LONG; STM_DELAY_LONG; STM_DELAY_LONG; STM_DELAY_LONG; STM_DELAY_LONG; }
|
||||
#define ST7920_DELAY_3 DELAY_NS(715)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user