still broken

This commit is contained in:
dekunukem
2022-01-02 00:05:30 +00:00
parent ec3218e821
commit 0d4c14ae4c
69 changed files with 1906 additions and 1881 deletions

View File

@@ -1,7 +1,7 @@
[PreviousGenFiles]
HeaderPath=C:/Users/allen/Desktop/repos/usb2ps2/firmware/adb/my_adb/Inc
HeaderPath=C:/Users/allen/Desktop/repos/usb2ps2/firmware/adb/Inc
HeaderFiles=stm32f0xx_it.h;stm32f0xx_hal_conf.h;main.h;
SourcePath=C:/Users/allen/Desktop/repos/usb2ps2/firmware/adb/my_adb/Src
SourcePath=C:/Users/allen/Desktop/repos/usb2ps2/firmware/adb/Src
SourceFiles=stm32f0xx_it.c;stm32f0xx_hal_msp.c;main.c;
[PreviousLibFiles]

View File

@@ -29,17 +29,17 @@
#define ADB_CHANGE_ADDR 0xFE
// #define DEBUG0_HI() HAL_GPIO_WritePin(DEBUG0_GPIO_Port, DEBUG0_Pin, GPIO_PIN_SET)
// #define DEBUG0_LOW() HAL_GPIO_WritePin(DEBUG0_GPIO_Port, DEBUG0_Pin, GPIO_PIN_RESET)
#define DEBUG0_HI() HAL_GPIO_WritePin(DEBUG0_GPIO_Port, DEBUG0_Pin, GPIO_PIN_SET)
#define DEBUG0_LOW() HAL_GPIO_WritePin(DEBUG0_GPIO_Port, DEBUG0_Pin, GPIO_PIN_RESET)
// #define DEBUG1_HI() HAL_GPIO_WritePin(DEBUG1_GPIO_Port, DEBUG1_Pin, GPIO_PIN_SET)
// #define DEBUG1_LOW() HAL_GPIO_WritePin(DEBUG1_GPIO_Port, DEBUG1_Pin, GPIO_PIN_RESET)
#define DEBUG1_HI() HAL_GPIO_WritePin(DEBUG1_GPIO_Port, DEBUG1_Pin, GPIO_PIN_SET)
#define DEBUG1_LOW() HAL_GPIO_WritePin(DEBUG1_GPIO_Port, DEBUG1_Pin, GPIO_PIN_RESET)
#define DEBUG0_HI() {}
#define DEBUG0_LOW() {}
// #define DEBUG0_HI() {}
// #define DEBUG0_LOW() {}
#define DEBUG1_HI() {}
#define DEBUG1_LOW() {}
// #define DEBUG1_HI() {}
// #define DEBUG1_LOW() {}
void adb_init(GPIO_TypeDef* data_port, uint16_t data_pin, GPIO_TypeDef* psw_port, uint16_t psw_pin);
@@ -49,6 +49,8 @@ void adb_reset(void);
void adb_release_lines(void);
uint8_t adb_send_response_16b(uint16_t data);
void wtf(void);
#ifdef __cplusplus
}
#endif

View File

@@ -86,6 +86,7 @@ void mouse_buf_init(mouse_buf *lb, uint8_t size);
uint8_t mouse_buf_add(mouse_buf *lb, mouse_event* event);
mouse_event* mouse_buf_peek(mouse_buf *lb);
void mouse_buf_pop(mouse_buf *lb);
void mouse_buf_reset(mouse_buf *lb);
#ifdef __cplusplus
}

View File

@@ -51,6 +51,10 @@
#define USER_LED_Pin GPIO_PIN_8
#define USER_LED_GPIO_Port GPIOB
#define DEBUG0_Pin GPIO_PIN_0
#define DEBUG0_GPIO_Port GPIOF
#define DEBUG1_Pin GPIO_PIN_1
#define DEBUG1_GPIO_Port GPIOF
#define ADB_PSW_Pin GPIO_PIN_0
#define ADB_PSW_GPIO_Port GPIOA
#define SLAVE_REQ_Pin GPIO_PIN_1

View File

File diff suppressed because one or more lines are too long

View File

@@ -234,42 +234,6 @@
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>../Src/main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>../Src/stm32f0xx_it.c</PathWithFileName>
<FilenameWithoutPath>stm32f0xx_it.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>../Src/stm32f0xx_hal_msp.c</PathWithFileName>
<FilenameWithoutPath>stm32f0xx_hal_msp.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\Src\adb.c</PathWithFileName>
<FilenameWithoutPath>adb.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
@@ -277,7 +241,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>6</FileNumber>
<FileNumber>3</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@@ -289,7 +253,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>7</FileNumber>
<FileNumber>4</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@@ -301,7 +265,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>8</FileNumber>
<FileNumber>5</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@@ -313,7 +277,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>9</FileNumber>
<FileNumber>6</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@@ -325,7 +289,7 @@
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>10</FileNumber>
<FileNumber>7</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@@ -335,6 +299,42 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>8</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>../Src/main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>9</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>../Src/stm32f0xx_it.c</PathWithFileName>
<FilenameWithoutPath>stm32f0xx_it.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>10</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>../Src/stm32f0xx_hal_msp.c</PathWithFileName>
<FilenameWithoutPath>stm32f0xx_hal_msp.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>

