added protocol capability read and write

This commit is contained in:
dekunukem
2021-12-17 10:03:44 +00:00
parent b9d3f4803b
commit d22e7b44cf
23 changed files with 1474 additions and 1342 deletions

View File

@@ -92,7 +92,6 @@ void ps2mouse_buf_init(ps2mouse_buf *lb, uint8_t size);
uint8_t ps2mouse_buf_add(ps2mouse_buf *lb, mouse_event* event);
mouse_event* ps2mouse_buf_peek(ps2mouse_buf *lb);
void ps2mouse_buf_pop(ps2mouse_buf *lb);
uint8_t* find_in_array_7bit(uint8_t value, uint8_t* start, uint8_t* end);
#ifdef __cplusplus
}

View File

@@ -19,6 +19,7 @@ uint8_t ps2kb_write(uint8_t data, uint8_t delay_start, uint8_t timeout_ms);
void keyboard_reply(uint8_t cmd, uint8_t *leds);
uint8_t ps2kb_press_key(uint8_t linux_keycode, uint8_t press1release0);
void ps2kb_release_lines(void);
void ps2kb_reset(void);
#define LINUX_KEYCODE_TO_PS2_SCANCODE_SINGLE_SIZE 89
#define LINUX_KEYCODE_TO_PS2_SCANCODE_SPECIAL_SIZE 32

View File

@@ -21,6 +21,7 @@ void ps2mouse_release_lines(void);
uint8_t ps2mouse_get_outgoing_data(mouse_event* this_event, ps2_outgoing_buf* pbuf);
uint8_t ps2mouse_send_update(ps2_outgoing_buf* pbuf);
uint8_t ps2mouse_write_nowait(uint8_t data);
void ps2mouse_reset(void);
#ifdef __cplusplus
}
#endif

View File

File diff suppressed because one or more lines are too long

View File

Binary file not shown.

View File

Binary file not shown.

View File

Binary file not shown.

View File

@@ -27,15 +27,11 @@ Project File Date: 12/12/2021
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'ibmpc'
compiling helpers.c...
..\Src\helpers.c(118): warning: #1-D: last line of file ends without a newline
}
..\Src\helpers.c: 1 warning, 0 errors
compiling main.c...
linking...
Program Size: Code=13352 RO-data=424 RW-data=104 ZI-data=2136
Program Size: Code=13440 RO-data=424 RW-data=100 ZI-data=2148
FromELF: creating hex file...
"ibmpc\ibmpc.axf" - 0 Error(s), 1 Warning(s).
"ibmpc\ibmpc.axf" - 0 Error(s), 0 Warning(s).
<h2>Software Packages used:</h2>

