123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424 |
- #ifndef MODULE_LCM_CTRL_H_
- #define MODULE_LCM_CTRL_H_
- #include <stdint.h>
- #include <stdbool.h>
- #include "../Define/define.h"
- //------------------------------------------------------------------------------
- #define PREAUTHMONEY 2000
- #define RETURNIDLE_Timeout 60
- #define DEFAULT_AC_INDEX (2)
- #define TIME_MAX_SEC (2592000) // 一個月,秒數
- #define POWER_MAX_KW (5000)
- #define ENERGY_MAX_KWH (5000)
- #define CMD_TITLE_1 (0x5A)
- #define CMD_TITLE_2 (0xA5)
- #define CMD_READ (0x80)
- #define CMD_WRITE (0x81)
- #define CMD_MULTI_WRITE (0x82)
- #define CMD_MULTI_READ (0x83)
- #define CMD_BACKLIGHT (0x01)
- #define CMD_REGISTER (0x03)
- #define CMD_HEADER_1 0x5A
- #define CMD_HEADER_2 0xA5
- #define CMD_REG_WRITE 0x80
- #define CMD_REG_READ 0x81
- #define CMD_REG_WRITE_DATA 0x82
- #define CMD_REG_READ_DATA 0x83
- #define REG_ADDRESS_READ_VERSION 0x0F
- #define REG_ADDRESS_READ_RTC 0x10
- #define REG_ADDRESS_READ_PAGE_ID 0x14
- #define REG_ADDRESS_READ_BRIGHTNESS 0x31
- #define REG_ADDRESS_WRITE_BRIGHTNESS 0X82
- #define REG_ADDRESS_SET_PAGE_ID 0x84
- #define REG_ADDRESS_SET_RTC 0x9C
- #define REG_TYPE_CONTROL 0x00
- #define REG_TYPE_RAM 0x01
- #define REG_TYPE_SPECIAL_CONTROL 0x02
- #define _CHANGE_REMOTESTART 0x01
- #define _CHANGE_REFUNDING 0x02
- #define _CHANGE_REFUNDAMOUNT 0x03
- #define _CHANGE_NOREFUND 0x04
- #define _CHANGE_PREPAYMENTINFO 0x05
- #define _CHANGE_PAYMENT_OK 0x06
- #define _CHANGE_PAYMENT_FAIL 0x07
- //#define NOODOE_QR_CODE_URL "https://ev-alpha-test.noodoe.com/station?id=" ////For Audi
- #define _StatuIcon 0x1000
- #define _ConfirmStopIcon 0x1002
- #define _TccareIcon 0x1004
- #define _StartTouchIcon 0x1006
- #define _FurthureIcon 0x1010
- #define _WeatherIcon 0x1012
- #define _WelcomeIcon 0x1014
- #define _QRCodeIcon 0x1016
- #define _ExclamIcon 0x1018
- #define _PluginIcon 0x101A
- #define _PlugoutIcon 0x101C
- #define _ReturnIcon 0x101E
- #define _PrechargeIcon 0x1020
- #define _MinuteIcon 0x1026
- #define _Rate13Icon 0x1028
- #define _CompleteIcon 0x102A
- #define _KgIcon 0x102C
- #define _Rate14Icon 0x102E
- #define _ExitIcon 0x1030
- #define _FarewellIcon 0x1032
- #define _ChargingIcon 0x1034
- // Circle Battery Setting Icon
- #define _Battery_Circle 0x1036
- // Energy Bar
- #define _EnergyBar 0x1038
- // Prepare Bar
- #define _PrepareBar 0x103A
- // QRCode
- #define _QRCode_Authorize 0x1040
- #define _QRCode_Replug 0x1050
- #define _QRCode_Complete 0x1060
- #define _LeftGun_status 0x1070
- #define _RightGun_status 0x1072
- // Warm
- #define _Icon_Warming_0 0x1074
- #define _Icon_Warming_1 0x1076
- #define _Icon_Warming_2 0x1078
- #define _Icon_Warming_3 0x107A
- #define _Icon_Warming_4 0x107C
- // Touch
- #define _Touch_LeftGun 0x1080
- #define _Touch_RightGun 0x1082
- #define _Touch_Return 0x1084
- #define _Touch_IDLE 0x1086
- #define _Touch_Stop 0x1088
- #define _Touch_Stop_Confirm 0x108A
- #define _Touch_Stop_Cancel 0x108C
- #define _Touch_ConfirmLeft 0x1208
- #define _Touch_ConfirmRight 0x120A
- // Text String
- #define _Text_Power 0x1090
- #define _Text_Time 0x10A0
- #define _Text_Energy 0x10B0
- #define _Text_Money 0x10C0
- #define _Text_BatterySoc 0x10D0
- #define _Text_Carbon 0x10E0
- // Warming Code
- #define _Text_Warming_0 0x10F0
- #define _Text_Warming_1 0x1100
- #define _Text_Warming_2 0x1110
- #define _Text_Warming_3 0x1120
- #define _Text_Warming_4 0x1130
- #define _Text_Date 0x1140
- #define _Text_Tempture 0x1150
- #define _WeekIcon 0x1200
- #define _WeatherIcon 0x1202
- #define _LocationIcon 0x1204
- #define _StopChargeBtn 0x1206
- #define _ErrorIcon 0x120C
- #define _PayIcon 0x120E
- #define _ProgreePayIcon 0x1210
- #define _ConfirmLeftIcon 0x1212
- #define _ConfirmRightIcon 0x1214
- #define _PayFailLeftIcon 0x1216
- #define _PayFailRightIcon 0x1218
- // ICON Map Address
- enum _LCM_TCC_INDEX {
- _LCM_NONE = 0x00,
- _LCM_INIT,
- _LCM_AUTHORIZE_LEFT,
- _LCM_PLUGIN_LEFT,
- _LCM_PRECHARGE_LEFT,
- _LCM_CHARGING_LEFT,
- _LCM_COMPLETE_LEFT,
- _LCM_FUNCTION_SELECT_LEFT,
- _LCM_REFUND_SENSEING_LEFT,
- _LCM_REFUNDING_LEFT,
- _LCM_REFUND_COMPLETE_LEFT,
- _LCM_REFUND_NONE_LEFT,
- _LCM_MEMBER_SELECT_LEFT,
- _LCM_MEMBER_QR_LFET,
- _LCM_DONATE_LEFT,
- _LCM_DONATE_SELECT_LEFT,
- _LCM_PAY_SENSING_LEFT,
- _LCM_PAY_ETICKET_SUCCESS_LEFT,
- _LCM_PAY_MPAY_SUCCESS_LEFT,
- _LCM_PAY_FAIL_LEFT,
- _LCM_AUTHORIZE_RIGHT = 32,
- _LCM_PLUGIN_RIGHT,
- _LCM_PRECHARGE_RIGHT,
- _LCM_CHARGING_RIGHT,
- _LCM_COMPLETE_RIGHT,
- _LCM_FUNCTION_SELECT_RIGHT,
- _LCM_REFUND_SENSEING_RIGHT,
- _LCM_REFUNDING_RIGHT,
- _LCM_REFUND_COMPLETE_RIGHT,
- _LCM_REFUND_NONE_RIGHT,
- _LCM_MEMBER_SELECT_RIGHT,
- _LCM_MEMBER_QR_RIGHT,
- _LCM_DONATE_RIGHT,
- _LCM_DONATE_SELECT_RIGHT,
- _LCM_PAY_SENSING_RIGHT,
- _LCM_PAY_ETICKET_SUCCESS_RIGHT,
- _LCM_PAY_MPAY_SUCCESS_RIGHT,
- _LCM_PAY_FAIL_RIGHT,
- };
- enum _ICON_LIST_ {
- _ICON_Empty = 0,
- _ICON_StatusInit,
- _ICON_StatusAuthorize,
- _ICON_StatusCharge,
- _ICON_StatusComplete,
- _ICON_AllIdle,
- _ICON_LeftGunSelect,
- _ICON_RightGunSelect,
- _ICON_AllSelect,
- _ICON_TCCare,
- _ICON_StartTouch,
- _ICON_Furthure = 15,
- _ICON_Weather,
- _ICON_Welcome,
- _ICON_QRCode,
- _ICON_exclamation,
- _ICON_plugin,
- _ICON_Plugout,
- _ICON_Return,
- _ICON_PrepareCharge,
- _ICON_min = 26,
- _ICON_Rate_13,
- _ICON_Complete,
- _ICON_kg,
- _ICON_Rate_14,
- _ICON_Exit,
- _ICON_HaveANiceDay,
- _ICON_HaveANiceTrip,
- _ICON_SaftDrive,
- _ICON_Charging,
- _ICON_Battery_0 = 40,
- _ICON_Battery_1,
- _ICON_Battery_2,
- _ICON_Battery_3,
- _ICON_Battery_4,
- _ICON_Battery_5,
- _ICON_Battery_6,
- _ICON_Battery_7,
- _ICON_Battery_8,
- _ICON_Battery_9,
- _ICON_Battery_10,
- _ICON_Battery_11,
- _ICON_Battery_12,
- _ICON_Battery_13,
- _ICON_Battery_14,
- _ICON_Battery_15,
- _ICON_Battery_16,
- _ICON_Battery_17,
- _ICON_Battery_18,
- _ICON_Battery_19,
- _ICON_Battery_20,
- _ICON_Battery_21,
- _ICON_Battery_22,
- _ICON_Battery_23,
- _ICON_Battery_24,
- _ICON_Battery_25,
- _ICON_Battery_26,
- _ICON_Battery_27,
- _ICON_Battery_28,
- _ICON_Battery_29,
- _ICON_Battery_30,
- _ICON_Battery_31,
- _ICON_Battery_32,
- _ICON_Battery_33,
- _ICON_Battery_34,
- _ICON_Battery_35,
- _ICON_Battery_36,
- _ICON_Weather_Sun,
- _ICON_Weather_Cloudy,
- _ICON_Weather_Rain,
- _ICON_Weather_Thunder,
- _ICON_Weather_Snow,
- _ICON_Weather_Fog,
- /*
- _ICON_Bar_1,
- _ICON_Bar_2,
- _ICON_Bar_3,
- _ICON_Bar_4,
- _ICON_Bar_5,
- _ICON_Bar_6,
- _ICON_Bar_7,
- _ICON_Bar_8,
- _ICON_Bar_9,
- _ICON_Bar_10,
- */
- _ICON_PrePare_1 = 86,
- _ICON_PrePare_2,
- _ICON_PrePare_3,
- _ICON_PrePare_4,
- _ICON_PrePare_5,
- _ICON_PrePare_6,
- _ICON_PrePare_7,
- _ICON_PrePare_8,
- _ICON_PrePare_9,
- _ICON_PrePare_10,
- _ICON_PrePare_11,
- _ICON_PrePare_12,
- _ICON_PrePare_13,
- _ICON_PrePare_14,
- _ICON_Left_CCS1_Off,
- _ICON_Left_CCS2_Off,
- _ICON_Left_CHAdeMO_Off,
- _ICON_Left_CCS1_ON,
- _ICON_Left_CCS2_ON,
- _ICON_Left_CHAdeMO_ON,
- _ICON_Right_CCS1_Off,
- _ICON_Right_CCS2_Off,
- _ICON_Right_CHAdeMo_Off,
- _ICON_Right_CCS1_ON,
- _ICON_Right_CCS2_ON,
- _ICON_Right_CHAdeMO_ON,
- _ICON_WARMING,
- _ICON_SELECT_TEXT,
- _ICON_MONDAY,
- _ICON_TUESDAY,
- _ICON_WENSDAY,
- _ICON_THRUDAY,
- _ICON_FRIDAY,
- _ICON_SATURDAY,
- _ICON_SUNDAY,
- _ICON_LOCATION_TAIPEI,
- _ICON_PAYFAIL = 126,
- _ICON_PROGREEPAY_1,
- _ICON_PROGREEPAY_2,
- _ICON_PROGREEPAY_3,
- _ICON_PROGREEPAY_4,
- _ICON_PROGREEPAY_5,
- _ICON_PROGREEPAY_6,
- _ICON_PROGREEPAY_7,
- _ICON_PROGREEPAY_8,
- _ICON_PROGREEPAY_9,
- _ICON_PROGREEPAY_10,
- _ICON_PROGREEPAY_11,
- _ICON_PROGREEPAY_12,
- _ICON_PROGREEPAY_13,
- _ICON_PROGREEPAY_14,
- _ICON_PROGREEPAY_15,
- _ICON_STOPSERVICE,
- _ICON_WELCOMELEFTCCS1,
- _ICON_WELCOMELEFTCCS2,
- _ICON_WELCOMELEFTCHADEMO,
- _ICON_WELCOMERIGHTCCS1,
- _ICON_WELCOMERIGHTCCS2,
- _ICON_WELCOMERIGHTCHADEMO,
- _ICON_PAYFAILLEFTCCS1,
- _ICON_PAYFAILLEFTCCS2,
- _ICON_PAYFAILLETCHADEMO,
- _ICON_PAYFAILRIGHTCCS1,
- _ICON_PAYFAILRIGHTCCS2,
- _ICON_PAYFAILRIGHTCHADEMO,
- };
- /* Show Version */
- #define _Version_Cabient_Name_Text 0x0500
- #define _Version_Cabient_BootLoader_Text 0x0510
- #define _Version_Cabient_Kernel_Text 0x0520
- #define _Version_Cabient_CSU_Text 0x0530
- #define _Version_Cabient_Priamry_Text 0x0540
- #define _Version_Cabient_Relay0_Text 0x0550
- #define _Version_Cabient_Relay1_Text 0x0560
- #define _Version_Cabient_Fan_Text 0x0570
- #define _Version_Cabient_IPAddr_Text 0x0580
- #define _Version_Cabient_PSU1_Text 0x0590
- #define _Version_Cabient_PSU2_Text 0x05A0
- #define _Version_Cabient_PSU3_Text 0x05B0
- #define _Version_Cabient_PSU4_Text 0x05C0
- #define _Version_Cabient_PSU5_Text 0x05D0
- #define _Version_Cabient_PSU6_Text 0x05E0
- #define _Version_Cabient_PSU7_Text 0x05F0
- #define _Version_Cabient_PSU8_Text 0x0600
- #define _Version_Cabient_PSU9_Text 0x0610
- #define _Version_Cabient_PSU10_Text 0x0620
- #define _Version_Cabient_PSU11_Text 0x0630
- #define _Version_Cabient_PSU12_Text 0x0640
- #define _Version_Cabient_Primary_Text 0x0920
- #define _Version_Cabient_Secondary_Text 0x0930
- #define _Version_Cabient_Model_value 0x0650
- #define _Version_Cabient_BootLoader_value 0x0660
- #define _Version_Cabient_Kernel_value 0x0670
- #define _Version_Cabient_CSU_value 0x0680
- #define _Version_Cabient_Priamry_value 0x0690
- #define _Version_Cabient_Relay0_value 0x06A0
- #define _Version_Cabient_Relay1_value 0x06B0
- #define _Version_Cabient_Fan_value 0x06C0
- #define _Version_Cabient_IPAddr_value 0x06D0
- #define _Version_Cabient_PSU_Prim1_value 0x06E0
- #define _Version_Cabient_PSU_Prim2_value 0x06F0
- #define _Version_Cabient_PSU_Prim3_value 0x0700
- #define _Version_Cabient_PSU_Prim4_value 0x0710
- #define _Version_Cabient_PSU_Prim5_value 0x0720
- #define _Version_Cabient_PSU_Prim6_value 0x0730
- #define _Version_Cabient_PSU_Sec1_value 0x0740
- #define _Version_Cabient_PSU_Sec2_value 0x0750
- #define _Version_Cabient_PSU_Sec3_value 0x0760
- #define _Version_Cabient_PSU_Sec4_value 0x0770
- #define _Version_Cabient_PSU_Sec5_value 0x0780
- #define _Version_Cabient_PSU_Sec6_value 0x0790
- #define _Version_Cabient_PSU_Prim7_value 0x09E0
- #define _Version_Cabient_PSU_Prim8_value 0x09F0
- #define _Version_Cabient_PSU_Prim9_value 0x1000
- #define _Version_Cabient_PSU_Prim10_value 0x1010
- #define _Version_Cabient_PSU_Prim11_value 0x1020
- #define _Version_Cabient_PSU_Prim12_value 0x1030
- #define _Version_Cabient_PSU_Sec7_value 0x1040
- #define _Version_Cabient_PSU_Sec8_value 0x1050
- #define _Version_Cabient_PSU_Sec9_value 0x1060
- #define _Version_Cabient_PSU_Sec10_value 0x1070
- #define _Version_Cabient_PSU_Sec11_value 0x1080
- #define _Version_Cabient_PSU_Sec12_value 0x1090
- #define _Version_Dispenser_Name_Text 0x07A0
- #define _Version_Dispenser_BootLoader_Text 0x07B0
- #define _Version_Dispenser_Kernel_Text 0x07C0
- #define _Version_Dispenser_CSU_Text 0x07D0
- #define _Version_Dispenser_Relay_Text 0x07E0
- #define _Version_Dispenser_Fan_Text 0x07F0
- #define _Version_Dispenser_Priamry_Text 0x0800
- #define _Version_Dispenser_LCM_Text 0x0810
- #define _Version_Dispenser_LED_Text 0x0820
- #define _Version_Dispenser_Connector0_Text 0x0830
- #define _Version_Dispenser_Connector1_Text 0x0840
- #define _Version_Dispenser_IPAddr_Text 0x0850
- #define _Version_Dispenser_Model_value 0x0860
- #define _Version_Dispenser_BootLoader_value 0x0870
- #define _Version_Dispenser_Kernel_value 0x0880
- #define _Version_Dispenser_CSU_value 0x0890
- #define _Version_Dispenser_Relay_value 0x08A0
- #define _Version_Dispenser_Fan_value 0x08B0
- #define _Version_Dispenser_Priamry_value 0x08C0
- #define _Version_Dispenser_LCM_value 0x08D0
- #define _Version_Dispenser_LED_value 0x08E0
- #define _Version_Dispenser_Connector0_value 0x08F0
- #define _Version_Dispenser_Connector1_value 0x0900
- #define _Version_Dispenser_IPAddr_value 0x0910
- #endif //MODULE_LCM_CTRL_H_
|