googoogaagaa babies
This commit is contained in:
@@ -123,6 +123,9 @@ UARTMessage reportBuff;
|
|||||||
extern USBD_HandleTypeDef hUsbDeviceFS;
|
extern USBD_HandleTypeDef hUsbDeviceFS;
|
||||||
volatile uint8_t MODE = MODE_INACTIVE;
|
volatile uint8_t MODE = MODE_INACTIVE;
|
||||||
|
|
||||||
|
UARTMessage uartBuffer;
|
||||||
|
volatile int uartUpdateFlag = 0;
|
||||||
|
|
||||||
/* USER CODE END PV */
|
/* USER CODE END PV */
|
||||||
|
|
||||||
/* Private function prototypes -----------------------------------------------*/
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
@@ -229,11 +232,14 @@ int main(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MODE_MAINBOARD:
|
case MODE_MAINBOARD:
|
||||||
resetReport(); //Something related to this making the key stick. Likely due to race conditions
|
resetReport();
|
||||||
matrixScan(); //Removing resetReport() makes the modules inputs works but makes the key stick
|
matrixScan();//Something related to this making the key stick. Likely due to race conditions
|
||||||
//Merge the bufer to the key report
|
if(uartUpdateFlag){
|
||||||
for(int i = 0; i < sizeof(reportBuff.KEYPRESS); i++){
|
for(int i = 0; i < 12; i++){
|
||||||
REPORT.KEYPRESS[i] |= reportBuff.KEYPRESS[i];
|
REPORT.KEYPRESS[i] |= uartBuffer.KEYPRESS[i];
|
||||||
|
}
|
||||||
|
uartUpdateFlag = 0;
|
||||||
|
memset(uartBuffer.KEYPRESS, 0, 12);
|
||||||
}
|
}
|
||||||
USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t*)&REPORT, sizeof(REPORT));
|
USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t*)&REPORT, sizeof(REPORT));
|
||||||
break;
|
break;
|
||||||
@@ -242,7 +248,7 @@ int main(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
HAL_Delay();
|
HAL_Delay(100);
|
||||||
/* USER CODE END WHILE */
|
/* USER CODE END WHILE */
|
||||||
|
|
||||||
/* USER CODE BEGIN 3 */
|
/* USER CODE BEGIN 3 */
|
||||||
@@ -391,7 +397,10 @@ void handleUARTMessages(uint8_t *data, UART_HandleTypeDef *sender) {
|
|||||||
case 0xEE:
|
case 0xEE:
|
||||||
//TODO: Append message to the thingy
|
//TODO: Append message to the thingy
|
||||||
if (MODE != MODE_INACTIVE) {
|
if (MODE != MODE_INACTIVE) {
|
||||||
memcpy(msg.KEYPRESS, reportBuff.KEYPRESS, sizeof(reply.KEYPRESS));
|
for (int i = 0; i < sizeof(REPORT.KEYPRESS); i++) {
|
||||||
|
uartBuffer.KEYPRESS[i] |= msg.KEYPRESS[i];
|
||||||
|
}
|
||||||
|
uartUpdateFlag = 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
../Core/Src/main.c:150:5:main 7
|
../Core/Src/main.c:153:5:main 8
|
||||||
../Core/Src/main.c:257:6:SystemClock_Config 3
|
../Core/Src/main.c:263:6:SystemClock_Config 3
|
||||||
../Core/Src/main.c:301:6:HAL_UART_RxCpltCallback 5
|
../Core/Src/main.c:307:6:HAL_UART_RxCpltCallback 5
|
||||||
../Core/Src/main.c:320:6:HAL_UART_ErrorCallback 5
|
../Core/Src/main.c:326:6:HAL_UART_ErrorCallback 5
|
||||||
../Core/Src/main.c:338:6:findBestParent 4
|
../Core/Src/main.c:344:6:findBestParent 4
|
||||||
../Core/Src/main.c:359:6:handleUARTMessages 11
|
../Core/Src/main.c:365:6:handleUARTMessages 12
|
||||||
../Core/Src/main.c:405:6:addUSBReport 3
|
../Core/Src/main.c:414:6:addUSBReport 3
|
||||||
../Core/Src/main.c:413:6:matrixScan 4
|
../Core/Src/main.c:422:6:matrixScan 4
|
||||||
../Core/Src/main.c:426:6:resetReport 1
|
../Core/Src/main.c:435:6:resetReport 1
|
||||||
../Core/Src/main.c:437:6:Error_Handler 1
|
../Core/Src/main.c:446:6:Error_Handler 1
|
||||||
|
|||||||
Binary file not shown.
@@ -1,10 +1,10 @@
|
|||||||
../Core/Src/main.c:150:5:main 48 static
|
../Core/Src/main.c:153:5:main 48 static
|
||||||
../Core/Src/main.c:257:6:SystemClock_Config 88 static
|
../Core/Src/main.c:263:6:SystemClock_Config 88 static
|
||||||
../Core/Src/main.c:301:6:HAL_UART_RxCpltCallback 16 static
|
../Core/Src/main.c:307:6:HAL_UART_RxCpltCallback 16 static
|
||||||
../Core/Src/main.c:320:6:HAL_UART_ErrorCallback 16 static
|
../Core/Src/main.c:326:6:HAL_UART_ErrorCallback 16 static
|
||||||
../Core/Src/main.c:338:6:findBestParent 24 static
|
../Core/Src/main.c:344:6:findBestParent 24 static
|
||||||
../Core/Src/main.c:359:6:handleUARTMessages 56 static
|
../Core/Src/main.c:365:6:handleUARTMessages 64 static
|
||||||
../Core/Src/main.c:405:6:addUSBReport 24 static
|
../Core/Src/main.c:414:6:addUSBReport 24 static
|
||||||
../Core/Src/main.c:413:6:matrixScan 16 static
|
../Core/Src/main.c:422:6:matrixScan 16 static
|
||||||
../Core/Src/main.c:426:6:resetReport 8 static
|
../Core/Src/main.c:435:6:resetReport 8 static
|
||||||
../Core/Src/main.c:437:6:Error_Handler 4 static,ignoring_inline_asm
|
../Core/Src/main.c:446:6:Error_Handler 4 static,ignoring_inline_asm
|
||||||
|
|||||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user