View File

@@ -338,7 +338,7 @@
<MiscControls></MiscControls>
<Define>USE_HAL_DRIVER,STM32F042x6</Define>
<Undefine></Undefine>
<IncludePath>../Inc;../Drivers/STM32F0xx_HAL_Driver/Inc;../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy;../Drivers/CMSIS/Device/ST/STM32F0xx/Include;../Drivers/CMSIS/Include</IncludePath>
<IncludePath>../Inc; ../Drivers/STM32F0xx_HAL_Driver/Inc; ../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy; ../Drivers/CMSIS/Device/ST/STM32F0xx/Include; ../Drivers/CMSIS/Include</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -392,21 +392,6 @@
<Group>
<GroupName>Application/User</GroupName>
<Files>
<File>
<FileName>main.c</FileName>
<FileType>1</FileType>
<FilePath>../Src/main.c</FilePath>
</File>
<File>
<FileName>stm32f0xx_it.c</FileName>
<FileType>1</FileType>
<FilePath>../Src/stm32f0xx_it.c</FilePath>
</File>
<File>
<FileName>stm32f0xx_hal_msp.c</FileName>
<FileType>1</FileType>
<FilePath>../Src/stm32f0xx_hal_msp.c</FilePath>
</File>
<File>
<FileName>adb.c</FileName>
<FileType>1</FileType>
@@ -437,6 +422,21 @@
<FileType>5</FileType>
<FilePath>..\Inc\helpers.h</FilePath>
</File>
<File>
<FileName>main.c</FileName>
<FileType>1</FileType>
<FilePath>../Src/main.c</FilePath>
</File>
<File>
<FileName>stm32f0xx_it.c</FileName>
<FileType>1</FileType>
<FilePath>../Src/stm32f0xx_it.c</FilePath>
</File>
<File>
<FileName>stm32f0xx_hal_msp.c</FileName>
<FileType>1</FileType>
<FilePath>../Src/stm32f0xx_hal_msp.c</FilePath>
</File>
</Files>
</Group>
<Group>

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

