#define APP_COLLECTION_FEATURE_REPORT | ( | reportName, | |||
reportStruct | ) |
Value:
\ 0x09,0x01, \ 0xa1,0x01, \ 0x85,reportName, \ 0x09,USAGE(reportName), \ 0x15,0x00, \ 0x26,0xff,0x00, \ 0x75,0x08, \ 0x95,sizeof(reportStruct)-1, \ 0xb1,0x00, \ 0xC0
#define APP_COLLECTION_FEATURE_REPORT | ( | reportName, | |||
reportStruct | ) |
Value:
\ 0x09,0x01, \ 0xa1,0x01, \ 0x85,reportName, \ 0x09,USAGE(reportName), \ 0x15,0x00, \ 0x26,0xff,0x00, \ 0x75,0x08, \ 0x95,sizeof(reportStruct)-1, \ 0xb1,0x00, \ 0xC0
#define APP_COLLECTION_FEATURE_REPORT_LONG | ( | reportName, | |||
reportStruct | ) |
Value:
\ 0x09,0x01, \ 0xa1,0x01, \ 0x85,reportName, \ 0x09,USAGE(reportName), \ 0x15,0x00, \ 0x26,0xff,0x00, \ 0x75,0x08, \ 0x96,(sizeof(reportStruct)-1)%256, (sizeof(reportStruct)-1)/256, \ 0xb1,0x00, \ 0xC0
#define APP_COLLECTION_FEATURE_REPORT_LONG | ( | reportName, | |||
reportStruct | ) |
Value:
\ 0x09,0x01, \ 0xa1,0x01, \ 0x85,reportName, \ 0x09,USAGE(reportName), \ 0x15,0x00, \ 0x26,0xff,0x00, \ 0x75,0x08, \ 0x96,(sizeof(reportStruct)-1)%256, (sizeof(reportStruct)-1)/256, \ 0xb1,0x00, \ 0xC0
#define APP_COLLECTION_INPUT_REPORT | ( | reportName, | |||
reportStruct | ) |
Value:
\ 0x09,0x01, \ 0xa1,0x01, \ 0x85,reportName, \ 0x09,USAGE(reportName), \ 0x15,0x00, \ 0x26,0xff,0x00, \ 0x75,0x08, \ 0x95,sizeof(reportStruct)-1, \ 0x81,0x00, \ 0xC0
#define APP_COLLECTION_INPUT_REPORT | ( | reportName, | |||
reportStruct | ) |
Value:
\ 0x09,0x01, \ 0xa1,0x01, \ 0x85,reportName, \ 0x09,USAGE(reportName), \ 0x15,0x00, \ 0x26,0xff,0x00, \ 0x75,0x08, \ 0x95,sizeof(reportStruct)-1, \ 0x81,0x00, \ 0xC0
#define ENCRYPTION_BLOCK_SIZE 16 |
Encryption padding. Encryption requires that our buffers be a mutiple of the block size. In the encryption modes we're using 16 is the largest block size so we'll use that as our standard.
Additionally for decryption we want to know what the *expected* data size is, so we'll still need to know what the size of the plain-text data should be. This means that the padding for encryption should NOT be contained within the functional data structure for any given entity.
Keep in mind that standard padding says that if the plain-text block is a multiple of the block size already then we need to add an entire new block as padding.
#define ENCRYPTION_BLOCK_SIZE 16 |
Encryption padding. Encryption requires that our buffers be a mutiple of the block size. In the encryption modes we're using 16 is the largest block size so we'll use that as our standard.
Additionally for decryption we want to know what the *expected* data size is, so we'll still need to know what the size of the plain-text data should be. This means that the padding for encryption should NOT be contained within the functional data structure for any given entity.
Keep in mind that standard padding says that if the plain-text block is a multiple of the block size already then we need to add an entire new block as padding.
#define ENCRYPTION_PADDING | ( | _x_ | ) |
Value:
( ENCRYPTION_BLOCK_SIZE * \ ( 1 + sizeof( _x_ ) / ENCRYPTION_BLOCK_SIZE) - sizeof( _x_ ) )
#define ENCRYPTION_PADDING | ( | _x_ | ) |
Value:
( ENCRYPTION_BLOCK_SIZE * \ ( 1 + sizeof( _x_ ) / ENCRYPTION_BLOCK_SIZE) - sizeof( _x_ ) )
#define EPAD_ID_PRO_PID 0x2b |
#define EPAD_ID_PRO_PID 0x2b |
#define EPAD_ID_PRO_USAGE_PAGE 0xff00 |
#define EPAD_ID_PRO_USAGE_PAGE 0xff00 |
#define EPAD_PRO_INK_PID 0x29 |
#define EPAD_PRO_INK_PID 0x29 |
#define IE_VID 0x4df |
#define IE_VID 0x4df |
#define SERIAL_NUM_CHARS 16 |
#define SERIAL_NUM_CHARS 16 |
#define USAGE | ( | _x_ | ) | _x_ |
#define USAGE | ( | _x_ | ) | _x_ |
typedef struct tagBACKLIGHTINFO BACKLIGHT_INFO |
typedef struct WRITE_EEPROM_REPORT CLR_INK_REGION_REPORT |
typedef struct WRITE_EEPROM_REPORT DELETE_BITMAP_REPORT |
typedef struct WRITE_EEPROM_REPORT FILTER_TYPE_REPORT |
typedef struct tagINK_ENABLE_INFO INK_ENABLE_INFO |
typedef struct WRITE_EEPROM_REPORT LCD_CONTRAST_REPORT |
typedef ON_OFF_AUTO ON_OFF |
typedef struct WRITE_EEPROM_REPORT ONE_BYTE_REPORT |
typedef struct WRITE_EEPROM_REPORT OPEN_PEM_FILE_REPORT |
typedef struct WRITE_EEPROM_REPORT OPEN_TMP_FILE_REPORT |
typedef struct tagPAD_PROCESSOR_INFO PAD_PROCESSOR_INFO |
typedef struct tagBACKLIGHTINFO * PBACKLIGHT_INFO |
typedef struct BACKLIGHT_INFO_REPORT * PBACKLIGHT_INFO_REPORT |
typedef struct WRITE_EEPROM_REPORT * PCLR_INK_REGION_REPORT |
typedef struct CLRSCRN_DATA * PCLRSCRN_DATA |
typedef struct CLRSCRN_REPORT * PCLRSCRN_REPORT |
typedef struct CREATE_BITMAP_DATA * PCREATE_BITMAP_DATA |
typedef struct CREATE_BITMAP_REPORT * PCREATE_BITMAP_REPORT |
typedef struct DATA_ENCRYPTION_MODE_REPORT * PDATA_ENCRYPTION_MODE_REPORT |
typedef struct DATA_REPORT * PDATA_REPORT |
typedef struct DEFAULTS_DATA * PDEFAULTS_DATA |
typedef struct DEFAULTS_REPORT * PDEFAULTS_REPORT |
typedef struct WRITE_EEPROM_REPORT * PDELETE_BITMAP_REPORT |
typedef struct DRAW_LINE_DATA * PDRAW_LINE_DATA |
typedef struct DRAW_LINE_REPORT * PDRAW_LINE_REPORT |
typedef struct EEPROM_ADDR_DATA * PEEPROM_ADDR_DATA |
typedef struct EEPROM_ADDR_REPORT * PEEPROM_ADDR_REPORT |
typedef struct EXECUTE_TMP_REPORT * PEXECUTE_TMP_REPORT |
typedef struct FILE_DATA_CHUNK * PFILE_DATA_CHUNK |
typedef struct WRITE_EEPROM_REPORT * PFILTER_TYPE_REPORT |
typedef struct IMGCOPY_DATA * PIMGCOPY_DATA |
typedef struct IMGCOPY_REPORT * PIMGCOPY_REPORT |
typedef struct tagINK_ENABLE_INFO * PINK_ENABLE_INFO |
typedef struct INK_ENABLE_REPORT * PINK_ENABLE_REPORT |
typedef struct INK_REGION_DATA * PINK_REGION_DATA |
typedef struct INK_REGION_REPORT * PINK_REGION_REPORT |
typedef struct ITO_LCD_CAL * PITO_LCD_CAL |
typedef struct WRITE_EEPROM_REPORT * PLCD_CONTRAST_REPORT |
typedef struct LCD_INFO_REPORT * PLCD_INFO_REPORT |
typedef struct MAINTENANCE_PAYLOAD * PMAINTENANCE_PAYLOAD |
typedef struct WRITE_EEPROM_REPORT * PONE_BYTE_REPORT |
typedef struct ONE_BYTE_RPT_DATA * PONE_BYTE_RPT_DATA |
typedef struct WRITE_EEPROM_REPORT * POPEN_PEM_FILE_REPORT |
typedef struct OPEN_SYS_FILE_REPORT * POPEN_SYS_FILE_REPORT |
typedef struct WRITE_EEPROM_REPORT * POPEN_TMP_FILE_REPORT |
typedef struct PAD_INFO_DATA * PPAD_INFO_DATA |
typedef struct PAD_INFO_REPORT * PPAD_INFO_REPORT |
typedef struct tagPAD_PROCESSOR_INFO * PPAD_PROCESSOR_INFO |
typedef struct PAD_PROCESSOR_INFO_REPORT * PPAD_PROCESSOR_INFO_REPORT |
typedef union PADDED_USER_PREFERENCES * PPADDED_USER_PREFERENCES |
typedef struct WRITE_EEPROM_REPORT * PREAD_EEPROM_REPORT |
typedef struct READ_SYS_FILE_REPORT * PREAD_PEM_FILE_REPORT |
typedef struct READ_SYS_FILE_REPORT * PREAD_SYS_FILE_REPORT |
typedef struct READ_SYS_FILE_REPORT * PREAD_TMP_FILE_REPORT |
typedef struct WRITE_EEPROM_REPORT * PREPORT_RATE_REPORT |
typedef struct WRITE_EEPROM_REPORT * PSAVE_SETTINGS_REPORT |
typedef struct tagSERIAL_NUM_DATA * PSERIAL_NUM_DATA |
typedef struct SERIALNUM_REPORT * PSERIALNUM_REPORT |
typedef struct SYSCAL_DATA * PSYSCAL_DATA |
typedef struct SYSCAL_REPORT * PSYSCAL_REPORT |
typedef struct WRITE_EEPROM_REPORT * PUNUSED_PARAMETER_REPORT |
typedef struct USER_PREFERENCES_REPORT * PUSER_PREF |
typedef struct USER_PREFERENCES * PUSER_PREFERENCES |
typedef struct USER_PREFERENCES_REPORT * PUSER_PREFERENCES_REPORT |
typedef struct READ_SYS_FILE_REPORT * PWRITE_CRYPTO_TMP_FILE_REPORT |
typedef struct WRITE_EEPROM_REPORT * PWRITE_EEPROM_REPORT |
typedef struct READ_SYS_FILE_REPORT * PWRITE_EXEC_TMP_FILE_REPORT |
typedef struct WRITE_TEXT_INFO * PWRITE_TEXT_INFO |
typedef struct WRITE_TEXT_REPORT * PWRITE_TEXT_REPORT |
typedef struct READ_SYS_FILE_REPORT * PWRITE_TMP_FILE_REPORT |
typedef struct WRITE_EEPROM_REPORT READ_EEPROM_REPORT |
typedef struct READ_SYS_FILE_REPORT READ_PEM_FILE_REPORT |
typedef struct READ_SYS_FILE_REPORT READ_TMP_FILE_REPORT |
typedef struct WRITE_EEPROM_REPORT REPORT_RATE_REPORT |
typedef struct WRITE_EEPROM_REPORT SAVE_SETTINGS_REPORT |
typedef struct tagSERIAL_NUM_DATA SERIAL_NUM_DATA |
typedef INT8U T_BITMAP_ID |
typedef INT8U T_REPORT_ID |
typedef INT8U TLCD_COLOR_CODE |
typedef struct WRITE_EEPROM_REPORT UNUSED_PARAMETER_REPORT |
typedef struct USER_PREFERENCES_REPORT USER_PREF |
typedef struct READ_SYS_FILE_REPORT WRITE_CRYPTO_TMP_FILE_REPORT |
typedef struct READ_SYS_FILE_REPORT WRITE_EXEC_TMP_FILE_REPORT |
typedef struct READ_SYS_FILE_REPORT WRITE_TMP_FILE_REPORT |
00419 { 00420 DISP_COPY_IMAGE = 0, 00421 DISP_OR_IMAGE = 1, 00422 DISP_XOR_IMAGE = 2, 00423 DISP_AND_IMAGE = 3 00424 } BITMAP_DISP_IMAGECOPY_OPERATION;
enum BRIGHTNESS |
00525 { // LCD Backlight intensity settings 00526 BL_DIM = 0, 00527 BL_BRIGHT = 1 00528 } BRIGHTNESS;
enum ENCRYPTION_TYPE |
ENCRYPTION_NONE | |
ENCRYPTION_AES128_ECB | |
ENCRYPTION_AES192_ECB | |
ENCRYPTION_AES256_ECB | |
ENCRYPTION_DES64 | |
ENCRYPTION_3DES192 |
00247 { 00248 ENCRYPTION_NONE = 0, 00249 ENCRYPTION_AES128_ECB, 00250 ENCRYPTION_AES192_ECB, 00251 ENCRYPTION_AES256_ECB, 00252 ENCRYPTION_DES64, 00253 ENCRYPTION_3DES192 00254 } ENCRYPTION_TYPE;
enum EXE_FILE_TYPES |
00579 { 00580 EXEFILETYPE_JEFFERSON_EXE_FILE = 0, // Firmware upgrade executable file 00581 EXEFILETYPE_PEM_FILE = 1, // PEM file for Diffie Hellman key exchange 00582 EXEFILETYPE_BITMAP_FILE = 2 // Bitmap file 00583 } EXE_FILE_TYPES;
enum FILTER_TYPE |
00275 { 00276 SG_FILTER_NONE, 00277 SG_FILTER_5_2, 00278 SG_FILTER_7_3, 00279 SG_FILTER_9_4, 00280 SG_FILTER_11_5, 00281 SG_FILTER_13_5 00282 } FILTER_TYPE;
enum LCD_COLOR_CODE |
00350 { 00351 LCD_COLOR = 0, 00352 LCD_GRAYSCALE = 1, 00353 LCD_ALPHABLENDING = 2 00354 } LCD_COLOR_CODE;
enum ON_OFF_AUTO |
enum REPORT_ID |
Notes: Writing a bitmap FROM the host to the DEVICE:
HOST --> SET(F_CREATE_TMP) --> DEVICE HOST --> SET(F_WRITE_TMP) --> DEVICE ... HOST --> SET(F_EXEC_BITMAP_TMP) --> DEVICE
Assumptions:
Upper left of display is origin (0,0). Lower right of display is (maxX,maxY) bScreenId - 0 is the actual display / LCD RAM. bScreenId > 0 is not display RAM and is "offscreen" storage
Working with screens:
Assume LCD is 320x240
If I set SetBitmap(TBD,{a,b},{width,height},...} then I'm asking / sending a bitmap of size { width,height } logical pixels (which may be different the the # of bytes per pixel) that is a rectangular section located at position {a,b}.
Questions:
Do we want to have device-side fonts? If so, are this fixed or downloadable? 27-Jul-05 --> There is presently NO font support in the ePad. This may be added later...
00068 { 00069 // Basic functions 00070 R_DATA = 1, // IN - Data input report 00071 F_SERIAL, // GET - unit serial # 00072 F_SYSCAL, // GET|SET - system calibration 00073 F_DEFAULTS, // SET - defaults 00074 F_EEPROMADDR, // SET - current EEPROM address 00075 F_WRITEEPROM, // SET - writes data to the current EEPROM address 00076 F_READEEPROM, // GET - retrieves data from the current EEPROM address 00077 // 08-hex 00078 F_SAVESETTINGS, // SET - Saves the specified settings 00079 F_ENCRYPTION_MODE, // GET|SET - current encryption mode 00080 F_REPORTRATE, // GET|SET - current report rate 00081 F_PADINFO, // GET pad information 00082 00083 // LCD functions 00084 F_LCDINFO, // GET - display attributes 00085 F_DRAWLINE, // SET - Draw line on display 00086 F_CLRSCRN, // SET - Clear display to user-defined entity 00087 F_CREATE_BITMAP, // SET - Create blank bitmap file 00088 // 10-hex 00089 F_DEL_BITMAP, // SET - Deletes a bitmap image from the device 00090 F_IMAGE_COPY, // SET - Device-side copy with rescaling options 00091 F_CONTRAST, // GET|SET - the LCD contrast level (or turn LCD off if level = 0) 00092 F_INK_REGION, // GET|SET - a valid inking region 00093 F_CLR_INK_REGION, // SET - Clears the inking region (removes any ink trails from region) 00094 F_BACKLIGHT, // GET|SET the LCD backlight properties 00095 00106 F_OPEN_SYS_FILE, // SET - Opens the specified system file (private-key encrypted) 00107 F_READ_SYS_FILE, // GET - Reads data from the specified system file (private-key encrypted) 00108 00109 // Consolidation and rename of these commands forthcoming - see bugs 3317, 3318 and 3319 00110 // 18-hex 00111 F_OPEN_PEM_FILE, // SET - Opens device's DH PEM file ( for reading ) 00112 F_READ_PEM_FILE, // GET - Reads data from the DH PEM file 00113 00114 F_OPEN_TMP_FILE, // SET - Creates a new tmp file or Opens existing tmp file 00115 F_READ_TMP_FILE, // GET - Reads data from the opened tmp file 00116 F_WRITE_TMP_FILE, // SET - Writes data to the opened tmp file 00117 F_WRITE_EXEC_TMP_FILE, // SET - Writes data to the opened tmp file (private-key encrypted) 00118 F_WRITE_CRYPTO_TMP_FILE, // SET - Writes data to the opened tmp file w/o decrypting packet 00119 F_EXECUTE_TMP_FILE, // GET - Closes, decrypts, deploys the tmp file 00120 // End of commands affected by bugs 3317, 3318 and 3319 00121 // 20-hex 00122 F_USER_SETTINGS, // GET|SET user-defined settings for this device. 00123 F_FILTER, // GET|SET data filter type 00124 F_REBOOT, // SET - Restarts the device (never completes command over BUS) 00125 00126 F_INK_ENABLE, // SET - 'ping' message to keep inking enabled. 00127 F_PAD_PROC_INFO, // GET - Retrieves the version information from the pad processor stack 00128 00129 F_TEXT, // SET - writes text to the device 00130 00131 } REPORT_ID;
enum REPORT_RATE_CODE |
00265 { 00266 RATE_100 = 1, 00267 RATE_200 = 2, 00268 RATE_300 = 3, 00269 RATE_400 = 4 00270 } REPORT_RATE_CODE;
enum SCREEN_SAVER_MODE |
00602 { 00603 SCRN_SAVER_OFF = 0, 00604 SCRN_SAVER_BLANK, 00605 SCRN_SAVER_LINES 00606 } SCREEN_SAVER_MODE;