/* Auto-generated config file hpl_slcd_config.h */ #ifndef HPL_SLCD_CONFIG_H #define HPL_SLCD_CONFIG_H // <<< Use Configuration Wizard in Context Menu >>> #include #include #include "pins.h" // Standard configuration // Number of COM Lines // Number of COM Lines // <0=>1 // <1=>2 // <2=>3 // <3=>4 // <4=>6 // <5=>8 // slcd_arch_com_num #ifndef CONF_SLCD_COM_NUM #define CONF_SLCD_COM_NUM 2 #endif // Number of Segment Lines <1-44> // Number of Segment Lines // slcd_arch_seg_num #ifndef CONF_SLCD_SEG_NUM #define CONF_SLCD_SEG_NUM 24 #endif #if CONF_SLCD_COM_NUM == SLCD_CTRLA_DUTY_SIXTH_Val && CONF_SLCD_SEG_NUM > 42 #warning Segment number should less than or equals to 42 #endif #if CONF_SLCD_COM_NUM == SLCD_CTRLA_DUTY_EIGHT_Val && CONF_SLCD_SEG_NUM > 40 #warning Segment number should less than or equals to 40 #endif // Bias // Bias Settting // <0=>STATIC // <1=>HALF // <2=>THIRD // <3=>FOURTH // slcd_arch_bias #ifndef CONF_SLCD_BIAS #define CONF_SLCD_BIAS 2 #endif #if CONF_SLCD_COM_NUM == 0 && CONF_SLCD_BIAS != 0 #warning Recommended Bias for 1 common terminal is STATIC #elif CONF_SLCD_COM_NUM == 1 && CONF_SLCD_BIAS != 1 #warning Recommended Bias for 2 Common Terminals is HALF #elif CONF_SLCD_COM_NUM <= 4 && CONF_SLCD_BIAS != 2 #warning Recommended Bias for 3/4/6 Common Terminals is THIRD #elif CONF_SLCD_COM_NUM == 5 && CONF_SLCD_BIAS != 3 #warning Recommended Bias for 8 Common Terminals is FOURTH #endif // Bias Buffer Enable // Enable Bias Buffer // slcd_arch_bben #ifndef CONF_SLCD_BBEN #define CONF_SLCD_BBEN 1 #endif // Bias Buffer Enable Duration <1-16> // Configure the enable duration of the bias buffer, unit is cycle of SLCD OSC clock source // slcd_arch_bbd #ifndef CONF_SLCD_BBD #define CONF_SLCD_BBD 2 #endif // Clock Prescaler // Setting for LCD frame frequency // <0=>16 // <1=>32 // <2=>64 // <3=>128 // slcd_arch_presc #ifndef CONF_SLCD_PRESC #define CONF_SLCD_PRESC 1 #endif // Clock Divider // Setting for LCD frame frequency // <0=>1 // <1=>2 // <2=>3 // <3=>4 // <4=>5 // <5=>6 // <6=>7 // <7=>8 // slcd_arch_ckdiv #ifndef CONF_SLCD_CKDIV #define CONF_SLCD_CKDIV 5 #endif /* TODO add frame frequency check */ // Reference Refresh Frequency // Setting for Reference Refresh Frequency // <0=>2kHz // <1=>1kHz // <2=>500Hz // <3=>250Hz // <4=>125Hz // <5=>62.5Hz // slcd_arch_rrf #ifndef CONF_SLCD_RRF #define CONF_SLCD_RRF 0 #endif // Power Refresh Frequency // Setting for Charge pump Refresh Frequency // <0=>2kHz // <1=>1kHz // <2=>500Hz // <3=>250Hz // slcd_arch_prf #ifndef CONF_SLCD_PRF #define CONF_SLCD_PRF 3 #endif // External VLCD // Setting for how VLCD is generated // slcd_arch_xvlcd #ifndef CONF_SLCD_XVLCD #define CONF_SLCD_XVLCD 0 #endif // Waveform Mode // Setting for Waveform Mode // <0=>Low Power Waveform(frame-inversion) // <1=>Standard Waveform Mode(bit-inversion) // slcd_arch_wmod #ifndef CONF_SLCD_WMOD #define CONF_SLCD_WMOD 0 #endif // Contrast Adjustment // The contrast of the LCD is determined by the value of VLCD voltage. // The higher the VLCD voltage, the higher is the contrast. // The software contrast adjustment is only possible in internal supply mode. // <0=>2.5056V // <1=>2.5731V // <2=>2.6379V // <3=>2.7054V // <4=>2.7729V // <5=>2.8404V // <6=>2.9052V // <7=>2.9727V // <8=>3.0402V // <9=>3.1077V // <10=>3.1725V // <11=>3.24V // <12=>3.3075V // <13=>3.375V // <14=>3.4398V // <15=>3.5073V // slcd_arch_contrast_adjust #ifndef CONF_SLCD_CONTRAST_ADJUST #define CONF_SLCD_CONTRAST_ADJUST 14 #endif // // Advanced configuration // slcd_arch_advanced_settings #ifndef CONF_SLCD_ADVANCED_SETTINGS #define CONF_SLCD_ADVANCED_SETTINGS 1 #endif // Run in standby // Indicates whether the SLCD will continue running in standby sleep mode or not // slcd_arch_runstdby #ifndef CONF_SLCD_RUNSTDBY #define CONF_SLCD_RUNSTDBY 1 #endif // #if SLCD_FRAME_FREQUENCY < 30 || SLCD_FRAME_FREQUENCY > 100 #warning The optimal frame frequency should be in range from 30Hz up to 100Hz to avoid flickering and ghosting effect. #endif #define SLCD_FC_MAX_MS (((0x1F + 1) * 8) * (1000 / SLCD_FRAME_FREQUENCY)) #define SLCD_FC_MIN_MS (1000 / SLCD_FRAME_FREQUENCY) #define SLCD_FC_BYPASS_MAX_MS ((0x1F + 1) * (1000 / SLCD_FRAME_FREQUENCY)) // Character Mapping Setting // slcd_arch_cm_setting #ifndef CONF_SLCD_CM_ENABLE #define CONF_SLCD_CM_ENABLE 0 #endif /** * character lookup table */ #ifndef CONF_SLCD_LPENL #define CONF_SLCD_LPENL (\ (uint32_t)1 << 0 | \ (uint32_t)1 << 1 | \ (uint32_t)1 << 2 | \ (uint32_t)1 << 3 | \ (uint32_t)1 << 4 | \ (uint32_t)1 << 5 | \ (uint32_t)1 << 6 | \ (uint32_t)1 << 7 | \ (uint32_t)1 << 11 | \ (uint32_t)1 << 12 | \ (uint32_t)1 << 13 | \ (uint32_t)1 << 14 | \ (uint32_t)1 << 21 | \ (uint32_t)1 << 22 | \ (uint32_t)1 << 23 | \ (uint32_t)1 << 24 | \ (uint32_t)1 << 25 | \ (uint32_t)1 << 28 | \ (uint32_t)1 << 29 | \ (uint32_t)1 << 30 | \ (uint32_t)1 << 31 | 0) #endif // CONF_SLCD_LPENL #ifndef CONF_SLCD_LPENH #define CONF_SLCD_LPENH (\ (uint32_t)1 << (32 - 32) | \ (uint32_t)1 << (33 - 32) | \ (uint32_t)1 << (34 - 32) | \ (uint32_t)1 << (35 - 32) | \ (uint32_t)1 << (42 - 32) | \ (uint32_t)1 << (43 - 32) | 0) #endif // CONF_SLCD_LPENH // <<< end of configuration section >>> #endif // HPL_SLCD_CONFIG_H