View File

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
<title>Static Call Graph - [ibmpc\ibmpc.axf]</title></head>
<body><HR>
<H1>Static Call Graph for image ibmpc\ibmpc.axf</H1><HR>
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060750: Last Updated: Thu Dec 16 22:50:07 2021
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060750: Last Updated: Fri Dec 17 10:03:09 2021
<BR><P>
<H3>Maximum Stack Usage = 212 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
Call chain for Maximum Stack Depth:</H3>
@@ -194,11 +194,11 @@ Global Symbols
<BR><BR>[Stack]<UL><LI>Max Depth = 12<LI>Call Chain = __aeabi_uidivmod
</UL>
<BR>[Called By]<UL><LI><a href="#[81]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SystemClock_Config
<LI><a href="#[a8]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_pop
<LI><a href="#[a5]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_is_full
<LI><a href="#[aa]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_pop
<LI><a href="#[a7]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_is_full
<LI><a href="#[56]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_add
<LI><a href="#[9e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_pop
<LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_is_full
<LI><a href="#[a1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_pop
<LI><a href="#[9e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_is_full
<LI><a href="#[54]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_add
<LI><a href="#[40]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_InitTick
<LI><a href="#[49]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_RCC_GetSysClockFreq
@@ -206,7 +206,7 @@ Global Symbols
<LI><a href="#[87]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;_printf_core
</UL>
<P><STRONG><a name="[a6]"></a>__aeabi_memcpy</STRONG> (Thumb, 36 bytes, Stack size 0 bytes, memcpya.o(.text))
<P><STRONG><a name="[a8]"></a>__aeabi_memcpy</STRONG> (Thumb, 36 bytes, Stack size 0 bytes, memcpya.o(.text))
<BR><BR>[Called By]<UL><LI><a href="#[56]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_add
</UL>
@@ -228,13 +228,13 @@ Global Symbols
<P><STRONG><a name="[32]"></a>__aeabi_memclr</STRONG> (Thumb, 4 bytes, Stack size 0 bytes, memseta.o(.text))
<BR><BR>[Calls]<UL><LI><a href="#[33]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_memset
</UL>
<BR>[Called By]<UL><LI><a href="#[aa]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_get_outgoing_data
<LI><a href="#[a7]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_reset
<LI><a href="#[9d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_reset
<BR>[Called By]<UL><LI><a href="#[ac]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_get_outgoing_data
<LI><a href="#[a9]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_reset
<LI><a href="#[a0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_reset
</UL>
<P><STRONG><a name="[57]"></a>__aeabi_memclr4</STRONG> (Thumb, 0 bytes, Stack size 0 bytes, memseta.o(.text))
<BR><BR>[Called By]<UL><LI><a href="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<BR><BR>[Called By]<UL><LI><a href="#[9c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<LI><a href="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
<LI><a href="#[51]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TxRxCpltCallback
</UL>
@@ -272,8 +272,8 @@ Global Symbols
</UL>
<BR>[Calls]<UL><LI><a href="#[38]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GetTick
</UL>
<BR>[Called By]<UL><LI><a href="#[95]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;mcp4451_reset
<LI><a href="#[9a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;spi_error_dump_reboot
<BR>[Called By]<UL><LI><a href="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;mcp4451_reset
<LI><a href="#[9d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;spi_error_dump_reboot
</UL>
<P><STRONG><a name="[39]"></a>HAL_GPIO_EXTI_Callback</STRONG> (Thumb, 12 bytes, Stack size 0 bytes, main.o(i.HAL_GPIO_EXTI_Callback))
@@ -297,30 +297,30 @@ Global Symbols
<LI><a href="#[3b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_I2C_MspInit
</UL>
<P><STRONG><a name="[a0]"></a>HAL_GPIO_ReadPin</STRONG> (Thumb, 10 bytes, Stack size 0 bytes, stm32f0xx_hal_gpio.o(i.HAL_GPIO_ReadPin))
<P><STRONG><a name="[a3]"></a>HAL_GPIO_ReadPin</STRONG> (Thumb, 10 bytes, Stack size 0 bytes, stm32f0xx_hal_gpio.o(i.HAL_GPIO_ReadPin))
<BR><BR>[Called By]<UL><LI><a href="#[b6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write_nowait
<LI><a href="#[b1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_read
<LI><a href="#[a9]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_get_bus_status
<LI><a href="#[a4]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write_nowait
<LI><a href="#[90]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
<LI><a href="#[9f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_get_bus_status
<LI><a href="#[b2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_read
<LI><a href="#[ab]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_get_bus_status
<LI><a href="#[a6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write_nowait
<LI><a href="#[94]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
<LI><a href="#[a2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_get_bus_status
</UL>
<P><STRONG><a name="[b7]"></a>HAL_GPIO_TogglePin</STRONG> (Thumb, 8 bytes, Stack size 0 bytes, stm32f0xx_hal_gpio.o(i.HAL_GPIO_TogglePin))
<BR><BR>[Called By]<UL><LI><a href="#[9a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;spi_error_dump_reboot
<BR><BR>[Called By]<UL><LI><a href="#[9d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;spi_error_dump_reboot
</UL>
<P><STRONG><a name="[52]"></a>HAL_GPIO_WritePin</STRONG> (Thumb, 12 bytes, Stack size 0 bytes, stm32f0xx_hal_gpio.o(i.HAL_GPIO_WritePin))
<BR><BR>[Called By]<UL><LI><a href="#[95]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;mcp4451_reset
<LI><a href="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<BR><BR>[Called By]<UL><LI><a href="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;mcp4451_reset
<LI><a href="#[9c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<LI><a href="#[51]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TxRxCpltCallback
<LI><a href="#[72]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;MX_GPIO_Init
<LI><a href="#[b6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write_nowait
<LI><a href="#[b2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_release_lines
<LI><a href="#[b1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_read
<LI><a href="#[a4]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write_nowait
<LI><a href="#[a1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_release_lines
<LI><a href="#[90]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
<LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_release_lines
<LI><a href="#[b2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_read
<LI><a href="#[a6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write_nowait
<LI><a href="#[8f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_release_lines
<LI><a href="#[94]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
</UL>
<P><STRONG><a name="[38]"></a>HAL_GetTick</STRONG> (Thumb, 6 bytes, Stack size 0 bytes, stm32f0xx_hal.o(i.HAL_GetTick))
@@ -330,9 +330,9 @@ Global Symbols
<LI><a href="#[47]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_RCCEx_PeriphCLKConfig
<LI><a href="#[37]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_Delay
<LI><a href="#[b5]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_wait_for_idle
<LI><a href="#[b1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_read
<LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
<LI><a href="#[90]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
<LI><a href="#[b2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_read
<LI><a href="#[93]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
<LI><a href="#[94]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
<LI><a href="#[7f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SPI_WaitFlagStateUntilTimeout
<LI><a href="#[7e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SPI_WaitFifoStateUntilTimeout
<LI><a href="#[7b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SPI_CloseRxTx_ISR
@@ -368,7 +368,7 @@ Global Symbols
<BR>[Calls]<UL><LI><a href="#[38]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GetTick
<LI><a href="#[3d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;I2C_WaitOnFlagUntilTimeout
</UL>
<BR>[Called By]<UL><LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;mcp4451_is_available
<BR>[Called By]<UL><LI><a href="#[9a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;mcp4451_is_available
</UL>
<P><STRONG><a name="[3b]"></a>HAL_I2C_MspInit</STRONG> (Thumb, 64 bytes, Stack size 32 bytes, stm32f0xx_hal_msp.o(i.HAL_I2C_MspInit))
@@ -484,8 +484,8 @@ Global Symbols
<P><STRONG><a name="[4b]"></a>HAL_SPI_IRQHandler</STRONG> (Thumb, 208 bytes, Stack size 24 bytes, stm32f0xx_hal_spi.o(i.HAL_SPI_IRQHandler))
<BR><BR>[Stack]<UL><LI>Max Depth = 40<LI>Call Chain = HAL_SPI_IRQHandler &rArr; HAL_DMA_Abort_IT
</UL>
<BR>[Calls]<UL><LI><a href="#[4d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_ErrorCallback
<LI><a href="#[4c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_DMA_Abort_IT
<BR>[Calls]<UL><LI><a href="#[4c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_DMA_Abort_IT
<LI><a href="#[4d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_ErrorCallback
</UL>
<BR>[Called By]<UL><LI><a href="#[1f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SPI1_IRQHandler
</UL>
@@ -519,15 +519,15 @@ Global Symbols
<LI><a href="#[51]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TxRxCpltCallback
</UL>
<P><STRONG><a name="[51]"></a>HAL_SPI_TxRxCpltCallback</STRONG> (Thumb, 286 bytes, Stack size 24 bytes, main.o(i.HAL_SPI_TxRxCpltCallback))
<P><STRONG><a name="[51]"></a>HAL_SPI_TxRxCpltCallback</STRONG> (Thumb, 308 bytes, Stack size 24 bytes, main.o(i.HAL_SPI_TxRxCpltCallback))
<BR><BR>[Stack]<UL><LI>Max Depth = 60<LI>Call Chain = HAL_SPI_TxRxCpltCallback &rArr; ps2mouse_buf_add &rArr; ps2mouse_buf_is_full &rArr; __aeabi_uidivmod
</UL>
<BR>[Calls]<UL><LI><a href="#[59]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TransmitReceive_IT
<LI><a href="#[58]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;handle_protocol_switch
<LI><a href="#[55]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;byte_to_int16_t
<LI><a href="#[52]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_WritePin
<LI><a href="#[56]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_add
<LI><a href="#[54]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_add
<LI><a href="#[58]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;find_in_array_7bit
<LI><a href="#[57]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_memclr4
<LI><a href="#[53]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_memcpy4
</UL>
@@ -785,18 +785,19 @@ Global Symbols
<P><STRONG><a name="[c4]"></a>__1printf$3</STRONG> (Thumb, 0 bytes, Stack size 24 bytes, printf3.o(i.__0printf$3), UNUSED)
<P><STRONG><a name="[97]"></a>__2printf</STRONG> (Thumb, 0 bytes, Stack size 24 bytes, printf3.o(i.__0printf$3))
<P><STRONG><a name="[8c]"></a>__2printf</STRONG> (Thumb, 0 bytes, Stack size 24 bytes, printf3.o(i.__0printf$3))
<BR><BR>[Stack]<UL><LI>Max Depth = 24<LI>Call Chain = __2printf
</UL>
<BR>[Called By]<UL><LI><a href="#[9a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;spi_error_dump_reboot
<BR>[Called By]<UL><LI><a href="#[9d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;spi_error_dump_reboot
<LI><a href="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
<LI><a href="#[58]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;handle_protocol_switch
</UL>
<P><STRONG><a name="[8d]"></a>__ARM_common_switch8</STRONG> (Thumb, 26 bytes, Stack size 8 bytes, ps2kb.o(i.__ARM_common_switch8))
<P><STRONG><a name="[92]"></a>__ARM_common_switch8</STRONG> (Thumb, 26 bytes, Stack size 8 bytes, ps2kb.o(i.__ARM_common_switch8))
<BR><BR>[Stack]<UL><LI>Max Depth = 8<LI>Call Chain = __ARM_common_switch8
</UL>
<BR>[Called By]<UL><LI><a href="#[ab]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_host_req_reply
<LI><a href="#[8c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;keyboard_reply
<BR>[Called By]<UL><LI><a href="#[ad]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_host_req_reply
<LI><a href="#[91]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;keyboard_reply
</UL>
<P><STRONG><a name="[c5]"></a>__scatterload_copy</STRONG> (Thumb, 14 bytes, Stack size unknown bytes, handlers.o(i.__scatterload_copy), UNUSED)
@@ -815,11 +816,11 @@ Global Symbols
<BR>[Calls]<UL><LI><a href="#[89]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;micros
</UL>
<BR>[Called By]<UL><LI><a href="#[b6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write_nowait
<LI><a href="#[ad]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write_delay_start
<LI><a href="#[b1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_read
<LI><a href="#[a4]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write_nowait
<LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
<LI><a href="#[90]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
<LI><a href="#[ae]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write_delay_start
<LI><a href="#[b2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_read
<LI><a href="#[a6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write_nowait
<LI><a href="#[93]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
<LI><a href="#[94]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
</UL>
<P><STRONG><a name="[8a]"></a>delay_us_init</STRONG> (Thumb, 12 bytes, Stack size 8 bytes, delay_us.o(i.delay_us_init))
@@ -830,10 +831,6 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
</UL>
<P><STRONG><a name="[58]"></a>find_in_array_7bit</STRONG> (Thumb, 30 bytes, Stack size 0 bytes, helpers.o(i.find_in_array_7bit))
<BR><BR>[Called By]<UL><LI><a href="#[51]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TxRxCpltCallback
</UL>
<P><STRONG><a name="[2f]"></a>fputc</STRONG> (Thumb, 18 bytes, Stack size 16 bytes, main.o(i.fputc))
<BR><BR>[Stack]<UL><LI>Max Depth = 104<LI>Call Chain = fputc &rArr; HAL_UART_Transmit &rArr; UART_WaitOnFlagUntilTimeout
</UL>
@@ -841,27 +838,39 @@ Global Symbols
</UL>
<BR>[Address Reference Count : 1]<UL><LI> printf3.o(i.__0printf$3)
</UL>
<P><STRONG><a name="[8c]"></a>keyboard_reply</STRONG> (Thumb, 174 bytes, Stack size 16 bytes, ps2kb.o(i.keyboard_reply))
<P><STRONG><a name="[58]"></a>handle_protocol_switch</STRONG> (Thumb, 70 bytes, Stack size 8 bytes, main.o(i.handle_protocol_switch))
<BR><BR>[Stack]<UL><LI>Max Depth = 32<LI>Call Chain = handle_protocol_switch &rArr; __2printf
</UL>
<BR>[Calls]<UL><LI><a href="#[8d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_reset
<LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_release_lines
<LI><a href="#[90]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_reset
<LI><a href="#[8f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_release_lines
<LI><a href="#[8c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__2printf
</UL>
<BR>[Called By]<UL><LI><a href="#[51]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TxRxCpltCallback
</UL>
<P><STRONG><a name="[91]"></a>keyboard_reply</STRONG> (Thumb, 174 bytes, Stack size 16 bytes, ps2kb.o(i.keyboard_reply))
<BR><BR>[Stack]<UL><LI>Max Depth = 68<LI>Call Chain = keyboard_reply &rArr; ps2kb_write &rArr; ps2kb_write_nowait &rArr; delay_us
</UL>
<BR>[Calls]<UL><LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
<LI><a href="#[8f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_reset
<LI><a href="#[90]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
<LI><a href="#[8d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__ARM_common_switch8
<BR>[Calls]<UL><LI><a href="#[93]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
<LI><a href="#[90]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_reset
<LI><a href="#[94]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
<LI><a href="#[92]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__ARM_common_switch8
</UL>
<BR>[Called By]<UL><LI><a href="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<BR>[Called By]<UL><LI><a href="#[9c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
</UL>
<P><STRONG><a name="[26]"></a>main</STRONG> (Thumb, 168 bytes, Stack size 16 bytes, main.o(i.main))
<BR><BR>[Stack]<UL><LI>Max Depth = 212<LI>Call Chain = main &rArr; SystemClock_Config &rArr; HAL_RCC_ClockConfig &rArr; HAL_RCC_GetSysClockFreq &rArr; __aeabi_uidivmod
</UL>
<BR>[Calls]<UL><LI><a href="#[95]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;mcp4451_reset
<LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;mcp4451_is_available
<BR>[Calls]<UL><LI><a href="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;mcp4451_reset
<LI><a href="#[9a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;mcp4451_is_available
<LI><a href="#[59]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TransmitReceive_IT
<LI><a href="#[3f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_Init
<LI><a href="#[9a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;spi_error_dump_reboot
<LI><a href="#[98]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
<LI><a href="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<LI><a href="#[9d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;spi_error_dump_reboot
<LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
<LI><a href="#[9c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<LI><a href="#[81]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SystemClock_Config
<LI><a href="#[7a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;MX_USART3_UART_Init
<LI><a href="#[79]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;MX_USART1_UART_Init
@@ -869,24 +878,24 @@ Global Symbols
<LI><a href="#[76]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;MX_SPI1_Init
<LI><a href="#[73]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;MX_I2C2_Init
<LI><a href="#[72]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;MX_GPIO_Init
<LI><a href="#[92]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_init
<LI><a href="#[91]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_init
<LI><a href="#[94]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_init
<LI><a href="#[93]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_init
<LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_init
<LI><a href="#[95]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_init
<LI><a href="#[98]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_init
<LI><a href="#[97]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_init
<LI><a href="#[8a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;delay_us_init
<LI><a href="#[97]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__2printf
<LI><a href="#[8c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__2printf
<LI><a href="#[57]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_memclr4
</UL>
<BR>[Address Reference Count : 1]<UL><LI> entry9a.o(.ARM.Collect$$$$0000000B)
</UL>
<P><STRONG><a name="[9c]"></a>malloc</STRONG> (Thumb, 92 bytes, Stack size 20 bytes, malloc.o(i.malloc))
<P><STRONG><a name="[9f]"></a>malloc</STRONG> (Thumb, 92 bytes, Stack size 20 bytes, malloc.o(i.malloc))
<BR><BR>[Stack]<UL><LI>Max Depth = 20<LI>Call Chain = malloc
</UL>
<BR>[Called By]<UL><LI><a href="#[94]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_init
<LI><a href="#[93]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_init
<BR>[Called By]<UL><LI><a href="#[98]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_init
<LI><a href="#[97]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_init
</UL>
<P><STRONG><a name="[96]"></a>mcp4451_is_available</STRONG> (Thumb, 26 bytes, Stack size 8 bytes, mcp4451.o(i.mcp4451_is_available))
<P><STRONG><a name="[9a]"></a>mcp4451_is_available</STRONG> (Thumb, 26 bytes, Stack size 8 bytes, mcp4451.o(i.mcp4451_is_available))
<BR><BR>[Stack]<UL><LI>Max Depth = 80<LI>Call Chain = mcp4451_is_available &rArr; HAL_I2C_IsDeviceReady &rArr; I2C_WaitOnFlagUntilTimeout
</UL>
<BR>[Calls]<UL><LI><a href="#[3c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_I2C_IsDeviceReady
@@ -894,7 +903,7 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
</UL>
<P><STRONG><a name="[95]"></a>mcp4451_reset</STRONG> (Thumb, 38 bytes, Stack size 8 bytes, mcp4451.o(i.mcp4451_reset))
<P><STRONG><a name="[99]"></a>mcp4451_reset</STRONG> (Thumb, 38 bytes, Stack size 8 bytes, mcp4451.o(i.mcp4451_reset))
<BR><BR>[Stack]<UL><LI>Max Depth = 24<LI>Call Chain = mcp4451_reset &rArr; HAL_Delay
</UL>
<BR>[Calls]<UL><LI><a href="#[37]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_Delay
@@ -910,22 +919,22 @@ Global Symbols
<P><STRONG><a name="[54]"></a>ps2kb_buf_add</STRONG> (Thumb, 48 bytes, Stack size 16 bytes, helpers.o(i.ps2kb_buf_add))
<BR><BR>[Stack]<UL><LI>Max Depth = 36<LI>Call Chain = ps2kb_buf_add &rArr; ps2kb_buf_is_full &rArr; __aeabi_uidivmod
</UL>
<BR>[Calls]<UL><LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_is_full
<BR>[Calls]<UL><LI><a href="#[9e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_is_full
<LI><a href="#[43]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_uidivmod
</UL>
<BR>[Called By]<UL><LI><a href="#[51]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TxRxCpltCallback
</UL>
<P><STRONG><a name="[93]"></a>ps2kb_buf_init</STRONG> (Thumb, 32 bytes, Stack size 16 bytes, helpers.o(i.ps2kb_buf_init))
<P><STRONG><a name="[97]"></a>ps2kb_buf_init</STRONG> (Thumb, 32 bytes, Stack size 16 bytes, helpers.o(i.ps2kb_buf_init))
<BR><BR>[Stack]<UL><LI>Max Depth = 36<LI>Call Chain = ps2kb_buf_init &rArr; malloc
</UL>
<BR>[Calls]<UL><LI><a href="#[9d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_reset
<LI><a href="#[9c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;malloc
<BR>[Calls]<UL><LI><a href="#[a0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_reset
<LI><a href="#[9f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;malloc
</UL>
<BR>[Called By]<UL><LI><a href="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
</UL>
<P><STRONG><a name="[9b]"></a>ps2kb_buf_is_full</STRONG> (Thumb, 28 bytes, Stack size 8 bytes, helpers.o(i.ps2kb_buf_is_full))
<P><STRONG><a name="[9e]"></a>ps2kb_buf_is_full</STRONG> (Thumb, 28 bytes, Stack size 8 bytes, helpers.o(i.ps2kb_buf_is_full))
<BR><BR>[Stack]<UL><LI>Max Depth = 20<LI>Call Chain = ps2kb_buf_is_full &rArr; __aeabi_uidivmod
</UL>
<BR>[Calls]<UL><LI><a href="#[43]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_uidivmod
@@ -933,140 +942,142 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[54]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_add
</UL>
<P><STRONG><a name="[a3]"></a>ps2kb_buf_peek</STRONG> (Thumb, 32 bytes, Stack size 8 bytes, helpers.o(i.ps2kb_buf_peek))
<P><STRONG><a name="[a5]"></a>ps2kb_buf_peek</STRONG> (Thumb, 32 bytes, Stack size 8 bytes, helpers.o(i.ps2kb_buf_peek))
<BR><BR>[Stack]<UL><LI>Max Depth = 8<LI>Call Chain = ps2kb_buf_peek
</UL>
<BR>[Called By]<UL><LI><a href="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<BR>[Called By]<UL><LI><a href="#[9c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
</UL>
<P><STRONG><a name="[9e]"></a>ps2kb_buf_pop</STRONG> (Thumb, 24 bytes, Stack size 8 bytes, helpers.o(i.ps2kb_buf_pop))
<P><STRONG><a name="[a1]"></a>ps2kb_buf_pop</STRONG> (Thumb, 24 bytes, Stack size 8 bytes, helpers.o(i.ps2kb_buf_pop))
<BR><BR>[Stack]<UL><LI>Max Depth = 20<LI>Call Chain = ps2kb_buf_pop &rArr; __aeabi_uidivmod
</UL>
<BR>[Calls]<UL><LI><a href="#[43]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_uidivmod
</UL>
<BR>[Called By]<UL><LI><a href="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<BR>[Called By]<UL><LI><a href="#[9c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
</UL>
<P><STRONG><a name="[9d]"></a>ps2kb_buf_reset</STRONG> (Thumb, 28 bytes, Stack size 8 bytes, helpers.o(i.ps2kb_buf_reset))
<P><STRONG><a name="[a0]"></a>ps2kb_buf_reset</STRONG> (Thumb, 28 bytes, Stack size 8 bytes, helpers.o(i.ps2kb_buf_reset))
<BR><BR>[Stack]<UL><LI>Max Depth = 8<LI>Call Chain = ps2kb_buf_reset
</UL>
<BR>[Calls]<UL><LI><a href="#[32]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_memclr
</UL>
<BR>[Called By]<UL><LI><a href="#[93]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_init
<BR>[Called By]<UL><LI><a href="#[97]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_init
</UL>
<P><STRONG><a name="[9f]"></a>ps2kb_get_bus_status</STRONG> (Thumb, 62 bytes, Stack size 16 bytes, ps2kb.o(i.ps2kb_get_bus_status))
<P><STRONG><a name="[a2]"></a>ps2kb_get_bus_status</STRONG> (Thumb, 62 bytes, Stack size 16 bytes, ps2kb.o(i.ps2kb_get_bus_status))
<BR><BR>[Stack]<UL><LI>Max Depth = 16<LI>Call Chain = ps2kb_get_bus_status
</UL>
<BR>[Calls]<UL><LI><a href="#[a0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_ReadPin
<BR>[Calls]<UL><LI><a href="#[a3]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_ReadPin
</UL>
<BR>[Called By]<UL><LI><a href="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
<LI><a href="#[90]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
<BR>[Called By]<UL><LI><a href="#[9c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<LI><a href="#[93]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
<LI><a href="#[94]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
</UL>
<P><STRONG><a name="[91]"></a>ps2kb_init</STRONG> (Thumb, 22 bytes, Stack size 8 bytes, ps2kb.o(i.ps2kb_init))
<P><STRONG><a name="[95]"></a>ps2kb_init</STRONG> (Thumb, 22 bytes, Stack size 8 bytes, ps2kb.o(i.ps2kb_init))
<BR><BR>[Stack]<UL><LI>Max Depth = 16<LI>Call Chain = ps2kb_init &rArr; ps2kb_release_lines
</UL>
<BR>[Calls]<UL><LI><a href="#[8f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_reset
<LI><a href="#[a1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_release_lines
<BR>[Calls]<UL><LI><a href="#[90]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_reset
<LI><a href="#[8f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_release_lines
</UL>
<BR>[Called By]<UL><LI><a href="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
</UL>
<P><STRONG><a name="[a2]"></a>ps2kb_press_key</STRONG> (Thumb, 314 bytes, Stack size 8 bytes, ps2kb.o(i.ps2kb_press_key))
<P><STRONG><a name="[a4]"></a>ps2kb_press_key</STRONG> (Thumb, 314 bytes, Stack size 8 bytes, ps2kb.o(i.ps2kb_press_key))
<BR><BR>[Stack]<UL><LI>Max Depth = 60<LI>Call Chain = ps2kb_press_key &rArr; ps2kb_write &rArr; ps2kb_write_nowait &rArr; delay_us
</UL>
<BR>[Calls]<UL><LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
<BR>[Calls]<UL><LI><a href="#[93]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
</UL>
<BR>[Called By]<UL><LI><a href="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<BR>[Called By]<UL><LI><a href="#[9c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
</UL>
<P><STRONG><a name="[90]"></a>ps2kb_read</STRONG> (Thumb, 246 bytes, Stack size 32 bytes, ps2kb.o(i.ps2kb_read))
<P><STRONG><a name="[94]"></a>ps2kb_read</STRONG> (Thumb, 246 bytes, Stack size 32 bytes, ps2kb.o(i.ps2kb_read))
<BR><BR>[Stack]<UL><LI>Max Depth = 48<LI>Call Chain = ps2kb_read &rArr; ps2kb_get_bus_status
</UL>
<BR>[Calls]<UL><LI><a href="#[38]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GetTick
<LI><a href="#[52]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_WritePin
<LI><a href="#[a0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_ReadPin
<LI><a href="#[9f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_get_bus_status
<LI><a href="#[a3]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_ReadPin
<LI><a href="#[a2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_get_bus_status
<LI><a href="#[88]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;delay_us
</UL>
<BR>[Called By]<UL><LI><a href="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<LI><a href="#[8c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;keyboard_reply
<BR>[Called By]<UL><LI><a href="#[9c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<LI><a href="#[91]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;keyboard_reply
</UL>
<P><STRONG><a name="[a1]"></a>ps2kb_release_lines</STRONG> (Thumb, 26 bytes, Stack size 8 bytes, ps2kb.o(i.ps2kb_release_lines))
<P><STRONG><a name="[8f]"></a>ps2kb_release_lines</STRONG> (Thumb, 26 bytes, Stack size 8 bytes, ps2kb.o(i.ps2kb_release_lines))
<BR><BR>[Stack]<UL><LI>Max Depth = 8<LI>Call Chain = ps2kb_release_lines
</UL>
<BR>[Calls]<UL><LI><a href="#[52]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_WritePin
</UL>
<BR>[Called By]<UL><LI><a href="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<LI><a href="#[91]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_init
<BR>[Called By]<UL><LI><a href="#[9c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<LI><a href="#[58]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;handle_protocol_switch
<LI><a href="#[95]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_init
</UL>
<P><STRONG><a name="[8f]"></a>ps2kb_reset</STRONG> (Thumb, 12 bytes, Stack size 0 bytes, ps2kb.o(i.ps2kb_reset))
<BR><BR>[Called By]<UL><LI><a href="#[91]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_init
<LI><a href="#[8c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;keyboard_reply
<P><STRONG><a name="[90]"></a>ps2kb_reset</STRONG> (Thumb, 12 bytes, Stack size 0 bytes, ps2kb.o(i.ps2kb_reset))
<BR><BR>[Called By]<UL><LI><a href="#[58]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;handle_protocol_switch
<LI><a href="#[95]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_init
<LI><a href="#[91]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;keyboard_reply
</UL>
<P><STRONG><a name="[99]"></a>ps2kb_update</STRONG> (Thumb, 152 bytes, Stack size 16 bytes, main.o(i.ps2kb_update))
<P><STRONG><a name="[9c]"></a>ps2kb_update</STRONG> (Thumb, 152 bytes, Stack size 16 bytes, main.o(i.ps2kb_update))
<BR><BR>[Stack]<UL><LI>Max Depth = 84<LI>Call Chain = ps2kb_update &rArr; keyboard_reply &rArr; ps2kb_write &rArr; ps2kb_write_nowait &rArr; delay_us
</UL>
<BR>[Calls]<UL><LI><a href="#[52]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_WritePin
<LI><a href="#[a1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_release_lines
<LI><a href="#[90]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
<LI><a href="#[a2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_press_key
<LI><a href="#[9f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_get_bus_status
<LI><a href="#[8c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;keyboard_reply
<LI><a href="#[9e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_pop
<LI><a href="#[a3]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_peek
<LI><a href="#[8f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_release_lines
<LI><a href="#[94]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
<LI><a href="#[a4]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_press_key
<LI><a href="#[a2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_get_bus_status
<LI><a href="#[91]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;keyboard_reply
<LI><a href="#[a1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_pop
<LI><a href="#[a5]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_peek
<LI><a href="#[57]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_memclr4
</UL>
<BR>[Called By]<UL><LI><a href="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
</UL>
<P><STRONG><a name="[8e]"></a>ps2kb_write</STRONG> (Thumb, 62 bytes, Stack size 24 bytes, ps2kb.o(i.ps2kb_write))
<P><STRONG><a name="[93]"></a>ps2kb_write</STRONG> (Thumb, 62 bytes, Stack size 24 bytes, ps2kb.o(i.ps2kb_write))
<BR><BR>[Stack]<UL><LI>Max Depth = 52<LI>Call Chain = ps2kb_write &rArr; ps2kb_write_nowait &rArr; delay_us
</UL>
<BR>[Calls]<UL><LI><a href="#[38]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GetTick
<LI><a href="#[a4]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write_nowait
<LI><a href="#[9f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_get_bus_status
<LI><a href="#[a6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write_nowait
<LI><a href="#[a2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_get_bus_status
<LI><a href="#[88]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;delay_us
</UL>
<BR>[Called By]<UL><LI><a href="#[a2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_press_key
<LI><a href="#[8c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;keyboard_reply
<BR>[Called By]<UL><LI><a href="#[a4]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_press_key
<LI><a href="#[91]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;keyboard_reply
</UL>
<P><STRONG><a name="[a4]"></a>ps2kb_write_nowait</STRONG> (Thumb, 282 bytes, Stack size 24 bytes, ps2kb.o(i.ps2kb_write_nowait))
<P><STRONG><a name="[a6]"></a>ps2kb_write_nowait</STRONG> (Thumb, 282 bytes, Stack size 24 bytes, ps2kb.o(i.ps2kb_write_nowait))
<BR><BR>[Stack]<UL><LI>Max Depth = 28<LI>Call Chain = ps2kb_write_nowait &rArr; delay_us
</UL>
<BR>[Calls]<UL><LI><a href="#[52]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_WritePin
<LI><a href="#[a0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_ReadPin
<LI><a href="#[a3]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_ReadPin
<LI><a href="#[88]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;delay_us
</UL>
<BR>[Called By]<UL><LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
<BR>[Called By]<UL><LI><a href="#[93]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
</UL>
<P><STRONG><a name="[56]"></a>ps2mouse_buf_add</STRONG> (Thumb, 50 bytes, Stack size 16 bytes, helpers.o(i.ps2mouse_buf_add))
<BR><BR>[Stack]<UL><LI>Max Depth = 36<LI>Call Chain = ps2mouse_buf_add &rArr; ps2mouse_buf_is_full &rArr; __aeabi_uidivmod
</UL>
<BR>[Calls]<UL><LI><a href="#[a5]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_is_full
<LI><a href="#[a6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_memcpy
<BR>[Calls]<UL><LI><a href="#[a7]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_is_full
<LI><a href="#[a8]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_memcpy
<LI><a href="#[43]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_uidivmod
</UL>
<BR>[Called By]<UL><LI><a href="#[51]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TxRxCpltCallback
</UL>
<P><STRONG><a name="[94]"></a>ps2mouse_buf_init</STRONG> (Thumb, 24 bytes, Stack size 8 bytes, helpers.o(i.ps2mouse_buf_init))
<P><STRONG><a name="[98]"></a>ps2mouse_buf_init</STRONG> (Thumb, 24 bytes, Stack size 8 bytes, helpers.o(i.ps2mouse_buf_init))
<BR><BR>[Stack]<UL><LI>Max Depth = 28<LI>Call Chain = ps2mouse_buf_init &rArr; malloc
</UL>
<BR>[Calls]<UL><LI><a href="#[a7]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_reset
<LI><a href="#[9c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;malloc
<BR>[Calls]<UL><LI><a href="#[a9]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_reset
<LI><a href="#[9f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;malloc
</UL>
<BR>[Called By]<UL><LI><a href="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
</UL>
<P><STRONG><a name="[a5]"></a>ps2mouse_buf_is_full</STRONG> (Thumb, 28 bytes, Stack size 8 bytes, helpers.o(i.ps2mouse_buf_is_full))
<P><STRONG><a name="[a7]"></a>ps2mouse_buf_is_full</STRONG> (Thumb, 28 bytes, Stack size 8 bytes, helpers.o(i.ps2mouse_buf_is_full))
<BR><BR>[Stack]<UL><LI>Max Depth = 20<LI>Call Chain = ps2mouse_buf_is_full &rArr; __aeabi_uidivmod
</UL>
<BR>[Calls]<UL><LI><a href="#[43]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_uidivmod
@@ -1075,124 +1086,126 @@ Global Symbols
</UL>
<P><STRONG><a name="[b4]"></a>ps2mouse_buf_peek</STRONG> (Thumb, 22 bytes, Stack size 0 bytes, helpers.o(i.ps2mouse_buf_peek))
<BR><BR>[Called By]<UL><LI><a href="#[98]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
<BR><BR>[Called By]<UL><LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
</UL>
<P><STRONG><a name="[a8]"></a>ps2mouse_buf_pop</STRONG> (Thumb, 24 bytes, Stack size 8 bytes, helpers.o(i.ps2mouse_buf_pop))
<P><STRONG><a name="[aa]"></a>ps2mouse_buf_pop</STRONG> (Thumb, 24 bytes, Stack size 8 bytes, helpers.o(i.ps2mouse_buf_pop))
<BR><BR>[Stack]<UL><LI>Max Depth = 20<LI>Call Chain = ps2mouse_buf_pop &rArr; __aeabi_uidivmod
</UL>
<BR>[Calls]<UL><LI><a href="#[43]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_uidivmod
</UL>
<BR>[Called By]<UL><LI><a href="#[98]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
<BR>[Called By]<UL><LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
</UL>
<P><STRONG><a name="[a7]"></a>ps2mouse_buf_reset</STRONG> (Thumb, 22 bytes, Stack size 8 bytes, helpers.o(i.ps2mouse_buf_reset))
<P><STRONG><a name="[a9]"></a>ps2mouse_buf_reset</STRONG> (Thumb, 22 bytes, Stack size 8 bytes, helpers.o(i.ps2mouse_buf_reset))
<BR><BR>[Stack]<UL><LI>Max Depth = 8<LI>Call Chain = ps2mouse_buf_reset
</UL>
<BR>[Calls]<UL><LI><a href="#[32]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_memclr
</UL>
<BR>[Called By]<UL><LI><a href="#[94]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_init
<BR>[Called By]<UL><LI><a href="#[98]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_init
</UL>
<P><STRONG><a name="[a9]"></a>ps2mouse_get_bus_status</STRONG> (Thumb, 92 bytes, Stack size 8 bytes, ps2mouse.o(i.ps2mouse_get_bus_status))
<P><STRONG><a name="[ab]"></a>ps2mouse_get_bus_status</STRONG> (Thumb, 92 bytes, Stack size 8 bytes, ps2mouse.o(i.ps2mouse_get_bus_status))
<BR><BR>[Stack]<UL><LI>Max Depth = 8<LI>Call Chain = ps2mouse_get_bus_status
</UL>
<BR>[Calls]<UL><LI><a href="#[a0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_ReadPin
<BR>[Calls]<UL><LI><a href="#[a3]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_ReadPin
</UL>
<BR>[Called By]<UL><LI><a href="#[98]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
<BR>[Called By]<UL><LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
<LI><a href="#[b5]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_wait_for_idle
<LI><a href="#[b1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_read
<LI><a href="#[b2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_read
</UL>
<P><STRONG><a name="[aa]"></a>ps2mouse_get_outgoing_data</STRONG> (Thumb, 166 bytes, Stack size 16 bytes, ps2mouse.o(i.ps2mouse_get_outgoing_data))
<P><STRONG><a name="[ac]"></a>ps2mouse_get_outgoing_data</STRONG> (Thumb, 166 bytes, Stack size 16 bytes, ps2mouse.o(i.ps2mouse_get_outgoing_data))
<BR><BR>[Stack]<UL><LI>Max Depth = 16<LI>Call Chain = ps2mouse_get_outgoing_data
</UL>
<BR>[Calls]<UL><LI><a href="#[32]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_memclr
</UL>
<BR>[Called By]<UL><LI><a href="#[98]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
<BR>[Called By]<UL><LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
</UL>
<P><STRONG><a name="[ab]"></a>ps2mouse_host_req_reply</STRONG> (Thumb, 402 bytes, Stack size 24 bytes, ps2mouse.o(i.ps2mouse_host_req_reply))
<P><STRONG><a name="[ad]"></a>ps2mouse_host_req_reply</STRONG> (Thumb, 402 bytes, Stack size 24 bytes, ps2mouse.o(i.ps2mouse_host_req_reply))
<BR><BR>[Stack]<UL><LI>Max Depth = 64<LI>Call Chain = ps2mouse_host_req_reply &rArr; ps2mouse_read &rArr; ps2mouse_get_bus_status
</UL>
<BR>[Calls]<UL><LI><a href="#[b0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;reset_accumulators
<LI><a href="#[ad]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write_delay_start
<LI><a href="#[ae]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write
<LI><a href="#[af]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_restore_defaults
<LI><a href="#[ac]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_reset
<LI><a href="#[b1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_read
<LI><a href="#[8d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__ARM_common_switch8
<BR>[Calls]<UL><LI><a href="#[b1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;reset_accumulators
<LI><a href="#[ae]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write_delay_start
<LI><a href="#[af]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write
<LI><a href="#[b0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_restore_defaults
<LI><a href="#[8d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_reset
<LI><a href="#[b2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_read
<LI><a href="#[92]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__ARM_common_switch8
</UL>
<BR>[Called By]<UL><LI><a href="#[98]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
<BR>[Called By]<UL><LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
</UL>
<P><STRONG><a name="[92]"></a>ps2mouse_init</STRONG> (Thumb, 22 bytes, Stack size 8 bytes, ps2mouse.o(i.ps2mouse_init))
<P><STRONG><a name="[96]"></a>ps2mouse_init</STRONG> (Thumb, 22 bytes, Stack size 8 bytes, ps2mouse.o(i.ps2mouse_init))
<BR><BR>[Stack]<UL><LI>Max Depth = 16<LI>Call Chain = ps2mouse_init &rArr; ps2mouse_reset &rArr; ps2mouse_restore_defaults
</UL>
<BR>[Calls]<UL><LI><a href="#[ac]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_reset
<LI><a href="#[b2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_release_lines
<BR>[Calls]<UL><LI><a href="#[8d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_reset
<LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_release_lines
</UL>
<BR>[Called By]<UL><LI><a href="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
</UL>
<P><STRONG><a name="[b1]"></a>ps2mouse_read</STRONG> (Thumb, 244 bytes, Stack size 32 bytes, ps2mouse.o(i.ps2mouse_read))
<P><STRONG><a name="[b2]"></a>ps2mouse_read</STRONG> (Thumb, 244 bytes, Stack size 32 bytes, ps2mouse.o(i.ps2mouse_read))
<BR><BR>[Stack]<UL><LI>Max Depth = 40<LI>Call Chain = ps2mouse_read &rArr; ps2mouse_get_bus_status
</UL>
<BR>[Calls]<UL><LI><a href="#[a9]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_get_bus_status
<BR>[Calls]<UL><LI><a href="#[ab]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_get_bus_status
<LI><a href="#[38]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GetTick
<LI><a href="#[52]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_WritePin
<LI><a href="#[a0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_ReadPin
<LI><a href="#[a3]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_ReadPin
<LI><a href="#[88]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;delay_us
</UL>
<BR>[Called By]<UL><LI><a href="#[98]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
<LI><a href="#[ab]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_host_req_reply
<BR>[Called By]<UL><LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
<LI><a href="#[ad]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_host_req_reply
</UL>
<P><STRONG><a name="[b2]"></a>ps2mouse_release_lines</STRONG> (Thumb, 26 bytes, Stack size 8 bytes, ps2mouse.o(i.ps2mouse_release_lines))
<P><STRONG><a name="[8e]"></a>ps2mouse_release_lines</STRONG> (Thumb, 26 bytes, Stack size 8 bytes, ps2mouse.o(i.ps2mouse_release_lines))
<BR><BR>[Stack]<UL><LI>Max Depth = 8<LI>Call Chain = ps2mouse_release_lines
</UL>
<BR>[Calls]<UL><LI><a href="#[52]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_WritePin
</UL>
<BR>[Called By]<UL><LI><a href="#[98]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
<LI><a href="#[92]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_init
<BR>[Called By]<UL><LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
<LI><a href="#[58]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;handle_protocol_switch
<LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_init
</UL>
<P><STRONG><a name="[ac]"></a>ps2mouse_reset</STRONG> (Thumb, 20 bytes, Stack size 4 bytes, ps2mouse.o(i.ps2mouse_reset))
<P><STRONG><a name="[8d]"></a>ps2mouse_reset</STRONG> (Thumb, 20 bytes, Stack size 4 bytes, ps2mouse.o(i.ps2mouse_reset))
<BR><BR>[Stack]<UL><LI>Max Depth = 8<LI>Call Chain = ps2mouse_reset &rArr; ps2mouse_restore_defaults
</UL>
<BR>[Calls]<UL><LI><a href="#[af]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_restore_defaults
<BR>[Calls]<UL><LI><a href="#[b0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_restore_defaults
</UL>
<BR>[Called By]<UL><LI><a href="#[92]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_init
<LI><a href="#[ab]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_host_req_reply
<BR>[Called By]<UL><LI><a href="#[58]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;handle_protocol_switch
<LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_init
<LI><a href="#[ad]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_host_req_reply
</UL>
<P><STRONG><a name="[af]"></a>ps2mouse_restore_defaults</STRONG> (Thumb, 30 bytes, Stack size 4 bytes, ps2mouse.o(i.ps2mouse_restore_defaults))
<P><STRONG><a name="[b0]"></a>ps2mouse_restore_defaults</STRONG> (Thumb, 30 bytes, Stack size 4 bytes, ps2mouse.o(i.ps2mouse_restore_defaults))
<BR><BR>[Stack]<UL><LI>Max Depth = 4<LI>Call Chain = ps2mouse_restore_defaults
</UL>
<BR>[Calls]<UL><LI><a href="#[b0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;reset_accumulators
<BR>[Calls]<UL><LI><a href="#[b1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;reset_accumulators
</UL>
<BR>[Called By]<UL><LI><a href="#[ac]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_reset
<LI><a href="#[ab]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_host_req_reply
<BR>[Called By]<UL><LI><a href="#[8d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_reset
<LI><a href="#[ad]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_host_req_reply
</UL>
<P><STRONG><a name="[b3]"></a>ps2mouse_send_update</STRONG> (Thumb, 38 bytes, Stack size 16 bytes, ps2mouse.o(i.ps2mouse_send_update))
<BR><BR>[Stack]<UL><LI>Max Depth = 52<LI>Call Chain = ps2mouse_send_update &rArr; ps2mouse_write &rArr; ps2mouse_write_nowait &rArr; delay_us
</UL>
<BR>[Calls]<UL><LI><a href="#[ae]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write
<BR>[Calls]<UL><LI><a href="#[af]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write
</UL>
<BR>[Called By]<UL><LI><a href="#[98]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
<BR>[Called By]<UL><LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_update
</UL>
<P><STRONG><a name="[98]"></a>ps2mouse_update</STRONG> (Thumb, 90 bytes, Stack size 8 bytes, main.o(i.ps2mouse_update))
<P><STRONG><a name="[9b]"></a>ps2mouse_update</STRONG> (Thumb, 90 bytes, Stack size 8 bytes, main.o(i.ps2mouse_update))
<BR><BR>[Stack]<UL><LI>Max Depth = 72<LI>Call Chain = ps2mouse_update &rArr; ps2mouse_host_req_reply &rArr; ps2mouse_read &rArr; ps2mouse_get_bus_status
</UL>
<BR>[Calls]<UL><LI><a href="#[b3]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_send_update
<LI><a href="#[b2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_release_lines
<LI><a href="#[b1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_read
<LI><a href="#[ab]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_host_req_reply
<LI><a href="#[aa]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_get_outgoing_data
<LI><a href="#[a9]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_get_bus_status
<LI><a href="#[a8]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_pop
<LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_release_lines
<LI><a href="#[b2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_read
<LI><a href="#[ad]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_host_req_reply
<LI><a href="#[ac]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_get_outgoing_data
<LI><a href="#[ab]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_get_bus_status
<LI><a href="#[aa]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_pop
<LI><a href="#[b4]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_peek
</UL>
<BR>[Called By]<UL><LI><a href="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
@@ -1201,55 +1214,55 @@ Global Symbols
<P><STRONG><a name="[b5]"></a>ps2mouse_wait_for_idle</STRONG> (Thumb, 38 bytes, Stack size 16 bytes, ps2mouse.o(i.ps2mouse_wait_for_idle))
<BR><BR>[Stack]<UL><LI>Max Depth = 24<LI>Call Chain = ps2mouse_wait_for_idle &rArr; ps2mouse_get_bus_status
</UL>
<BR>[Calls]<UL><LI><a href="#[a9]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_get_bus_status
<BR>[Calls]<UL><LI><a href="#[ab]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_get_bus_status
<LI><a href="#[38]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GetTick
</UL>
<BR>[Called By]<UL><LI><a href="#[ad]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write_delay_start
<LI><a href="#[ae]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write
<BR>[Called By]<UL><LI><a href="#[ae]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write_delay_start
<LI><a href="#[af]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write
</UL>
<P><STRONG><a name="[ae]"></a>ps2mouse_write</STRONG> (Thumb, 26 bytes, Stack size 8 bytes, ps2mouse.o(i.ps2mouse_write))
<P><STRONG><a name="[af]"></a>ps2mouse_write</STRONG> (Thumb, 26 bytes, Stack size 8 bytes, ps2mouse.o(i.ps2mouse_write))
<BR><BR>[Stack]<UL><LI>Max Depth = 36<LI>Call Chain = ps2mouse_write &rArr; ps2mouse_write_nowait &rArr; delay_us
</UL>
<BR>[Calls]<UL><LI><a href="#[b6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write_nowait
<LI><a href="#[b5]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_wait_for_idle
</UL>
<BR>[Called By]<UL><LI><a href="#[b3]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_send_update
<LI><a href="#[ab]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_host_req_reply
<LI><a href="#[ad]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_host_req_reply
</UL>
<P><STRONG><a name="[ad]"></a>ps2mouse_write_delay_start</STRONG> (Thumb, 34 bytes, Stack size 8 bytes, ps2mouse.o(i.ps2mouse_write_delay_start))
<P><STRONG><a name="[ae]"></a>ps2mouse_write_delay_start</STRONG> (Thumb, 34 bytes, Stack size 8 bytes, ps2mouse.o(i.ps2mouse_write_delay_start))
<BR><BR>[Stack]<UL><LI>Max Depth = 36<LI>Call Chain = ps2mouse_write_delay_start &rArr; ps2mouse_write_nowait &rArr; delay_us
</UL>
<BR>[Calls]<UL><LI><a href="#[b6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write_nowait
<LI><a href="#[b5]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_wait_for_idle
<LI><a href="#[88]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;delay_us
</UL>
<BR>[Called By]<UL><LI><a href="#[ab]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_host_req_reply
<BR>[Called By]<UL><LI><a href="#[ad]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_host_req_reply
</UL>
<P><STRONG><a name="[b6]"></a>ps2mouse_write_nowait</STRONG> (Thumb, 282 bytes, Stack size 24 bytes, ps2mouse.o(i.ps2mouse_write_nowait))
<BR><BR>[Stack]<UL><LI>Max Depth = 28<LI>Call Chain = ps2mouse_write_nowait &rArr; delay_us
</UL>
<BR>[Calls]<UL><LI><a href="#[52]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_WritePin
<LI><a href="#[a0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_ReadPin
<LI><a href="#[a3]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_ReadPin
<LI><a href="#[88]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;delay_us
</UL>
<BR>[Called By]<UL><LI><a href="#[ad]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write_delay_start
<LI><a href="#[ae]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write
<BR>[Called By]<UL><LI><a href="#[ae]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write_delay_start
<LI><a href="#[af]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_write
</UL>
<P><STRONG><a name="[b0]"></a>reset_accumulators</STRONG> (Thumb, 12 bytes, Stack size 0 bytes, ps2mouse.o(i.reset_accumulators))
<BR><BR>[Called By]<UL><LI><a href="#[af]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_restore_defaults
<LI><a href="#[ab]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_host_req_reply
<P><STRONG><a name="[b1]"></a>reset_accumulators</STRONG> (Thumb, 12 bytes, Stack size 0 bytes, ps2mouse.o(i.reset_accumulators))
<BR><BR>[Called By]<UL><LI><a href="#[b0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_restore_defaults
<LI><a href="#[ad]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_host_req_reply
</UL>
<P><STRONG><a name="[9a]"></a>spi_error_dump_reboot</STRONG> (Thumb, 72 bytes, Stack size 0 bytes, main.o(i.spi_error_dump_reboot))
<P><STRONG><a name="[9d]"></a>spi_error_dump_reboot</STRONG> (Thumb, 72 bytes, Stack size 0 bytes, main.o(i.spi_error_dump_reboot))
<BR><BR>[Stack]<UL><LI>Max Depth = 24<LI>Call Chain = spi_error_dump_reboot &rArr; __2printf
</UL>
<BR>[Calls]<UL><LI><a href="#[b7]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_TogglePin
<LI><a href="#[37]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_Delay
<LI><a href="#[97]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__2printf
<LI><a href="#[8c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__2printf
</UL>
<BR>[Called By]<UL><LI><a href="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
</UL>
@@ -1353,9 +1366,9 @@ Local Symbols
</UL>
<BR>[Calls]<UL><LI><a href="#[51]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TxRxCpltCallback
<LI><a href="#[38]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GetTick
<LI><a href="#[4d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_ErrorCallback
<LI><a href="#[7c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SPI_EndRxTxTransaction
<LI><a href="#[7d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_RxCpltCallback
<LI><a href="#[4d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_ErrorCallback
</UL>
<BR>[Called By]<UL><LI><a href="#[2d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SPI_2linesTxISR_8BIT
<LI><a href="#[2b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SPI_2linesTxISR_16BIT

