Creating a project for TT_Mxx
Embed:
(wiki syntax)
Show/hide line numbers
dm_platform.h
00001 #ifndef DM_PLATFORM_h 00002 #define DM_PLATFORM_h 00003 00004 #include "mbed.h" 00005 00006 00007 #define TEST_LCD 00008 00009 #define DM_TOOLCHAIN_MBED 00010 00011 00012 00013 #define LCD_MOSI_PIN D11 00014 #define LCD_MISO_PIN D12 00015 #define LCD_SPI_CL_PIN D13 00016 #define LCD_SPI_CS D10 00017 #define LCD_SPI_DC D7 00018 #define LCD_BL_PIN D9 00019 00020 00021 00022 #ifdef TEST_LCD_9314 00023 #define LCD_RD_PIN A0 00024 #define LCD_WR_PIN A1 00025 #define LCD_RS_PIN A2 00026 #define LCD_CS_PIN A3 00027 #define LCD_RST_PIN A4 00028 #endif 00029 00030 00031 // Clear bit, Set bit, High pulse, Low pulse, Boundary limits and Delay macros 00032 #define sbi(reg, _bitmask) (*(reg) = 1) 00033 #define cbi(reg, _bitmask) (*(reg) = 0) 00034 #define pulse_high(reg, _bitmask) do { *(reg) = 1; *(reg) = 0; } while(0) 00035 #define pulse_low(reg, _bitmask) do { *(reg) = 0; *(reg) = 1; } while(0) 00036 #define constrain(amt,low,high) ((amt)<=(low)?(low):((amt)>(high)?(high):(amt))) 00037 #define delay(ms) wait_ms(ms) 00038 00039 00040 00041 00042 00043 00044 00045 00046 #endif /* DM_PLATFORM_h */ 00047 00048
Generated on Tue Jul 12 2022 21:02:36 by 1.7.2