@@ -29,7 +29,7 @@ Project File Date: 01/01/2022
Build target 'my_adb'
compiling adb.c...
linking...
Program Size: Code=9612 RO-data=312 RW-data=60 ZI-data=1948
Program Size: Code=9092 RO-data=312 RW-data=60 ZI-data=1948
FromELF: creating hex file...
"my_adb\my_adb.axf" - 0 Error(s), 0 Warning(s).

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,11 @@
--cpu Cortex-M0
"my_adb\startup_stm32f042x6.o"
"my_adb\main.o"
"my_adb\stm32f0xx_it.o"
"my_adb\stm32f0xx_hal_msp.o"
"my_adb\adb.o"
"my_adb\delay_us.o"
"my_adb\helpers.o"
"my_adb\main.o"
"my_adb\stm32f0xx_it.o"
"my_adb\stm32f0xx_hal_msp.o"
"my_adb\stm32f0xx_hal_spi.o"
"my_adb\stm32f0xx_hal_spi_ex.o"
"my_adb\stm32f0xx_hal_tim.o"

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,120 +1,14 @@
Dependencies for Project 'my_adb', Target 'my_adb': (DO NOT MODIFY !)
CompilerVersion: 5060750::V5.06 update 6 (build 750)::ARMCC
F (startup_stm32f042x6.s)(0x61D0811D)(--cpu Cortex-M0 -g --apcs=interwork --pd "__MICROLIB SETA 1"
-I.\RTE\_my_adb
-IC:\Users\allen\AppData\Local\Arm\Packs\ARM\CMSIS\5.6.0\CMSIS\Core\Include
-IC:\Users\allen\AppData\Local\Arm\Packs\Keil\STM32F0xx_DFP\2.0.0\Drivers\CMSIS\Device\ST\STM32F0xx\Include
--pd "__UVISION_VERSION SETA 529" --pd "_RTE_ SETA 1" --pd "STM32F042x6 SETA 1"
--list startup_stm32f042x6.lst --xref -o my_adb\startup_stm32f042x6.o --depend my_adb\startup_stm32f042x6.d)
F (../Src/main.c)(0x61D0C8AF)(--c99 -c --cpu Cortex-M0 -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F0xx/Include -I ../Drivers/CMSIS/Include
-I.\RTE\_my_adb
-IC:\Users\allen\AppData\Local\Arm\Packs\ARM\CMSIS\5.6.0\CMSIS\Core\Include
-IC:\Users\allen\AppData\Local\Arm\Packs\Keil\STM32F0xx_DFP\2.0.0\Drivers\CMSIS\Device\ST\STM32F0xx\Include
-D__UVISION_VERSION="529" -D_RTE_ -DSTM32F042x6 -DUSE_HAL_DRIVER -DSTM32F042x6
-o my_adb\main.o --omf_browse my_adb\main.crf --depend my_adb\main.d)
I (../Inc/main.h)(0x61D0811B)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h)(0x5DFA0893)
I (../Inc/stm32f0xx_hal_conf.h)(0x61D0811B)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h)(0x5DFA0893)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h)(0x5DFA0880)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f042x6.h)(0x5DFA0880)
I (../Drivers/CMSIS/Include/core_cm0.h)(0x5DFA0892)
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5D9B4298)
I (../Drivers/CMSIS/Include/core_cmInstr.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/cmsis_armcc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/core_cmFunc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/system_stm32f0xx.h)(0x5DFA0880)
I (C:\Keil_v5\ARM\ARMCC\include\stdio.h)(0x5D9B429A)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_cortex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart_ex.h)(0x5DFA0893)
I (C:\Keil_v5\ARM\ARMCC\include\string.h)(0x5D9B4298)
I (C:\Keil_v5\ARM\ARMCC\include\stdlib.h)(0x5D9B429A)
I (../Inc/delay_us.h)(0x617487C7)
I (../Inc/shared.h)(0x617487BD)
I (../Inc/helpers.h)(0x61D0C243)
I (../Inc/adb.h)(0x61D0C1A5)
F (../Src/stm32f0xx_it.c)(0x61D0811B)(--c99 -c --cpu Cortex-M0 -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F0xx/Include -I ../Drivers/CMSIS/Include
-I.\RTE\_my_adb
-IC:\Users\allen\AppData\Local\Arm\Packs\ARM\CMSIS\5.6.0\CMSIS\Core\Include
-IC:\Users\allen\AppData\Local\Arm\Packs\Keil\STM32F0xx_DFP\2.0.0\Drivers\CMSIS\Device\ST\STM32F0xx\Include
-D__UVISION_VERSION="529" -D_RTE_ -DSTM32F042x6 -DUSE_HAL_DRIVER -DSTM32F042x6
-o my_adb\stm32f0xx_it.o --omf_browse my_adb\stm32f0xx_it.crf --depend my_adb\stm32f0xx_it.d)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h)(0x5DFA0893)
I (../Inc/stm32f0xx_hal_conf.h)(0x61D0811B)
I (../Inc/main.h)(0x61D0811B)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h)(0x5DFA0893)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h)(0x5DFA0880)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f042x6.h)(0x5DFA0880)
I (../Drivers/CMSIS/Include/core_cm0.h)(0x5DFA0892)
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5D9B4298)
I (../Drivers/CMSIS/Include/core_cmInstr.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/cmsis_armcc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/core_cmFunc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/system_stm32f0xx.h)(0x5DFA0880)
I (C:\Keil_v5\ARM\ARMCC\include\stdio.h)(0x5D9B429A)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_cortex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart_ex.h)(0x5DFA0893)
I (../Inc/stm32f0xx_it.h)(0x61D0811B)
F (../Src/stm32f0xx_hal_msp.c)(0x61D0811B)(--c99 -c --cpu Cortex-M0 -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F0xx/Include -I ../Drivers/CMSIS/Include
-I.\RTE\_my_adb
F (startup_stm32f042x6.s)(0x61D0CD73)(--cpu Cortex-M0 -g --apcs=interwork --pd "__MICROLIB SETA 1"
-I.\RTE\_my_adb
-IC:\Users\allen\AppData\Local\Arm\Packs\ARM\CMSIS\5.6.0\CMSIS\Core\Include
-IC:\Users\allen\AppData\Local\Arm\Packs\Keil\STM32F0xx_DFP\2.0.0\Drivers\CMSIS\Device\ST\STM32F0xx\Include
-o my_adb\stm32f0xx_hal_msp.o --omf_browse my_adb\stm32f0xx_hal_msp.crf --depend my_adb\stm32f0xx_hal_msp.d)
--pd "__UVISION_VERSION SETA 529" --pd "_RTE_ SETA 1" --pd "STM32F042x6 SETA 1"
--list startup_stm32f042x6.lst --xref -o my_adb\startup_stm32f042x6.o --depend my_adb\startup_stm32f042x6.d)
F (..\Src\adb.c)(0x61D0EB19)(--c99 -c --cpu Cortex-M0 -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F0xx/Include -I ../Drivers/CMSIS/Include
@@ -144,12 +38,12 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim_ex.h)(0x5DFA0893)
I (../Drivers/CMSIS/Include/core_cmInstr.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/cmsis_armcc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/core_cmFunc.h)(0x5DFA0892)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim_ex.h)(0x5DFA0893)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/system_stm32f0xx.h)(0x5DFA0880)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio_ex.h)(0x5DFA0893)
-I.\RTE\_my_adb
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_cortex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash_ex.h)(0x5DFA0893)
@@ -180,14 +74,14 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h)(0x5DFA0893)
I (../Inc/stm32f0xx_hal_conf.h)(0x61D0CD72)
I (../Inc/main.h)(0x61D0CD72)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_cortex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h)(0x5DFA0893)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h)(0x5DFA0880)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f042x6.h)(0x5DFA0880)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c_ex.h)(0x5DFA0893)
I (../Drivers/CMSIS/Include/core_cm0.h)(0x5DFA0892)
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5D9B4298)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi.h)(0x5DFA0893)
I (../Drivers/CMSIS/Include/core_cmInstr.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/cmsis_armcc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/core_cmFunc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/system_stm32f0xx.h)(0x5DFA0880)
I (C:\Keil_v5\ARM\ARMCC\include\stdio.h)(0x5D9B429A)
@@ -217,13 +111,119 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim_ex.h)(0x5DFA0893)
-IC:\Users\allen\AppData\Local\Arm\Packs\ARM\CMSIS\5.6.0\CMSIS\Core\Include
-IC:\Users\allen\AppData\Local\Arm\Packs\Keil\STM32F0xx_DFP\2.0.0\Drivers\CMSIS\Device\ST\STM32F0xx\Include
I (../Drivers/CMSIS/Include/cmsis_armcc.h)(0x5DFA0892)
-D__UVISION_VERSION="529" -D_RTE_ -DSTM32F042x6 -DUSE_HAL_DRIVER -DSTM32F042x6
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/system_stm32f0xx.h)(0x5DFA0880)
-o my_adb\helpers.o --omf_browse my_adb\helpers.crf --depend my_adb\helpers.d)
I (C:\Keil_v5\ARM\ARMCC\include\stdio.h)(0x5D9B429A)
I (C:\Keil_v5\ARM\ARMCC\include\string.h)(0x5D9B4298)
I (C:\Keil_v5\ARM\ARMCC\include\stdlib.h)(0x5D9B429A)
I (../Inc/helpers.h)(0x61D0D49B)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h)(0x5DFA0893)
I (../Inc/stm32f0xx_hal_conf.h)(0x61D0CD72)
I (../Inc/main.h)(0x61D0CD72)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h)(0x5DFA0893)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h)(0x5DFA0880)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f042x6.h)(0x5DFA0880)
I (../Drivers/CMSIS/Include/core_cm0.h)(0x5DFA0892)
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5D9B4298)
I (../Drivers/CMSIS/Include/core_cmInstr.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/cmsis_armcc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/core_cmFunc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/system_stm32f0xx.h)(0x5DFA0880)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_cortex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart_ex.h)(0x5DFA0893)
I (../Inc/shared.h)(0x617487BD)
F (..\Inc\adb.h)(0x61D0D12F)()
F (..\Inc\delay_us.h)(0x617487C7)()
F (..\Inc\helpers.h)(0x61D0D49B)()
F (../Src/main.c)(0x61D0E8CE)(--c99 -c --cpu Cortex-M0 -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F0xx/Include -I ../Drivers/CMSIS/Include
-I.\RTE\_my_adb
-IC:\Users\allen\AppData\Local\Arm\Packs\ARM\CMSIS\5.6.0\CMSIS\Core\Include
-IC:\Users\allen\AppData\Local\Arm\Packs\Keil\STM32F0xx_DFP\2.0.0\Drivers\CMSIS\Device\ST\STM32F0xx\Include
-D__UVISION_VERSION="529" -D_RTE_ -DSTM32F042x6 -DUSE_HAL_DRIVER -DSTM32F042x6
-o my_adb\main.o --omf_browse my_adb\main.crf --depend my_adb\main.d)
I (../Inc/main.h)(0x61D0CD72)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h)(0x5DFA0893)
I (../Inc/stm32f0xx_hal_conf.h)(0x61D0CD72)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h)(0x5DFA0893)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h)(0x5DFA0880)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f042x6.h)(0x5DFA0880)
I (../Drivers/CMSIS/Include/core_cm0.h)(0x5DFA0892)
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5D9B4298)
I (../Drivers/CMSIS/Include/core_cmInstr.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/cmsis_armcc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/core_cmFunc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/system_stm32f0xx.h)(0x5DFA0880)
I (C:\Keil_v5\ARM\ARMCC\include\stdio.h)(0x5D9B429A)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_cortex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart_ex.h)(0x5DFA0893)
I (C:\Keil_v5\ARM\ARMCC\include\string.h)(0x5D9B4298)
I (C:\Keil_v5\ARM\ARMCC\include\stdlib.h)(0x5D9B429A)
I (../Inc/delay_us.h)(0x617487C7)
I (../Inc/shared.h)(0x617487BD)
I (../Inc/helpers.h)(0x61D0D49B)
I (../Inc/adb.h)(0x61D0D12F)
F (../Src/stm32f0xx_it.c)(0x61D0CD72)(--c99 -c --cpu Cortex-M0 -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F0xx/Include -I ../Drivers/CMSIS/Include
-I.\RTE\_my_adb
-IC:\Users\allen\AppData\Local\Arm\Packs\ARM\CMSIS\5.6.0\CMSIS\Core\Include
-IC:\Users\allen\AppData\Local\Arm\Packs\Keil\STM32F0xx_DFP\2.0.0\Drivers\CMSIS\Device\ST\STM32F0xx\Include
-D__UVISION_VERSION="529" -D_RTE_ -DSTM32F042x6 -DUSE_HAL_DRIVER -DSTM32F042x6
-o my_adb\stm32f0xx_it.o --omf_browse my_adb\stm32f0xx_it.crf --depend my_adb\stm32f0xx_it.d)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h)(0x5DFA0893)
I (../Inc/stm32f0xx_hal_conf.h)(0x61D0CD72)
I (../Inc/main.h)(0x61D0CD72)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h)(0x5DFA0893)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h)(0x5DFA0880)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f042x6.h)(0x5DFA0880)
I (../Drivers/CMSIS/Include/core_cm0.h)(0x5DFA0892)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio_ex.h)(0x5DFA0893)
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5D9B4298)
I (../Drivers/CMSIS/Include/core_cmInstr.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/cmsis_armcc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/core_cmFunc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/system_stm32f0xx.h)(0x5DFA0880)
@@ -255,8 +255,8 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
-IC:\Users\allen\AppData\Local\Arm\Packs\Keil\STM32F0xx_DFP\2.0.0\Drivers\CMSIS\Device\ST\STM32F0xx\Include
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h)(0x5DFA0893)
I (../Inc/stm32f0xx_hal_conf.h)(0x61D0811B)
-D__UVISION_VERSION="529" -D_RTE_ -DSTM32F042x6 -DUSE_HAL_DRIVER -DSTM32F042x6
-o my_adb\stm32f0xx_hal_msp.o --omf_browse my_adb\stm32f0xx_hal_msp.crf --depend my_adb\stm32f0xx_hal_msp.d)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h)(0x5DFA0893)
I (../Inc/stm32f0xx_hal_conf.h)(0x61D0CD72)
@@ -288,8 +288,8 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim_ex.h)(0x5DFA0893)
F (..\Inc\delay_us.h)(0x617487C7)()
F (..\Inc\helpers.h)(0x61D0C243)()
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart_ex.h)(0x5DFA0893)
F (../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi.c)(0x5DFA0893)(--c99 -c --cpu Cortex-M0 -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F0xx/Include -I ../Drivers/CMSIS/Include
-I.\RTE\_my_adb
@@ -321,8 +321,8 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_cortex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr.h)(0x5DFA0893)
@@ -354,8 +354,8 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/CMSIS/Include/core_cm0.h)(0x5DFA0892)
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5D9B4298)
I (../Drivers/CMSIS/Include/core_cmInstr.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/cmsis_armcc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/core_cmFunc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/cmsis_armcc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/core_cmFunc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/system_stm32f0xx.h)(0x5DFA0880)
I (C:\Keil_v5\ARM\ARMCC\include\stdio.h)(0x5D9B429A)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc_ex.h)(0x5DFA0893)
@@ -387,8 +387,8 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
-D__UVISION_VERSION="529" -D_RTE_ -DSTM32F042x6 -DUSE_HAL_DRIVER -DSTM32F042x6
-o my_adb\stm32f0xx_hal_tim.o --omf_browse my_adb\stm32f0xx_hal_tim.crf --depend my_adb\stm32f0xx_hal_tim.d)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h)(0x5DFA0893)
I (../Inc/stm32f0xx_hal_conf.h)(0x61D0811B)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h)(0x5DFA0893)
I (../Inc/stm32f0xx_hal_conf.h)(0x61D0CD72)
I (../Inc/main.h)(0x61D0CD72)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h)(0x5DFA0893)
@@ -420,8 +420,8 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart_ex.h)(0x5DFA0893)
F (../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim_ex.c)(0x5DFA0893)(--c99 -c --cpu Cortex-M0 -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F0xx/Include -I ../Drivers/CMSIS/Include
-I.\RTE\_my_adb
-I.\RTE\_my_adb
-IC:\Users\allen\AppData\Local\Arm\Packs\ARM\CMSIS\5.6.0\CMSIS\Core\Include
@@ -453,8 +453,8 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi_ex.h)(0x5DFA0893)
@@ -486,8 +486,8 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/CMSIS/Include/cmsis_armcc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/core_cmFunc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/system_stm32f0xx.h)(0x5DFA0880)
I (C:\Keil_v5\ARM\ARMCC\include\stdio.h)(0x5D9B429A)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc_ex.h)(0x5DFA0893)
I (C:\Keil_v5\ARM\ARMCC\include\stdio.h)(0x5D9B429A)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma.h)(0x5DFA0893)
@@ -519,8 +519,8 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h)(0x5DFA0893)
I (../Inc/stm32f0xx_hal_conf.h)(0x61D0CD72)
I (../Inc/main.h)(0x61D0CD72)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h)(0x5DFA0893)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h)(0x5DFA0880)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f042x6.h)(0x5DFA0880)
I (../Drivers/CMSIS/Include/core_cm0.h)(0x5DFA0892)
@@ -552,8 +552,8 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
-I.\RTE\_my_adb
-IC:\Users\allen\AppData\Local\Arm\Packs\ARM\CMSIS\5.6.0\CMSIS\Core\Include
-IC:\Users\allen\AppData\Local\Arm\Packs\ARM\CMSIS\5.6.0\CMSIS\Core\Include
-IC:\Users\allen\AppData\Local\Arm\Packs\Keil\STM32F0xx_DFP\2.0.0\Drivers\CMSIS\Device\ST\STM32F0xx\Include
-D__UVISION_VERSION="529" -D_RTE_ -DSTM32F042x6 -DUSE_HAL_DRIVER -DSTM32F042x6
@@ -585,8 +585,8 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
@@ -618,8 +618,8 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (C:\Keil_v5\ARM\ARMCC\include\stdio.h)(0x5D9B429A)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_cortex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash.h)(0x5DFA0893)
@@ -651,8 +651,8 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h)(0x5DFA0893)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h)(0x5DFA0880)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f042x6.h)(0x5DFA0880)
I (../Drivers/CMSIS/Include/core_cm0.h)(0x5DFA0892)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f042x6.h)(0x5DFA0880)
I (../Drivers/CMSIS/Include/core_cm0.h)(0x5DFA0892)
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5D9B4298)
I (../Drivers/CMSIS/Include/core_cmInstr.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/cmsis_armcc.h)(0x5DFA0892)
@@ -684,8 +684,8 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
-IC:\Users\allen\AppData\Local\Arm\Packs\ARM\CMSIS\5.6.0\CMSIS\Core\Include
-IC:\Users\allen\AppData\Local\Arm\Packs\Keil\STM32F0xx_DFP\2.0.0\Drivers\CMSIS\Device\ST\STM32F0xx\Include
-D__UVISION_VERSION="529" -D_RTE_ -DSTM32F042x6 -DUSE_HAL_DRIVER -DSTM32F042x6
-D__UVISION_VERSION="529" -D_RTE_ -DSTM32F042x6 -DUSE_HAL_DRIVER -DSTM32F042x6
-o my_adb\stm32f0xx_hal_i2c.o --omf_browse my_adb\stm32f0xx_hal_i2c.crf --depend my_adb\stm32f0xx_hal_i2c.d)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h)(0x5DFA0893)
@@ -717,8 +717,8 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_spi_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart_ex.h)(0x5DFA0893)
F (../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c_ex.c)(0x5DFA0893)(--c99 -c --cpu Cortex-M0 -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc -I ../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F0xx/Include -I ../Drivers/CMSIS/Include
@@ -750,8 +750,8 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_cortex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_cortex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash_ex.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c.h)(0x5DFA0893)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c_ex.h)(0x5DFA0893)
@@ -783,8 +783,8 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h)(0x5DFA0893)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f042x6.h)(0x5DFA0880)
I (../Drivers/CMSIS/Include/core_cm0.h)(0x5DFA0892)
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5D9B4298)
I (../Drivers/CMSIS/Include/core_cmInstr.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/cmsis_armcc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/core_cmInstr.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/cmsis_armcc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/core_cmFunc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/system_stm32f0xx.h)(0x5DFA0880)
I (C:\Keil_v5\ARM\ARMCC\include\stdio.h)(0x5D9B429A)
@@ -824,8 +824,8 @@ I (../Drivers/CMSIS/Include/cmsis_armcc.h)(0x5DFA0892)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h)(0x5DFA0893)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h)(0x5DFA0880)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f042x6.h)(0x5DFA0880)
I (../Drivers/CMSIS/Include/core_cm0.h)(0x5DFA0892)
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5D9B4298)
I (../Drivers/CMSIS/Include/core_cm0.h)(0x5DFA0892)
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5D9B4298)
I (../Drivers/CMSIS/Include/core_cmInstr.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/cmsis_armcc.h)(0x5DFA0892)
I (../Drivers/CMSIS/Include/core_cmFunc.h)(0x5DFA0892)

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

