12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- /*
- * lcmComm_dwin.h
- *
- * Created on : 2020-10-20
- * Update on : 2022-03-01
- * Author : Folus Wen, Eason Yang
- * Version : V0.27
- *
- */
- #ifndef LCMCOMM_DGUS_H_
- #define LCMCOMM_DGUS_H_
- #include <sys/time.h>
- #include <sys/timeb.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/types.h>
- #include <sys/ioctl.h>
- #include <sys/socket.h>
- #include <sys/ipc.h>
- #include <sys/shm.h>
- #include <sys/shm.h>
- #include <sys/mman.h>
- #include <linux/wireless.h>
- #include <arpa/inet.h>
- #include <netinet/in.h>
- #include <unistd.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <fcntl.h>
- #include <termios.h>
- #include <errno.h>
- #include <errno.h>
- #include <string.h>
- #include <time.h>
- #include <ctype.h>
- #include <ifaddrs.h>
- #define ARRAY_SIZE(A) (sizeof(A) / sizeof(A[0]))
- #define PASS 1
- #define FAIL -1
- #define YES 1
- #define NO 0
- #define ON 1
- #define OFF 0
- #define PAGE_DISPLAY_PERIOD 3
- //=======================================
- // Register Control type
- //=======================================
- #define REG_TYPE_CONTROL 0x00
- #define REG_TYPE_RAM 0x01
- #define REG_TYPE_SPECIAL_CONTROL 0x02
- //=======================================
- // Register content (Variable storage)
- //=======================================
- #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
- //=======================================
- // LCD command constant
- //=======================================
- #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 CMD_ACK_VALUE_1 0x4F
- #define CMD_ACK_VALUE_2 0x4B
- extern int StoreLogMsg(const char *fmt, ...);
- extern int8_t lcdRegisterWrite(int32_t fd, uint16_t address, uint8_t *data, uint8_t dataLen);
- #endif /* LCMCOMM_DGUS_H_ */
|