View File

File diff suppressed because it is too large Load Diff

View File

@@ -39,7 +39,7 @@ F (..\Src\helpers.c)(0x61BBC263)(--c99 -c --cpu Cortex-M0 -D__MICROLIB -g -O3 --
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.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)
@@ -72,11 +72,11 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim_ex.h)(0x5DFA0893)
I (../Inc/helpers.h)(0x61BC5DFC)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h)(0x5DFA0893)
I (../Inc/stm32f0xx_hal_conf.h)(0x61B5F65A)
I (../Inc/main.h)(0x61B5F65A)
I (../Inc/main.h)(0x61B5F65A)
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/stm32f072xb.h)(0x5DFA0880)
I (../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f072xb.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)
@@ -109,13 +109,13 @@ 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
-D__UVISION_VERSION="529" -D_RTE_ -DSTM32F072xB -DUSE_HAL_DRIVER -DSTM32F072xB
-o ibmpc\ps2kb.o --omf_browse ibmpc\ps2kb.crf --depend ibmpc\ps2kb.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 (C:\Keil_v5\ARM\ARMCC\include\stdlib.h)(0x5D9B429A)
I (../Inc/helpers.h)(0x61BC5DFC)
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h)(0x5DFA0893)
I (../Inc/stm32f0xx_hal_conf.h)(0x61B5F65A)
@@ -148,14 +148,14 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_tim_ex.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)(0x61B61A00)
I (../Inc/shared.h)(0x61B61A00)
I (../Inc/ps2kb.h)(0x61BC5950)
I (../Inc/delay_us.h)(0x617487C7)
F (..\Src\ps2mouse.c)(0x61B5F6A1)(--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\_ibmpc
F (..\Src\ps2mouse.c)(0x61BC5DFD)(--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\_ibmpc
-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
@@ -190,10 +190,10 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.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_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.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)

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

@@ -83,15 +83,12 @@ uint8_t serial_mouse_rts_response;
volatile uint8_t rts_active;
uint8_t spi_error_occured;
#define SUPPORTED_PROTOCOL_SIZE 5
uint8_t protocol_status[SUPPORTED_PROTOCOL_SIZE] =
{
PROTOCOL_AT_PS2_KB | 0x80,
PROTOCOL_XT_KB | 0x80,
PROTOCOL_PS2_MOUSE | 0x80,
PROTOCOL_MICROSOFT_SERIAL_MOUSE | 0x80,
PROTOCOL_GENERIC_GAMEPORT_GAMEPAD | 0x80,
};
#define PROTOCOL_STATUS_NOT_AVAILABLE 0
#define PROTOCOL_STATUS_ENABLED 1
#define PROTOCOL_STATUS_DISABLED 2
#define PROTOCOL_LOOKUP_SIZE 16
uint8_t protocol_lookup[PROTOCOL_LOOKUP_SIZE];
/* USER CODE END PV */
@@ -121,6 +118,44 @@ int16_t byte_to_int16_t(uint8_t lsb, uint8_t msb)
return (int16_t)((msb << 8) | lsb);
}
void handle_protocol_switch(uint8_t before, uint8_t after)
{
if(before == after)
return;
if((before & 0x7f) != (after & 0x7f))
return;
if((before & 0x80) > (after & 0x80)) // switching off
{
switch(after & 0x7f)
{
case PROTOCOL_AT_PS2_KB:
printf("PS2KB off\n");
ps2kb_release_lines();
ps2kb_reset();
break;
// case PROTOCOL_XT_KB:
// printf("XTKB off\n");
// break;
case PROTOCOL_PS2_MOUSE:
printf("PS2MOUSE off\n");
ps2mouse_reset();
ps2mouse_release_lines();
break;
// case PROTOCOL_MICROSOFT_SERIAL_MOUSE:
// printf("SERMOUSE off\n");
// break;
// case PROTOCOL_GENERIC_GAMEPORT_GAMEPAD:
// printf("GGP off\n");
// release all buttons, reset digital pot to middle
// break;
}
}
}
/*
This is called when a new SPI packet is received
This is part of an ISR, so keep it short!
@@ -165,8 +200,17 @@ void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi)
spi_transmit_buf[5] = version_major;
spi_transmit_buf[6] = version_minor;
spi_transmit_buf[7] = version_patch;
for (int i = 0; i < SUPPORTED_PROTOCOL_SIZE; ++i)
spi_transmit_buf[8+i] = protocol_status[i];
uint8_t curr_index = 8;
for (int i = 0; i < PROTOCOL_LOOKUP_SIZE; i++)
{
if(protocol_lookup[i] == PROTOCOL_STATUS_NOT_AVAILABLE)
continue;
else if(protocol_lookup[i] == PROTOCOL_STATUS_DISABLED)
spi_transmit_buf[curr_index] = i;
else if(protocol_lookup[i] == PROTOCOL_STATUS_ENABLED)
spi_transmit_buf[curr_index] = i & 0x80;
curr_index++;
}
}
else if(backup_spi1_recv_buf[SPI_BUF_INDEX_MSG_TYPE] == SPI_MOSI_MSG_TYPE_SET_PROTOCOL)
{
@@ -174,12 +218,9 @@ void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi)
{
if(backup_spi1_recv_buf[i] == 0)
break;
uint8_t* result = find_in_array_7bit(backup_spi1_recv_buf[i], protocol_status, protocol_status + SUPPORTED_PROTOCOL_SIZE - 1);
if(result != NULL)
{
*result = backup_spi1_recv_buf[i];
// handle protocol on/off setup here
}
uint8_t protocol_index = backup_spi1_recv_buf[i] & 0x7f;
if(protocol_index < PROTOCOL_LOOKUP_SIZE)
handle_protocol_switch(protocol_lookup[protocol_index], backup_spi1_recv_buf[i]);
}
}
HAL_SPI_TransmitReceive_IT(&hspi1, spi_transmit_buf, spi_recv_buf, SPI_BUF_SIZE);
@@ -319,6 +360,16 @@ void spi_error_dump_reboot(void)
const char boot_message[] = "USB4VC Protocol Board\nIBM PC Compatible\ndekuNukem 2022";
void protocol_lookup_init(void)
{
memset(protocol_lookup, PROTOCOL_STATUS_NOT_AVAILABLE, PROTOCOL_LOOKUP_SIZE);
protocol_lookup[PROTOCOL_AT_PS2_KB] = PROTOCOL_STATUS_ENABLED;
protocol_lookup[PROTOCOL_XT_KB] = PROTOCOL_STATUS_ENABLED;
protocol_lookup[PROTOCOL_PS2_MOUSE] = PROTOCOL_STATUS_ENABLED;
protocol_lookup[PROTOCOL_MICROSOFT_SERIAL_MOUSE] = PROTOCOL_STATUS_ENABLED;
protocol_lookup[PROTOCOL_GENERIC_GAMEPORT_GAMEPAD] = PROTOCOL_STATUS_ENABLED;
}
/* USER CODE END 0 */
/**
@@ -381,6 +432,7 @@ int main(void)
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
// if()
ps2mouse_update();
// serial_mouse_update();
ps2kb_update();

View File

@@ -171,7 +171,7 @@ void ps2kb_release_lines(void)
PS2KB_DATA_HI();
}
void ps2kb_reset()
void ps2kb_reset(void)
{
ps2kb_current_scancode_set = 2;
ps2kb_data_reporting_enabled = 1;

View File

@@ -64,7 +64,7 @@ void reset_accumulators(void)
scroll_accumulator = 0;
}
void ps2mouse_restore_defaults()
void ps2mouse_restore_defaults(void)
{
ps2mouse_sampling_rate = 100;
ps2mouse_resolution = 2;

View File

@@ -1,12 +1,60 @@
uint8_t* find_in_array_7bit(uint8_t value, uint8_t* start, uint8_t* end)
{
uint8_t* curr = start;
while(curr <= end)
{
if(((*curr) & 0x7f) == (value & 0x7f))
return curr;
curr++;
}
return NULL;
}
#define SUPPORTED_PROTOCOL_SIZE 5
uint8_t protocol_status[SUPPORTED_PROTOCOL_SIZE] =
{
PROTOCOL_AT_PS2_KB | 0x80,
PROTOCOL_XT_KB | 0x80,
PROTOCOL_PS2_MOUSE | 0x80,
PROTOCOL_MICROSOFT_SERIAL_MOUSE | 0x80,
PROTOCOL_GENERIC_GAMEPORT_GAMEPAD | 0x80,
};
// else // switching on
// {
// switch(after & 0x7f)
// {
// case PROTOCOL_AT_PS2_KB:
// printf("PS2KB on\n");
// break;
// case PROTOCOL_XT_KB:
// printf("XTKB on\n");
// break;
// case PROTOCOL_PS2_MOUSE:
// printf("PS2MOUSE on\n");
// break;
// case PROTOCOL_MICROSOFT_SERIAL_MOUSE:
// printf("SERMOUSE on\n");
// break;
// case PROTOCOL_GENERIC_GAMEPORT_GAMEPAD:
// printf("GGP on\n");
// break;
// }
// }
// printf("mouse req: %d", ps2mouse_host_cmd);
uint8_t value = 32;
uint8_t addr = ((value >> 8 & 0x01) | 0);
value = (value & 0xFF);
printf("w %d\n", HAL_I2C_Mem_Write(&hi2c2,MCP4451_I2C_ADDRESS,addr,1,&value,1,100));
printf("%d\n--\n", after & 0x7f);
printf(" f %d %d\n", ((*curr) & 0x7f), (value & 0x7f));
printf("%d %d\n", i, backup_spi1_recv_buf[i]);
printf("%d %d\n", before, after);
printf("%d %d\n", before & 0x80, after & 0x80);
// printf("0x%x\n", this_mouse_event->button_left);
// printf("0x%x\n", this_mouse_event->button_right);

View File

@@ -28,7 +28,7 @@ GPIO.output(PBOARD_DFU_PIN, GPIO.LOW)
usb4vc_oled.print_welcome_screen(RPI_APP_VERSION_TUPLE)
reset_pboard()
usb4vc_usb_scan.set_protocol()
# usb4vc_usb_scan.set_protocol()
usb4vc_usb_scan.get_pboard_info()
# time.sleep(5)