mirror of
https://github.com/google/mozc-devices.git
synced 2025-11-08 16:53:28 +03:00
Add mozc double sided version.
Change-Id: I3c50b5c3435c3c01c79bfc14c5d605701a423356 Co-authored-by: Takashi Toyoshima <toyoshim@google.com> Co-authored-by: Shun Ikejima <ikejima@google.com> Reviewed-by: Eliot Courtney <edcourtney@google.com>
This commit is contained in:
171
mozc-doublesided/firmware/firmware.diff
Normal file
171
mozc-doublesided/firmware/firmware.diff
Normal file
@@ -0,0 +1,171 @@
|
||||
diff -cr orig/Core/Src/main.c ./Core/Src/main.c
|
||||
*** orig/Core/Src/main.c Fri Sep 27 02:22:08 2024
|
||||
--- ./Core/Src/main.c Fri Sep 27 02:22:08 2024
|
||||
***************
|
||||
*** 22,28 ****
|
||||
|
||||
/* Private includes ----------------------------------------------------------*/
|
||||
/* USER CODE BEGIN Includes */
|
||||
!
|
||||
/* USER CODE END Includes */
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
--- 22,28 ----
|
||||
|
||||
/* Private includes ----------------------------------------------------------*/
|
||||
/* USER CODE BEGIN Includes */
|
||||
! #include "mozc.h"
|
||||
/* USER CODE END Includes */
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
***************
|
||||
*** 99,111 ****
|
||||
MX_USB_DEVICE_Init();
|
||||
MX_SPI1_Init();
|
||||
/* USER CODE BEGIN 2 */
|
||||
!
|
||||
/* USER CODE END 2 */
|
||||
|
||||
/* Infinite loop */
|
||||
/* USER CODE BEGIN WHILE */
|
||||
while (1)
|
||||
{
|
||||
/* USER CODE END WHILE */
|
||||
|
||||
/* USER CODE BEGIN 3 */
|
||||
--- 99,112 ----
|
||||
MX_USB_DEVICE_Init();
|
||||
MX_SPI1_Init();
|
||||
/* USER CODE BEGIN 2 */
|
||||
! mozc_init();
|
||||
/* USER CODE END 2 */
|
||||
|
||||
/* Infinite loop */
|
||||
/* USER CODE BEGIN WHILE */
|
||||
while (1)
|
||||
{
|
||||
+ mozc_loop();
|
||||
/* USER CODE END WHILE */
|
||||
|
||||
/* USER CODE BEGIN 3 */
|
||||
diff -cr orig/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc/usbd_customhid.h ./Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc/usbd_customhid.h
|
||||
*** orig/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc/usbd_customhid.h Fri Sep 27 02:22:08 2024
|
||||
--- ./Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc/usbd_customhid.h Fri Sep 27 02:22:08 2024
|
||||
***************
|
||||
*** 42,48 ****
|
||||
* @{
|
||||
*/
|
||||
#define CUSTOM_HID_EPIN_ADDR 0x81U
|
||||
! #define CUSTOM_HID_EPIN_SIZE 0x02U
|
||||
|
||||
#define CUSTOM_HID_EPOUT_ADDR 0x01U
|
||||
#define CUSTOM_HID_EPOUT_SIZE 0x02U
|
||||
--- 42,48 ----
|
||||
* @{
|
||||
*/
|
||||
#define CUSTOM_HID_EPIN_ADDR 0x81U
|
||||
! #define CUSTOM_HID_EPIN_SIZE 0x11U
|
||||
|
||||
#define CUSTOM_HID_EPOUT_ADDR 0x01U
|
||||
#define CUSTOM_HID_EPOUT_SIZE 0x02U
|
||||
diff -cr orig/USB_DEVICE/App/usbd_custom_hid_if.c ./USB_DEVICE/App/usbd_custom_hid_if.c
|
||||
*** orig/USB_DEVICE/App/usbd_custom_hid_if.c Fri Sep 27 02:22:08 2024
|
||||
--- ./USB_DEVICE/App/usbd_custom_hid_if.c Fri Sep 27 02:22:08 2024
|
||||
***************
|
||||
*** 22,28 ****
|
||||
#include "usbd_custom_hid_if.h"
|
||||
|
||||
/* USER CODE BEGIN INCLUDE */
|
||||
!
|
||||
/* USER CODE END INCLUDE */
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
--- 22,28 ----
|
||||
#include "usbd_custom_hid_if.h"
|
||||
|
||||
/* USER CODE BEGIN INCLUDE */
|
||||
! #include "hid.h"
|
||||
/* USER CODE END INCLUDE */
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
***************
|
||||
*** 91,97 ****
|
||||
__ALIGN_BEGIN static uint8_t CUSTOM_HID_ReportDesc_FS[USBD_CUSTOM_HID_REPORT_DESC_SIZE] __ALIGN_END =
|
||||
{
|
||||
/* USER CODE BEGIN 0 */
|
||||
! 0x00,
|
||||
/* USER CODE END 0 */
|
||||
0xC0 /* END_COLLECTION */
|
||||
};
|
||||
--- 91,140 ----
|
||||
__ALIGN_BEGIN static uint8_t CUSTOM_HID_ReportDesc_FS[USBD_CUSTOM_HID_REPORT_DESC_SIZE] __ALIGN_END =
|
||||
{
|
||||
/* USER CODE BEGIN 0 */
|
||||
! 0x05, 0x01, /* USAGE_PAGE (Generic Desktop) */
|
||||
! 0x09, 0x06, /* USAGE (Keyboard) */
|
||||
! 0xa1, 0x01, /* COLLECTION (Application) */
|
||||
! 0x85, 0x01, /* REPORT ID (1) */
|
||||
! 0x05, 0x07, /* USAGE_PAGE (Keyboard) */
|
||||
! 0x19, 0xe0, /* USAGE_MINIMUM (224) */
|
||||
! 0x29, 0xe7, /* USAGE_MAXIMUM (231) */
|
||||
! 0x15, 0x00, /* LOGICAL_MINIMUM (0) */
|
||||
! 0x25, 0x01, /* LOGICAL_MAXIMUM (1) */
|
||||
! 0x75, 0x01, /* REPORT_SIZE (1) */
|
||||
! 0x95, 0x08, /* REPORT_COUNT (8) */
|
||||
! 0x81, 0x02, /* INPUT (Data,Var,Abs); Modifier byte */
|
||||
! 0x75, 0x08, /* REPORT_SIZE (8) */
|
||||
! 0x95, 0x01, /* REPORT_COUNT (1) */
|
||||
! 0x81, 0x01, /* INPUT (Constant); Reserved byte */
|
||||
! 0x75, 0x01, /* REPORT_SIZE (1) */
|
||||
! 0x95, 0x05, /* REPORT_COUNT (5) */
|
||||
! 0x05, 0x08, /* USAGE_PAGE (LEDs) */
|
||||
! 0x19, 0x01, /* USAGE_MINIMUM (1) */
|
||||
! 0x29, 0x05, /* USAGE_MAXIMUM (5) */
|
||||
! 0x91, 0x02, /* OUTPUT (Data,Var,Abs); LED report */
|
||||
! 0x75, 0x03, /* REPORT_SIZE (3) */
|
||||
! 0x95, 0x01, /* REPORT_COUNT (1) */
|
||||
! 0x91, 0x01, /* OUTPUT (Constant); LED report padding */
|
||||
! 0x75, 0x08, /* REPORT_SIZE (8) */
|
||||
! 0x95, 0x06, /* REPORT_COUNT (6) */
|
||||
! 0x15, 0x00, /* LOGICAL_MINIMUM (0) */
|
||||
! 0x25, 0x65, /* LOGICAL_MAXIMUM (101) */
|
||||
! 0x05, 0x07, /* USAGE_PAGE (Keyboard) */
|
||||
! 0x19, 0x00, /* USAGE_MINIMUM (0) */
|
||||
! 0x29, 0x65, /* USAGE_MAXIMUM (101) */
|
||||
! 0x81, 0x00, /* INPUT (Data,Ary,Abs) */
|
||||
! 0xC0, /* END_COLLECTION */
|
||||
! 0x05, 0x10, /* USAGE_PAGE (Unicode) */
|
||||
! 0x09, 0x00, /* USAGE (0) */
|
||||
! 0xa1, 0x01, /* COLLECTION (Application) */
|
||||
! 0x85, 0x02, /* REPORT ID (2) */
|
||||
! 0x75, 0x10, /* REPORT_SIZE (16) */
|
||||
! 0x95, 0x08, /* REPORT_COUNT (8) */
|
||||
! 0x15, 0x00, /* LOGICAL_MINIMUM (0) */
|
||||
! 0x27, 0xff, 0xff, 0x00, 0x00, /* LOGICAL_MAXIMUM (65535) */
|
||||
! 0x19, 0x00, /* USAGE_MINIMUM (0) */
|
||||
! 0x2a, 0xff, 0xff, /* USAGE_MAXIMUM (65535) */
|
||||
! 0x81, 0x00, /* INPUT (Data,Ary,Abs) */
|
||||
/* USER CODE END 0 */
|
||||
0xC0 /* END_COLLECTION */
|
||||
};
|
||||
***************
|
||||
*** 152,157 ****
|
||||
--- 195,201 ----
|
||||
static int8_t CUSTOM_HID_Init_FS(void)
|
||||
{
|
||||
/* USER CODE BEGIN 4 */
|
||||
+ hid_init();
|
||||
return (USBD_OK);
|
||||
/* USER CODE END 4 */
|
||||
}
|
||||
***************
|
||||
*** 163,168 ****
|
||||
--- 207,213 ----
|
||||
static int8_t CUSTOM_HID_DeInit_FS(void)
|
||||
{
|
||||
/* USER CODE BEGIN 5 */
|
||||
+ hid_deinit();
|
||||
return (USBD_OK);
|
||||
/* USER CODE END 5 */
|
||||
}
|
||||
Only in .: orig
|
||||
Reference in New Issue
Block a user