@@ -243,7 +243,7 @@ uint8_t adb_write_16(uint16_t data)
// to be called right after a LISTEN command from host
uint8_t adb_send_response_16b(uint16_t data)
{
delay_us(170); // stop-to-start time
delay_us(200); // stop-to-start time
ADB_DATA_LOW();
delay_us(35);
ADB_DATA_HI();
@@ -283,8 +283,9 @@ uint8_t adb_listen_16b(uint16_t* data)
return ADB_OK;
}
uint8_t last_cmd;
// addr 2 keyboard, 3 mouse
uint32_t last_send;
uint8_t parse_adb_cmd(uint8_t data)
{
uint8_t addr = data >> 4;
@@ -299,20 +300,16 @@ uint8_t parse_adb_cmd(uint8_t data)
uint16_t response = 0x6001; // 0110 0000 0000 0001, device handler 0x1, 100dps apple desktop bus mouse
uint16_t rand_id = (rand() % 0xf) << 8;
response |= rand_id;
DEBUG1_HI();
adb_send_response_16b(response);
DEBUG1_LOW();
}
if(cmd == ADB_CMD_TYPE_TALK && reg == 3 && addr == adb_kb_current_addr)
{
uint16_t response = 0x6005; // 0110 0000 0000 0101, device handler 0x5, appledesign keyboard
uint16_t rand_id = (rand() % 0xf) << 8;
response |= rand_id;
DEBUG1_HI();
adb_send_response_16b(response);
DEBUG1_LOW();
}
// if(cmd == ADB_CMD_TYPE_TALK && reg == 3 && addr == adb_kb_current_addr)
// {
// uint16_t response = 0x6005; // 0110 0000 0000 0101, device handler 0x5, appledesign keyboard
// uint16_t rand_id = (rand() % 0xf) << 8;
// response |= rand_id;
// adb_send_response_16b(response);
// }
if(cmd == ADB_CMD_TYPE_LISTEN && reg == 3 && addr == adb_mouse_current_addr)
{
@@ -322,31 +319,38 @@ uint8_t parse_adb_cmd(uint8_t data)
adb_mouse_current_addr = (host_cmd & 0xf00) >> 8;
}
if(cmd == ADB_CMD_TYPE_LISTEN && reg == 3 && addr == adb_kb_current_addr)
{
uint16_t host_cmd;
adb_listen_16b(&host_cmd);
if((host_cmd & ADB_CHANGE_ADDR) == ADB_CHANGE_ADDR)
adb_kb_current_addr = (host_cmd & 0xf00) >> 8;
}
// if(cmd == ADB_CMD_TYPE_LISTEN && reg == 3 && addr == adb_kb_current_addr)
// {
// uint16_t host_cmd;
// adb_listen_16b(&host_cmd);
// if((host_cmd & ADB_CHANGE_ADDR) == ADB_CHANGE_ADDR)
// adb_kb_current_addr = (host_cmd & 0xf00) >> 8;
// }
if(cmd == ADB_CMD_TYPE_TALK && reg == 0 && addr == adb_mouse_current_addr && HAL_GetTick() - last_send > 500)
{
uint16_t response = 0x8082;
if(HAL_GetTick() % 2)
response = 0x80fc;
adb_send_response_16b(response);
last_send = HAL_GetTick();
}
// if(data != last_cmd)
// {
// DEBUG0_HI();
// printf("%x %x\n", data, adb_mouse_current_addr);
// DEBUG0_LOW();
// last_cmd = data;
// }
if(cmd == ADB_CMD_TYPE_TALK && reg == 0 && addr == adb_kb_current_addr && HAL_GetTick() - last_send > 500)
return ADB_KB_POLL;
if(cmd == ADB_CMD_TYPE_TALK && reg == 0 && addr == adb_mouse_current_addr)
return ADB_MOUSE_POLL;
// if(cmd == ADB_CMD_TYPE_TALK && reg == 0 && addr == adb_kb_current_addr)
// return ADB_KB_POLL;
return ADB_OK;
}
void wtf(void)
{
// DEBUG0_HI();
// printf("%d\n", adb_mouse_current_addr);
// DEBUG0_LOW();
}

