This commit is contained in:
but0n 2016-08-22 22:45:12 +08:00
parent 971dc26c65
commit f9996f8672
2 changed files with 6 additions and 2 deletions

View File

@ -6,6 +6,7 @@
#define WIFI_BOUND 115200
void wifi_init();
void wifi_sendData(unsigned char cmd);
void wifi_sendSingleByte(unsigned char cmd);
void wifi_sendData();
#endif

View File

@ -28,8 +28,11 @@ void wifi_init() {
USART3->CR1 |= 1<<5;
}
void wifi_sendData(unsigned char cmd) {
void wifi_sendSingleByte(unsigned char cmd) {
USART3->DR = cmd;
while((USART3->SR & 0x40) == 0);
}
void wifi_sendData() {
}