serial mouse working, cleaned up code, fixed a bug

This commit is contained in:
dekunukem
2021-12-12 15:12:42 +00:00
parent 07dc90deec
commit 3f562d7ad4
11 changed files with 1491 additions and 1186 deletions

View File

@@ -110,8 +110,8 @@
<MDIClientArea>
<RegID>0</RegID>
<MDITabState>
<Len>440</Len>
<Data>0100000004000000010000000100000001000000010000000000000002000000000000000100000001000000000000002800000028000000010000000300000000000000010000003E433A5C55736572735C616C6C656E5C4465736B746F705C7265706F735C757362327073325C6669726D776172655C69626D70635C5372635C6D61696E2E6300000000066D61696E2E6300000000C5D4F200FFFFFFFF42433A5C55736572735C616C6C656E5C4465736B746F705C7265706F735C757362327073325C6669726D776172655C69626D70635C5372635C7073326D6F7573652E63000000000A7073326D6F7573652E6300000000FFDC7800FFFFFFFF3F433A5C55736572735C616C6C656E5C4465736B746F705C7265706F735C757362327073325C6669726D776172655C69626D70635C5372635C7073326B622E6300000000077073326B622E6300000000BECEA100FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000F400000066000000800700006A030000</Data>
<Len>724</Len>
<Data>0100000004000000010000000100000001000000010000000000000002000000000000000100000001000000000000002800000028000000010000000500000000000000010000003E433A5C55736572735C616C6C656E5C4465736B746F705C7265706F735C757362327073325C6669726D776172655C69626D70635C5372635C6D61696E2E6300000000066D61696E2E6300000000C5D4F200FFFFFFFF42433A5C55736572735C616C6C656E5C4465736B746F705C7265706F735C757362327073325C6669726D776172655C69626D70635C5372635C7073326D6F7573652E63000000000A7073326D6F7573652E6300000000FFDC7800FFFFFFFF3F433A5C55736572735C616C6C656E5C4465736B746F705C7265706F735C757362327073325C6669726D776172655C69626D70635C5372635C7073326B622E6300000000077073326B622E6300000000BECEA100FFFFFFFF69433A5C55736572735C616C6C656E5C4465736B746F705C7265706F735C757362327073325C6669726D776172655C69626D70635C447269766572735C53544D3332463078785F48414C5F4472697665725C5372635C73746D3332663078785F68616C5F756172742E63000000001473746D3332663078785F68616C5F756172742E6300000000F0A0A100FFFFFFFF68433A5C55736572735C616C6C656E5C4465736B746F705C7265706F735C757362327073325C6669726D776172655C69626D70635C447269766572735C53544D3332463078785F48414C5F4472697665725C496E635C73746D3332663078785F68616C5F6465662E68000000001373746D3332663078785F68616C5F6465662E6800000000BCA8E100FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000F400000066000000800700006A030000</Data>
</MDITabState>
</MDIClientArea>
<ViewEx>
@@ -1865,9 +1865,9 @@
<ActiveTab>0</ActiveTab>
<Doc>
<Name>../Src/main.c</Name>
<ColumnNumber>22</ColumnNumber>
<TopLine>247</TopLine>
<CurrentLine>279</CurrentLine>
<ColumnNumber>1</ColumnNumber>
<TopLine>250</TopLine>
<CurrentLine>267</CurrentLine>
<Folding>1</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
@@ -1890,6 +1890,24 @@
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_uart.c</Name>
<ColumnNumber>5</ColumnNumber>
<TopLine>847</TopLine>
<CurrentLine>861</CurrentLine>
<Folding>1</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h</Name>
<ColumnNumber>0</ColumnNumber>
<TopLine>49</TopLine>
<CurrentLine>63</CurrentLine>
<Folding>1</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
</MDIGroup>
</MDIGroups>

View File

Binary file not shown.

View File

@@ -29,7 +29,7 @@ Project File Date: 12/12/2021
Build target 'ibmpc'
compiling main.c...
linking...
Program Size: Code=9568 RO-data=248 RW-data=92 ZI-data=2132
Program Size: Code=11024 RO-data=372 RW-data=96 ZI-data=2136
FromELF: creating hex file...
"ibmpc\ibmpc.axf" - 0 Error(s), 0 Warning(s).

View File

File diff suppressed because it is too large Load Diff

View File