View File

@@ -58,7 +58,6 @@
/* USER CODE END Includes */
/* Private variables ---------------------------------------------------------*/
SPI_HandleTypeDef hspi1;
@@ -168,7 +167,7 @@ void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi)
else if(backup_spi1_recv_buf[SPI_BUF_INDEX_MSG_TYPE] == SPI_MOSI_MSG_TYPE_MOUSE_EVENT)
{
latest_mouse_event.movement_x = byte_to_int16_t(backup_spi1_recv_buf[4], backup_spi1_recv_buf[5]);
latest_mouse_event.movement_y = -1 * byte_to_int16_t(backup_spi1_recv_buf[6], backup_spi1_recv_buf[7]);
latest_mouse_event.movement_y = 1 * byte_to_int16_t(backup_spi1_recv_buf[6], backup_spi1_recv_buf[7]);
latest_mouse_event.scroll_vertical = -1 * byte_to_int16_t(backup_spi1_recv_buf[8], backup_spi1_recv_buf[9]);
latest_mouse_event.button_left = backup_spi1_recv_buf[13];
latest_mouse_event.button_right = backup_spi1_recv_buf[14];
@@ -240,22 +239,33 @@ void protocol_status_lookup_init(void)
protocol_status_lookup[PROTOCOL_ADB_KB] = PROTOCOL_STATUS_ENABLED;
protocol_status_lookup[PROTOCOL_ADB_MOUSE] = PROTOCOL_STATUS_ENABLED;
}
uint32_t last_send;
void adb_mouse_update(void)
{
mouse_event* this_mouse_event = mouse_buf_peek(&my_mouse_buf);
if(this_mouse_event == NULL)
return;
// printf("%d %d\n", this_mouse_event->movement_x, this_mouse_event->movement_y);
uint16_t response = 0;
if(this_mouse_event->button_left)
if(this_mouse_event->button_left == 0)
response |= 0x8000;
if(this_mouse_event->button_right)
if(this_mouse_event->button_right == 0)
response |= 0x80;
response |= ((uint8_t)(this_mouse_event->movement_x)) & 0x7f;
response |= (((uint8_t)(this_mouse_event->movement_y)) & 0x7f) << 8;
adb_send_response_16b(response);
printf("0x%x\n", response);
mouse_buf_pop(&my_mouse_buf);
if(0 || HAL_GetTick() - last_send > 300)
{
DEBUG1_HI();
adb_send_response_16b(0x8080);
// printf("0x%x\n", response);
DEBUG1_LOW();
last_send = HAL_GetTick();
}
mouse_buf_reset(&my_mouse_buf);
}
/* USER CODE END 0 */
@@ -298,7 +308,6 @@ int main(void)
protocol_status_lookup_init();
kb_buf_init(&my_kb_buf, 16);
mouse_buf_init(&my_mouse_buf, 16);
fputc('%', NULL);
uint8_t adb_data, adb_status;
adb_init(ADB_DATA_GPIO_Port, ADB_DATA_Pin, ADB_PSW_GPIO_Port, ADB_PSW_Pin);
@@ -316,15 +325,24 @@ int main(void)
/* USER CODE BEGIN 3 */
adb_status = adb_recv_cmd(&adb_data, 0);
// printf("%d\n", adb_status);
if(adb_status == ADB_LINE_STATUS_RESET)
adb_reset();
else if(adb_status != ADB_OK)
continue;
// printf("%d\n", adb_data);
adb_status = parse_adb_cmd(adb_data);
if(adb_status == ADB_MOUSE_POLL)
{
adb_mouse_update();
}
// if(adb_status == ADB_KB_POLL)
// {
// DEBUG0_HI();
// DEBUG0_LOW();
// }
}
/* USER CODE END 3 */
@@ -468,11 +486,15 @@ static void MX_GPIO_Init(void)
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOF_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(USER_LED_GPIO_Port, USER_LED_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOF, DEBUG0_Pin|DEBUG1_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(ADB_PSW_GPIO_Port, ADB_PSW_Pin, GPIO_PIN_SET);
@@ -489,6 +511,13 @@ static void MX_GPIO_Init(void)
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(USER_LED_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : DEBUG0_Pin DEBUG1_Pin */
GPIO_InitStruct.Pin = DEBUG0_Pin|DEBUG1_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
/*Configure GPIO pin : ADB_PSW_Pin */
GPIO_InitStruct.Pin = ADB_PSW_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;

View File

@@ -12,21 +12,23 @@ Mcu.IPNb=6
Mcu.Name=STM32F042F6Px
Mcu.Package=TSSOP20
Mcu.Pin0=PB8
Mcu.Pin1=PA0
Mcu.Pin10=PA13
Mcu.Pin11=PA14
Mcu.Pin12=VP_SYS_VS_PINREMAP
Mcu.Pin13=VP_SYS_VS_Systick
Mcu.Pin14=VP_TIM2_VS_ClockSourceINT
Mcu.Pin2=PA1
Mcu.Pin3=PA2
Mcu.Pin4=PA3
Mcu.Pin5=PA4
Mcu.Pin6=PA5
Mcu.Pin7=PA6
Mcu.Pin8=PA7
Mcu.Pin9=PB1
Mcu.PinsNb=15
Mcu.Pin1=PF0-OSC_IN
Mcu.Pin10=PA7
Mcu.Pin11=PB1
Mcu.Pin12=PA13
Mcu.Pin13=PA14
Mcu.Pin14=VP_SYS_VS_PINREMAP
Mcu.Pin15=VP_SYS_VS_Systick
Mcu.Pin16=VP_TIM2_VS_ClockSourceINT
Mcu.Pin2=PF1-OSC_OUT
Mcu.Pin3=PA0
Mcu.Pin4=PA1
Mcu.Pin5=PA2
Mcu.Pin6=PA3
Mcu.Pin7=PA4
Mcu.Pin8=PA5
Mcu.Pin9=PA6
Mcu.PinsNb=17
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32F042F6Px
@@ -87,6 +89,14 @@ PCC.Seq0=0
PCC.Series=STM32F0
PCC.Temperature=25
PCC.Vdd=3.6
PF0-OSC_IN.GPIOParameters=GPIO_Label
PF0-OSC_IN.GPIO_Label=DEBUG0
PF0-OSC_IN.Locked=true
PF0-OSC_IN.Signal=GPIO_Output
PF1-OSC_OUT.GPIOParameters=GPIO_Label
PF1-OSC_OUT.GPIO_Label=DEBUG1
PF1-OSC_OUT.Locked=true
PF1-OSC_OUT.Signal=GPIO_Output
PinOutPanel.RotationAngle=0
ProjectManager.AskForMigrate=true
ProjectManager.BackupPrevious=false

View File

@@ -1,4 +1,56 @@
adb_status = adb_recv_cmd(&adb_data, 0);
// if(cmd == ADB_CMD_TYPE_TALK && reg == 0 && addr == adb_mouse_current_addr && HAL_GetTick() - last_send > 500)
// {
// uint16_t response = 0x8082;
// if(HAL_GetTick() % 2)
// response = 0x80fc;
// adb_send_response_16b(response);
// last_send = HAL_GetTick();
// }
uint32_t last_send;
void adb_mouse_update(void)
{
mouse_event* this_mouse_event = mouse_buf_peek(&my_mouse_buf);
if(this_mouse_event == NULL)
return;
// uint16_t response = 0;
// if(this_mouse_event->button_left == 0)
// response |= 0x8000;
// if(this_mouse_event->button_right == 0)
// response |= 0x80;
response |= ((uint8_t)(this_mouse_event->movement_x)) & 0x7f;
response |= (((uint8_t)(this_mouse_event->movement_y)) & 0x7f) << 8;
adb_send_response_16b(response);
printf("0x%x\n", response);
if(HAL_GetTick() - last_send > 100)
{
// uint16_t response = 0x8080;
// if(HAL_GetTick() % 2)
// response = 0x80fc;
DEBUG1_HI();
adb_send_response_16b(response);
DEBUG1_LOW();
last_send = HAL_GetTick();
}
mouse_buf_reset(&my_mouse_buf);
}
if(adb_status == ADB_LINE_STATUS_RESET)
adb_reset();
else if(adb_status != ADB_OK)
continue;
adb_status = parse_adb_cmd(adb_data);
if(adb_status == ADB_MOUSE_POLL)
{
// DEBUG0_HI();
adb_mouse_update();
// DEBUG0_LOW();
}
if(cmd == ADB_CMD_TYPE_TALK && reg == 0 && addr == adb_mouse_current_addr && HAL_GetTick() - last_send > 500)
{
uint16_t response = 0x80fc;