Page 147 - MDP2022-3
P. 147
Serial.println("SwA5 Pressed!!");
HC06.write("K");
}
else if(!swG_State && !swB_State && !swR_State && !swL_State){
//Serial.println("SwA5 Pressed!!");
HC06.write("S");
}
swA1_PreState = swA1_State;
swA2_PreState = swA2_State;
swA3_PreState = swA3_State;
swA4_PreState = swA4_State;
swA5_PreState = swA5_State;
}
# ARM 프로세서 코드
#include "project.h"
#define rxBufferMax 255
unsigned char rxBuffer[rxBufferMax];
int rxBufferPP = 0;
int rxBufferGP = 0;
int flag = 0;
bool RazerFlag = false;
uint32_t pinState = 1UL;
void mUARTHandler() {
if((mUART_HW->INTR_RX_MASKED & SCB_INTR_RX_MASKED_NOT_EMPTY_Msk)
!= 0) {
mUART_HW->INTR_RX = mUART_HW->INTR_RX &
SCB_INTR_RX_NOT_EMPTY_Msk;
rxBuffer[rxBufferPP++] = mUART_Get();
rxBufferPP %= rxBufferMax;
}
}
unsigned char getReceive() {