@@ -3,9 +3,9 @@
<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: Sun Dec 12 14:49:18 2021
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060750: Last Updated: Sun Dec 12 15:10:37 2021
<BR><P>
<H3>Maximum Stack Usage = 212 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
<H3>Maximum Stack Usage = 196 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
Call chain for Maximum Stack Depth:</H3>
main &rArr; SystemClock_Config &rArr; HAL_RCC_ClockConfig &rArr; HAL_RCC_GetSysClockFreq &rArr; __aeabi_uidivmod
<P>
@@ -74,7 +74,7 @@ Global Symbols
<P><STRONG><a name="[28]"></a>__main</STRONG> (Thumb, 0 bytes, Stack size unknown bytes, entry.o(.ARM.Collect$$$$00000000))
<BR>[Address Reference Count : 1]<UL><LI> startup_stm32f072xb.o(.text)
</UL>
<P><STRONG><a name="[9d]"></a>_main_stk</STRONG> (Thumb, 0 bytes, Stack size unknown bytes, entry2.o(.ARM.Collect$$$$00000001))
<P><STRONG><a name="[ab]"></a>_main_stk</STRONG> (Thumb, 0 bytes, Stack size unknown bytes, entry2.o(.ARM.Collect$$$$00000001))
<P><STRONG><a name="[30]"></a>_main_scatterload</STRONG> (Thumb, 0 bytes, Stack size unknown bytes, entry5.o(.ARM.Collect$$$$00000004))
<BR><BR>[Calls]<UL><LI><a href="#[31]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__scatterload
@@ -84,15 +84,15 @@ Global Symbols
<BR><BR>[Called By]<UL><LI><a href="#[31]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__scatterload
</UL>
<P><STRONG><a name="[9e]"></a>_main_clock</STRONG> (Thumb, 0 bytes, Stack size unknown bytes, entry7b.o(.ARM.Collect$$$$00000008))
<P><STRONG><a name="[ac]"></a>_main_clock</STRONG> (Thumb, 0 bytes, Stack size unknown bytes, entry7b.o(.ARM.Collect$$$$00000008))
<P><STRONG><a name="[9f]"></a>_main_cpp_init</STRONG> (Thumb, 0 bytes, Stack size unknown bytes, entry8b.o(.ARM.Collect$$$$0000000A))
<P><STRONG><a name="[ad]"></a>_main_cpp_init</STRONG> (Thumb, 0 bytes, Stack size unknown bytes, entry8b.o(.ARM.Collect$$$$0000000A))
<P><STRONG><a name="[a0]"></a>_main_init</STRONG> (Thumb, 0 bytes, Stack size unknown bytes, entry9a.o(.ARM.Collect$$$$0000000B))
<P><STRONG><a name="[ae]"></a>_main_init</STRONG> (Thumb, 0 bytes, Stack size unknown bytes, entry9a.o(.ARM.Collect$$$$0000000B))
<P><STRONG><a name="[a1]"></a>__rt_final_cpp</STRONG> (Thumb, 0 bytes, Stack size unknown bytes, entry10a.o(.ARM.Collect$$$$0000000D))
<P><STRONG><a name="[af]"></a>__rt_final_cpp</STRONG> (Thumb, 0 bytes, Stack size unknown bytes, entry10a.o(.ARM.Collect$$$$0000000D))
<P><STRONG><a name="[a2]"></a>__rt_final_exit</STRONG> (Thumb, 0 bytes, Stack size unknown bytes, entry11a.o(.ARM.Collect$$$$0000000F))
<P><STRONG><a name="[b0]"></a>__rt_final_exit</STRONG> (Thumb, 0 bytes, Stack size unknown bytes, entry11a.o(.ARM.Collect$$$$0000000F))
<P><STRONG><a name="[0]"></a>Reset_Handler</STRONG> (Thumb, 8 bytes, Stack size 0 bytes, startup_stm32f072xb.o(.text))
<BR>[Address Reference Count : 1]<UL><LI> startup_stm32f072xb.o(RESET)
@@ -188,23 +188,24 @@ Global Symbols
<P><STRONG><a name="[6]"></a>WWDG_IRQHandler</STRONG> (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32f072xb.o(.text))
<BR>[Address Reference Count : 1]<UL><LI> startup_stm32f072xb.o(RESET)
</UL>
<P><STRONG><a name="[a3]"></a>__aeabi_uidiv</STRONG> (Thumb, 0 bytes, Stack size 12 bytes, uidiv.o(.text), UNUSED)
<P><STRONG><a name="[b1]"></a>__aeabi_uidiv</STRONG> (Thumb, 0 bytes, Stack size 12 bytes, uidiv.o(.text), UNUSED)
<P><STRONG><a name="[41]"></a>__aeabi_uidivmod</STRONG> (Thumb, 44 bytes, Stack size 12 bytes, uidiv.o(.text))
<BR><BR>[Stack]<UL><LI>Max Depth = 12<LI>Call Chain = __aeabi_uidivmod
</UL>
<BR>[Called By]<UL><LI><a href="#[7f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SystemClock_Config
<LI><a href="#[90]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_pop
<LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_is_full
<LI><a href="#[a4]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_pop
<LI><a href="#[a1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_is_full
<LI><a href="#[57]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_add
<LI><a href="#[91]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_is_full
<LI><a href="#[9a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_pop
<LI><a href="#[97]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_is_full
<LI><a href="#[55]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_add
<LI><a href="#[3e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_InitTick
<LI><a href="#[47]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_RCC_GetSysClockFreq
<LI><a href="#[6b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;UART_SetConfig
</UL>
<P><STRONG><a name="[97]"></a>__aeabi_memcpy</STRONG> (Thumb, 36 bytes, Stack size 0 bytes, memcpya.o(.text))
<P><STRONG><a name="[a2]"></a>__aeabi_memcpy</STRONG> (Thumb, 36 bytes, Stack size 0 bytes, memcpya.o(.text))
<BR><BR>[Called By]<UL><LI><a href="#[57]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_add
</UL>
@@ -212,29 +213,31 @@ Global Symbols
<BR><BR>[Called By]<UL><LI><a href="#[4f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TxRxCpltCallback
</UL>
<P><STRONG><a name="[a4]"></a>__aeabi_memcpy8</STRONG> (Thumb, 0 bytes, Stack size 0 bytes, memcpya.o(.text), UNUSED)
<P><STRONG><a name="[b2]"></a>__aeabi_memcpy8</STRONG> (Thumb, 0 bytes, Stack size 0 bytes, memcpya.o(.text), UNUSED)
<P><STRONG><a name="[33]"></a>__aeabi_memset</STRONG> (Thumb, 14 bytes, Stack size 0 bytes, memseta.o(.text))
<BR><BR>[Called By]<UL><LI><a href="#[34]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;_memset$wrapper
<LI><a href="#[32]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_memclr
</UL>
<P><STRONG><a name="[a5]"></a>__aeabi_memset4</STRONG> (Thumb, 0 bytes, Stack size 0 bytes, memseta.o(.text), UNUSED)
<P><STRONG><a name="[b3]"></a>__aeabi_memset4</STRONG> (Thumb, 0 bytes, Stack size 0 bytes, memseta.o(.text), UNUSED)
<P><STRONG><a name="[a6]"></a>__aeabi_memset8</STRONG> (Thumb, 0 bytes, Stack size 0 bytes, memseta.o(.text), UNUSED)
<P><STRONG><a name="[b4]"></a>__aeabi_memset8</STRONG> (Thumb, 0 bytes, Stack size 0 bytes, memseta.o(.text), UNUSED)
<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="#[98]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_reset
<LI><a href="#[93]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_reset
<BR>[Called By]<UL><LI><a href="#[a3]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_reset
<LI><a href="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_reset
</UL>
<P><STRONG><a name="[8c]"></a>__aeabi_memclr4</STRONG> (Thumb, 0 bytes, Stack size 0 bytes, memseta.o(.text))
<BR><BR>[Called By]<UL><LI><a href="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
<P><STRONG><a name="[93]"></a>__aeabi_memclr4</STRONG> (Thumb, 0 bytes, Stack size 0 bytes, memseta.o(.text))
<BR><BR>[Called By]<UL><LI><a href="#[95]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;serial_mouse_update
<LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<LI><a href="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
</UL>
<P><STRONG><a name="[a7]"></a>__aeabi_memclr8</STRONG> (Thumb, 0 bytes, Stack size 0 bytes, memseta.o(.text), UNUSED)
<P><STRONG><a name="[b5]"></a>__aeabi_memclr8</STRONG> (Thumb, 0 bytes, Stack size 0 bytes, memseta.o(.text), UNUSED)
<P><STRONG><a name="[34]"></a>_memset$wrapper</STRONG> (Thumb, 18 bytes, Stack size 8 bytes, memseta.o(.text), UNUSED)
<BR><BR>[Calls]<UL><LI><a href="#[33]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_memset
@@ -246,7 +249,7 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[30]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;_main_scatterload
</UL>
<P><STRONG><a name="[a8]"></a>__scatterload_rt2</STRONG> (Thumb, 0 bytes, Stack size 0 bytes, init.o(.text), UNUSED)
<P><STRONG><a name="[b6]"></a>__scatterload_rt2</STRONG> (Thumb, 0 bytes, Stack size 0 bytes, init.o(.text), UNUSED)
<P><STRONG><a name="[b]"></a>EXTI0_1_IRQHandler</STRONG> (Thumb, 10 bytes, Stack size 8 bytes, stm32f0xx_it.o(i.EXTI0_1_IRQHandler))
<BR><BR>[Stack]<UL><LI>Max Depth = 16<LI>Call Chain = EXTI0_1_IRQHandler &rArr; HAL_GPIO_EXTI_IRQHandler
@@ -291,15 +294,24 @@ Global Symbols
<LI><a href="#[70]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;MX_GPIO_Init
</UL>
<P><STRONG><a name="[9c]"></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="#[a0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write_nowait
<LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
<LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_get_bus_status
</UL>
<P><STRONG><a name="[53]"></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="#[4f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TxRxCpltCallback
</UL>
<P><STRONG><a name="[50]"></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="#[4f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TxRxCpltCallback
<BR><BR>[Called By]<UL><LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<LI><a href="#[4f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TxRxCpltCallback
<LI><a href="#[70]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;MX_GPIO_Init
<LI><a href="#[9a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_release_lines
<LI><a href="#[94]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_release_lines
<LI><a href="#[a6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_release_lines
<LI><a href="#[a0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write_nowait
<LI><a href="#[9d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_release_lines
<LI><a href="#[8e]">&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))
@@ -308,6 +320,8 @@ Global Symbols
<LI><a href="#[46]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_RCC_ClockConfig
<LI><a href="#[45]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_RCCEx_PeriphCLKConfig
<LI><a href="#[37]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_Delay
<LI><a href="#[8c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
<LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
<LI><a href="#[7d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SPI_WaitFlagStateUntilTimeout
<LI><a href="#[7c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SPI_WaitFifoStateUntilTimeout
<LI><a href="#[79]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SPI_CloseRxTx_ISR
@@ -549,8 +563,8 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[5a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_TIM_Base_Init
</UL>
<P><STRONG><a name="[87]"></a>HAL_TIM_Base_Start</STRONG> (Thumb, 24 bytes, Stack size 0 bytes, stm32f0xx_hal_tim.o(i.HAL_TIM_Base_Start))
<BR><BR>[Called By]<UL><LI><a href="#[86]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;delay_us_init
<P><STRONG><a name="[89]"></a>HAL_TIM_Base_Start</STRONG> (Thumb, 24 bytes, Stack size 0 bytes, stm32f0xx_hal_tim.o(i.HAL_TIM_Base_Start))
<BR><BR>[Called By]<UL><LI><a href="#[88]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;delay_us_init
</UL>
<P><STRONG><a name="[5d]"></a>HAL_TIM_ConfigClockSource</STRONG> (Thumb, 238 bytes, Stack size 24 bytes, stm32f0xx_hal_tim.o(i.HAL_TIM_ConfigClockSource))
@@ -622,10 +636,10 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[2f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;fputc
</UL>
<P><STRONG><a name="[8e]"></a>HAL_UART_Transmit_IT</STRONG> (Thumb, 88 bytes, Stack size 12 bytes, stm32f0xx_hal_uart.o(i.HAL_UART_Transmit_IT))
<P><STRONG><a name="[a9]"></a>HAL_UART_Transmit_IT</STRONG> (Thumb, 88 bytes, Stack size 12 bytes, stm32f0xx_hal_uart.o(i.HAL_UART_Transmit_IT))
<BR><BR>[Stack]<UL><LI>Max Depth = 12<LI>Call Chain = HAL_UART_Transmit_IT
</UL>
<BR>[Called By]<UL><LI><a href="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
<BR>[Called By]<UL><LI><a href="#[95]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;serial_mouse_update
</UL>
<P><STRONG><a name="[81]"></a>HAL_UART_TxCpltCallback</STRONG> (Thumb, 2 bytes, Stack size 0 bytes, main.o(i.HAL_UART_TxCpltCallback))
@@ -758,28 +772,44 @@ Global Symbols
<BR><BR>[Calls]<UL><LI><a href="#[85]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;_printf_core
</UL>
<P><STRONG><a name="[a9]"></a>__1printf$bare</STRONG> (Thumb, 0 bytes, Stack size 8 bytes, printfb.o(i.__0printf$bare), UNUSED)
<P><STRONG><a name="[b7]"></a>__1printf$bare</STRONG> (Thumb, 0 bytes, Stack size 8 bytes, printfb.o(i.__0printf$bare), UNUSED)
<P><STRONG><a name="[8d]"></a>__2printf</STRONG> (Thumb, 0 bytes, Stack size 8 bytes, printfb.o(i.__0printf$bare))
<P><STRONG><a name="[94]"></a>__2printf</STRONG> (Thumb, 0 bytes, Stack size 8 bytes, printfb.o(i.__0printf$bare))
<BR><BR>[Stack]<UL><LI>Max Depth = 8<LI>Call Chain = __2printf
</UL>
<BR>[Called By]<UL><LI><a href="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
</UL>
<P><STRONG><a name="[aa]"></a>__scatterload_copy</STRONG> (Thumb, 14 bytes, Stack size unknown bytes, handlers.o(i.__scatterload_copy), UNUSED)
<P><STRONG><a name="[8b]"></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="#[8a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;keyboard_reply
</UL>
<P><STRONG><a name="[ab]"></a>__scatterload_null</STRONG> (Thumb, 2 bytes, Stack size unknown bytes, handlers.o(i.__scatterload_null), UNUSED)
<P><STRONG><a name="[b8]"></a>__scatterload_copy</STRONG> (Thumb, 14 bytes, Stack size unknown bytes, handlers.o(i.__scatterload_copy), UNUSED)
<P><STRONG><a name="[ac]"></a>__scatterload_zeroinit</STRONG> (Thumb, 14 bytes, Stack size unknown bytes, handlers.o(i.__scatterload_zeroinit), UNUSED)
<P><STRONG><a name="[b9]"></a>__scatterload_null</STRONG> (Thumb, 2 bytes, Stack size unknown bytes, handlers.o(i.__scatterload_null), UNUSED)
<P><STRONG><a name="[ba]"></a>__scatterload_zeroinit</STRONG> (Thumb, 14 bytes, Stack size unknown bytes, handlers.o(i.__scatterload_zeroinit), UNUSED)
<P><STRONG><a name="[56]"></a>byte_to_int16_t</STRONG> (Thumb, 8 bytes, Stack size 0 bytes, main.o(i.byte_to_int16_t))
<BR><BR>[Called By]<UL><LI><a href="#[4f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TxRxCpltCallback
</UL>
<P><STRONG><a name="[86]"></a>delay_us_init</STRONG> (Thumb, 12 bytes, Stack size 8 bytes, delay_us.o(i.delay_us_init))
<P><STRONG><a name="[86]"></a>delay_us</STRONG> (Thumb, 20 bytes, Stack size 4 bytes, delay_us.o(i.delay_us))
<BR><BR>[Stack]<UL><LI>Max Depth = 4<LI>Call Chain = delay_us
</UL>
<BR>[Calls]<UL><LI><a href="#[87]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;micros
</UL>
<BR>[Called By]<UL><LI><a href="#[a0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write_nowait
<LI><a href="#[8c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
<LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
</UL>
<P><STRONG><a name="[88]"></a>delay_us_init</STRONG> (Thumb, 12 bytes, Stack size 8 bytes, delay_us.o(i.delay_us_init))
<BR><BR>[Stack]<UL><LI>Max Depth = 8<LI>Call Chain = delay_us_init
</UL>
<BR>[Calls]<UL><LI><a href="#[87]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_TIM_Base_Start
<BR>[Calls]<UL><LI><a href="#[89]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_TIM_Base_Start
</UL>
<BR>[Called By]<UL><LI><a href="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
</UL>
@@ -791,12 +821,24 @@ Global Symbols
</UL>
<BR>[Address Reference Count : 1]<UL><LI> printfb.o(i.__0printf$bare)
</UL>
<P><STRONG><a name="[26]"></a>main</STRONG> (Thumb, 308 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
<P><STRONG><a name="[8a]"></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;HAL_UART_Transmit_IT
<LI><a href="#[52]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TransmitReceive_IT
<BR>[Calls]<UL><LI><a href="#[8c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
<LI><a href="#[8d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_reset
<LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
<LI><a href="#[8b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__ARM_common_switch8
</UL>
<BR>[Called By]<UL><LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
</UL>
<P><STRONG><a name="[26]"></a>main</STRONG> (Thumb, 126 bytes, Stack size 0 bytes, main.o(i.main))
<BR><BR>[Stack]<UL><LI>Max Depth = 196<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="#[52]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TransmitReceive_IT
<LI><a href="#[3d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_Init
<LI><a href="#[95]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;serial_mouse_update
<LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<LI><a href="#[7f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;SystemClock_Config
<LI><a href="#[78]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;MX_USART3_UART_Init
<LI><a href="#[77]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;MX_USART1_UART_Init
@@ -804,44 +846,46 @@ Global Symbols
<LI><a href="#[74]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;MX_SPI1_Init
<LI><a href="#[71]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;MX_I2C2_Init
<LI><a href="#[70]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;MX_GPIO_Init
<LI><a href="#[89]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_init
<LI><a href="#[88]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_init
<LI><a href="#[90]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_pop
<LI><a href="#[8f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_peek
<LI><a href="#[8b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_init
<LI><a href="#[8a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_init
<LI><a href="#[86]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;delay_us_init
<LI><a href="#[8d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__2printf
<LI><a href="#[8c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_memclr4
<LI><a href="#[90]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_init
<LI><a href="#[8f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_init
<LI><a href="#[92]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_init
<LI><a href="#[91]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_init
<LI><a href="#[88]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;delay_us_init
<LI><a href="#[94]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__2printf
<LI><a href="#[93]">&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="[92]"></a>malloc</STRONG> (Thumb, 92 bytes, Stack size 20 bytes, malloc.o(i.malloc))
<P><STRONG><a name="[98]"></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="#[8b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_init
<LI><a href="#[8a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_init
<BR>[Called By]<UL><LI><a href="#[92]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_init
<LI><a href="#[91]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_init
</UL>
<P><STRONG><a name="[87]"></a>micros</STRONG> (Thumb, 10 bytes, Stack size 0 bytes, delay_us.o(i.micros))
<BR><BR>[Called By]<UL><LI><a href="#[86]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;delay_us
</UL>
<P><STRONG><a name="[55]"></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="#[91]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_is_full
<BR>[Calls]<UL><LI><a href="#[97]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_is_full
<LI><a href="#[41]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_uidivmod
</UL>
<BR>[Called By]<UL><LI><a href="#[4f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TxRxCpltCallback
</UL>
<P><STRONG><a name="[8a]"></a>ps2kb_buf_init</STRONG> (Thumb, 32 bytes, Stack size 16 bytes, helpers.o(i.ps2kb_buf_init))
<P><STRONG><a name="[91]"></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="#[93]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_reset
<LI><a href="#[92]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;malloc
<BR>[Calls]<UL><LI><a href="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_reset
<LI><a href="#[98]">&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="[91]"></a>ps2kb_buf_is_full</STRONG> (Thumb, 28 bytes, Stack size 8 bytes, helpers.o(i.ps2kb_buf_is_full))
<P><STRONG><a name="[97]"></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="#[41]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_uidivmod
@@ -849,55 +893,140 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[55]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_add
</UL>
<P><STRONG><a name="[93]"></a>ps2kb_buf_reset</STRONG> (Thumb, 28 bytes, Stack size 8 bytes, helpers.o(i.ps2kb_buf_reset))
<P><STRONG><a name="[9f]"></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="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
</UL>
<P><STRONG><a name="[9a]"></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="#[41]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_uidivmod
</UL>
<BR>[Called By]<UL><LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
</UL>
<P><STRONG><a name="[99]"></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="#[8a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_init
<BR>[Called By]<UL><LI><a href="#[91]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_init
</UL>
<P><STRONG><a name="[88]"></a>ps2kb_init</STRONG> (Thumb, 22 bytes, Stack size 8 bytes, ps2kb.o(i.ps2kb_init))
<P><STRONG><a name="[9b]"></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="#[9c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_ReadPin
</UL>
<BR>[Called By]<UL><LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<LI><a href="#[8c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
<LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
</UL>
<P><STRONG><a name="[8f]"></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="#[95]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_reset
<LI><a href="#[94]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_release_lines
<BR>[Calls]<UL><LI><a href="#[8d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_reset
<LI><a href="#[9d]">&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="[94]"></a>ps2kb_release_lines</STRONG> (Thumb, 26 bytes, Stack size 8 bytes, ps2kb.o(i.ps2kb_release_lines))
<P><STRONG><a name="[9e]"></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="#[8c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
</UL>
<BR>[Called By]<UL><LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
</UL>
<P><STRONG><a name="[8e]"></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="#[50]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_WritePin
<LI><a href="#[9c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_ReadPin
<LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_get_bus_status
<LI><a href="#[86]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;delay_us
</UL>
<BR>[Called By]<UL><LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<LI><a href="#[8a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;keyboard_reply
</UL>
<P><STRONG><a name="[9d]"></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="#[50]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_WritePin
</UL>
<BR>[Called By]<UL><LI><a href="#[88]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_init
<BR>[Called By]<UL><LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_update
<LI><a href="#[8f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_init
</UL>
<P><STRONG><a name="[95]"></a>ps2kb_reset</STRONG> (Thumb, 12 bytes, Stack size 0 bytes, ps2kb.o(i.ps2kb_reset))
<BR><BR>[Called By]<UL><LI><a href="#[88]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_init
<P><STRONG><a name="[8d]"></a>ps2kb_reset</STRONG> (Thumb, 12 bytes, Stack size 0 bytes, ps2kb.o(i.ps2kb_reset))
<BR><BR>[Called By]<UL><LI><a href="#[8f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_init
<LI><a href="#[8a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;keyboard_reply
</UL>
<P><STRONG><a name="[96]"></a>ps2kb_update</STRONG> (Thumb, 130 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="#[50]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_WritePin
<LI><a href="#[9d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_release_lines
<LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_read
<LI><a href="#[9e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_press_key
<LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_get_bus_status
<LI><a href="#[8a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;keyboard_reply
<LI><a href="#[9a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_pop
<LI><a href="#[9f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_buf_peek
<LI><a href="#[93]">&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="[8c]"></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="#[a0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write_nowait
<LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_get_bus_status
<LI><a href="#[86]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;delay_us
</UL>
<BR>[Called By]<UL><LI><a href="#[9e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_press_key
<LI><a href="#[8a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;keyboard_reply
</UL>
<P><STRONG><a name="[a0]"></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="#[50]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_WritePin
<LI><a href="#[9c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_ReadPin
<LI><a href="#[86]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;delay_us
</UL>
<BR>[Called By]<UL><LI><a href="#[8c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2kb_write
</UL>
<P><STRONG><a name="[57]"></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="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_is_full
<LI><a href="#[97]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_memcpy
<BR>[Calls]<UL><LI><a href="#[a1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_is_full
<LI><a href="#[a2]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_memcpy
<LI><a href="#[41]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_uidivmod
</UL>
<BR>[Called By]<UL><LI><a href="#[4f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_SPI_TxRxCpltCallback
</UL>
<P><STRONG><a name="[8b]"></a>ps2mouse_buf_init</STRONG> (Thumb, 24 bytes, Stack size 8 bytes, helpers.o(i.ps2mouse_buf_init))
<P><STRONG><a name="[92]"></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="#[98]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_reset
<LI><a href="#[92]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;malloc
<BR>[Calls]<UL><LI><a href="#[a3]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_reset
<LI><a href="#[98]">&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="[96]"></a>ps2mouse_buf_is_full</STRONG> (Thumb, 28 bytes, Stack size 8 bytes, helpers.o(i.ps2mouse_buf_is_full))
<P><STRONG><a name="[a1]"></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="#[41]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_uidivmod
@@ -905,61 +1034,72 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[57]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_add
</UL>
<P><STRONG><a name="[8f]"></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="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
<P><STRONG><a name="[aa]"></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="#[95]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;serial_mouse_update
</UL>
<P><STRONG><a name="[90]"></a>ps2mouse_buf_pop</STRONG> (Thumb, 24 bytes, Stack size 8 bytes, helpers.o(i.ps2mouse_buf_pop))
<P><STRONG><a name="[a4]"></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="#[41]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_uidivmod
</UL>
<BR>[Called By]<UL><LI><a href="#[26]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;main
<BR>[Called By]<UL><LI><a href="#[95]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;serial_mouse_update
</UL>
<P><STRONG><a name="[98]"></a>ps2mouse_buf_reset</STRONG> (Thumb, 22 bytes, Stack size 8 bytes, helpers.o(i.ps2mouse_buf_reset))
<P><STRONG><a name="[a3]"></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="#[8b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_init
<BR>[Called By]<UL><LI><a href="#[92]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_init
</UL>
<P><STRONG><a name="[89]"></a>ps2mouse_init</STRONG> (Thumb, 22 bytes, Stack size 8 bytes, ps2mouse.o(i.ps2mouse_init))
<P><STRONG><a name="[90]"></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="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_reset
<LI><a href="#[9a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_release_lines
<BR>[Calls]<UL><LI><a href="#[a5]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_reset
<LI><a href="#[a6]">&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="[9a]"></a>ps2mouse_release_lines</STRONG> (Thumb, 26 bytes, Stack size 8 bytes, ps2mouse.o(i.ps2mouse_release_lines))
<P><STRONG><a name="[a6]"></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="#[50]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_GPIO_WritePin
</UL>
<BR>[Called By]<UL><LI><a href="#[89]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_init
<BR>[Called By]<UL><LI><a href="#[90]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_init
</UL>
<P><STRONG><a name="[99]"></a>ps2mouse_reset</STRONG> (Thumb, 20 bytes, Stack size 4 bytes, ps2mouse.o(i.ps2mouse_reset))
<P><STRONG><a name="[a5]"></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="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_restore_defaults
<BR>[Calls]<UL><LI><a href="#[a7]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_restore_defaults
</UL>
<BR>[Called By]<UL><LI><a href="#[89]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_init
<BR>[Called By]<UL><LI><a href="#[90]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_init
</UL>
<P><STRONG><a name="[9b]"></a>ps2mouse_restore_defaults</STRONG> (Thumb, 30 bytes, Stack size 4 bytes, ps2mouse.o(i.ps2mouse_restore_defaults))
<P><STRONG><a name="[a7]"></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="#[9c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;reset_accumulators
<BR>[Calls]<UL><LI><a href="#[a8]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;reset_accumulators
</UL>
<BR>[Called By]<UL><LI><a href="#[99]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_reset
<BR>[Called By]<UL><LI><a href="#[a5]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_reset
</UL>
<P><STRONG><a name="[9c]"></a>reset_accumulators</STRONG> (Thumb, 12 bytes, Stack size 0 bytes, ps2mouse.o(i.reset_accumulators))
<BR><BR>[Called By]<UL><LI><a href="#[9b]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_restore_defaults
<P><STRONG><a name="[a8]"></a>reset_accumulators</STRONG> (Thumb, 12 bytes, Stack size 0 bytes, ps2mouse.o(i.reset_accumulators))
<BR><BR>[Called By]<UL><LI><a href="#[a7]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_restore_defaults
</UL>
<P><STRONG><a name="[95]"></a>serial_mouse_update</STRONG> (Thumb, 176 bytes, Stack size 8 bytes, main.o(i.serial_mouse_update))
<BR><BR>[Stack]<UL><LI>Max Depth = 28<LI>Call Chain = serial_mouse_update &rArr; ps2mouse_buf_pop &rArr; __aeabi_uidivmod
</UL>
<BR>[Calls]<UL><LI><a href="#[a9]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;HAL_UART_Transmit_IT
<LI><a href="#[a4]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_pop
<LI><a href="#[aa]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;ps2mouse_buf_peek
<LI><a href="#[93]">&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>
<H3>

View File

File diff suppressed because it is too large Load Diff

View File

@@ -155,7 +155,7 @@ F (..\Inc\helpers.h)(0x61B52C42)()
-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

View File

Binary file not shown.

View File

Binary file not shown.

View File

@@ -70,6 +70,9 @@ ps2mouse_buf my_ps2mouse_buf;
uint8_t ps2kb_host_cmd, ps2mouse_host_cmd, buffered_code, buffered_value, ps2mouse_bus_status, ps2kb_bus_status;
mouse_event latest_mouse_event;
ps2_outgoing_buf my_ps2_outbuf;
#define SERIAL_MOUSE_BUF_SIZE 3
uint8_t serial_mouse_output_buf[SERIAL_MOUSE_BUF_SIZE];
uint8_t serial_mouse_rts_response;
/* USER CODE END PV */
@@ -216,6 +219,43 @@ void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart)
// printf("txd\n");
}
//https://everything2.com/title/Mouse+protocol
void serial_mouse_update(void)
{
if(rts_active)
{
serial_mouse_rts_response = 0x4d; // 0x4d = 'M'
HAL_UART_Transmit_IT(&huart3, &serial_mouse_rts_response, 1);
rts_active = 0;
}
mouse_event* this_mouse_event = ps2mouse_buf_peek(&my_ps2mouse_buf);
if(this_mouse_event == NULL)
return;
memset(serial_mouse_output_buf, 0, SERIAL_MOUSE_BUF_SIZE);
serial_mouse_output_buf[0] = 0xc0;
if(this_mouse_event->button_left)
serial_mouse_output_buf[0] |= 0x20;
if(this_mouse_event->button_right)
serial_mouse_output_buf[0] |= 0x10;
uint8_t serial_y = -1 * this_mouse_event->movement_y;
if(serial_y & 0x80)
serial_mouse_output_buf[0] |= 0x8;
if(serial_y & 0x40)
serial_mouse_output_buf[0] |= 0x4;
if(this_mouse_event->movement_x & 0x80)
serial_mouse_output_buf[0] |= 0x2;
if(this_mouse_event->movement_x & 0x40)
serial_mouse_output_buf[0] |= 0x1;
serial_mouse_output_buf[1] = 0x3f & this_mouse_event->movement_x;
serial_mouse_output_buf[2] = 0x3f & serial_y;
ps2mouse_buf_pop(&my_ps2mouse_buf);
HAL_UART_Transmit_IT(&huart3, serial_mouse_output_buf, 3);
}
/* USER CODE END 0 */
@@ -276,51 +316,9 @@ int main(void)
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
// ps2kb_update();
// ps2mouse_update();
if(rts_active)
{
uint8_t to_send[1] = {0x4d}; // 0x4d = M
HAL_UART_Transmit_IT(&huart3, to_send, 1);
rts_active = 0;
}
mouse_event* this_mouse_event = ps2mouse_buf_peek(&my_ps2mouse_buf);
if(this_mouse_event == NULL)
continue;
uint8_t serial_mouse_output_buf[3] = {0, 0, 0};
serial_mouse_output_buf[0] = 0xc0;
if(this_mouse_event->button_left)
serial_mouse_output_buf[0] |= 0x20;
if(this_mouse_event->button_right)
serial_mouse_output_buf[0] |= 0x10;
uint8_t serial_y = -1 * this_mouse_event->movement_y;
if(serial_y & 0x80)
serial_mouse_output_buf[0] |= 0x8;
if(serial_y & 0x40)
serial_mouse_output_buf[0] |= 0x4;
if(this_mouse_event->movement_x & 0x80)
serial_mouse_output_buf[0] |= 0x2;
if(this_mouse_event->movement_x & 0x40)
serial_mouse_output_buf[0] |= 0x1;
serial_mouse_output_buf[1] = 0x3f & this_mouse_event->movement_x;
serial_mouse_output_buf[2] = 0x3f & serial_y;
ps2mouse_buf_pop(&my_ps2mouse_buf);
// printf("0x%x\n", this_mouse_event->button_left);
// printf("0x%x\n", this_mouse_event->button_right);
// printf("0x%x\n", this_mouse_event->movement_x);
// printf("0x%x\n", this_mouse_event->movement_y);
// printf("out 0x%x\n", serial_mouse_output_buf[0]);
// printf("out 0x%x\n", serial_mouse_output_buf[1]);
// printf("out 0x%x\n", serial_mouse_output_buf[2]);
// printf("-----\n");
HAL_UART_Transmit_IT(&huart3, serial_mouse_output_buf, 3);
serial_mouse_update();
ps2kb_update();
}
/* USER CODE END 3 */

View File

@@ -2,6 +2,14 @@
// printf("0x%x\n", this_mouse_event->button_left);
// printf("0x%x\n", this_mouse_event->button_right);
// printf("0x%x\n", this_mouse_event->movement_x);
// printf("0x%x\n", this_mouse_event->movement_y);
// printf("out 0x%x\n", serial_mouse_output_buf[0]);
// printf("out 0x%x\n", serial_mouse_output_buf[1]);
// printf("out 0x%x\n", serial_mouse_output_buf[2]);
// printf("-----\n");
// printf("add before: %d %d\n", lb->tail, lb->head);
// printf("add after: %d %d\n", lb->tail, lb->head);