feat: add STM32 four-channel weighing firmware
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#include "stm32f10x.h"
|
||||
|
||||
int _write(int file, char *data, int length)
|
||||
{
|
||||
int index;
|
||||
|
||||
(void)file;
|
||||
for (index = 0; index < length; ++index)
|
||||
{
|
||||
while (USART_GetFlagStatus(UART5, USART_FLAG_TC) == RESET)
|
||||
{
|
||||
}
|
||||
USART_SendData(UART5, (uint8_t)data[index]);
|
||||
}
|
||||
|
||||
return length;
|
||||
}
|
||||
Reference in New Issue
Block a user