1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 05:15:25 +03:00

Adding support for UART0 (#14094)

This commit is contained in:
Jay Blackman 2024-12-28 16:55:15 +11:00 committed by GitHub
parent 59e308ae56
commit 31bd403446
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 131 additions and 49 deletions

View file

@ -63,7 +63,7 @@ extern "C" {
void cliSet(const char *cmdName, char *cmdline);
int cliGetSettingIndex(char *name, uint8_t length);
void *cliGetValuePointer(const clivalue_t *value);
const clivalue_t valueTable[] = {
{ .name = "array_unit_test", .type = VAR_INT8 | MODE_ARRAY | MASTER_VALUE, .config = { .array = { .length = 3}}, .pgn = PG_RESERVED_FOR_TESTING_1, .offset = 0 },
{ .name = "str_unit_test", .type = VAR_UINT8 | MODE_STRING | MASTER_VALUE, .config = { .string = { 0, 16, 0 }}, .pgn = PG_RESERVED_FOR_TESTING_1, .offset = 0 },
@ -132,7 +132,7 @@ TEST(CLIUnittest, TestCliSetArray)
TEST(CLIUnittest, TestCliSetStringNoFlags)
{
char *str = (char *)"str_unit_test = SAMPLE";
char *str = (char *)"str_unit_test = SAMPLE";
cliSet("", str);
const uint16_t index = cliGetSettingIndex(str, 13);
@ -160,8 +160,8 @@ TEST(CLIUnittest, TestCliSetStringNoFlags)
TEST(CLIUnittest, TestCliSetStringWriteOnce)
{
char *str1 = (char *)"wos_unit_test = SAMPLE";
char *str2 = (char *)"wos_unit_test = ELPMAS";
char *str1 = (char *)"wos_unit_test = SAMPLE";
char *str2 = (char *)"wos_unit_test = ELPMAS";
cliSet("", str1);
const uint16_t index = cliGetSettingIndex(str1, 13);
@ -370,6 +370,19 @@ void generateLedConfig(ledConfig_t *, char *, size_t) {}
void serialSetCtrlLineStateDtrPin(serialPort_t *, ioTag_t ) {}
void serialSetCtrlLineState(serialPort_t *, uint16_t ) {}
serialPortIdentifier_e findSerialPortByName(const char* portName, int (*cmp)(const char *portName, const char *candidate))
{
UNUSED(portName);
UNUSED(cmp);
return SERIAL_PORT_NONE;
}
const char* serialName(serialPortIdentifier_e identifier, const char* notFound)
{
UNUSED(identifier);
return notFound;
}
//void serialSetBaudRateCb(serialPort_t *, void (*)(serialPort_t *context, uint32_t baud), serialPort_t *) {}
void rescheduleTask(taskId_e, timeDelta_t){}
void schedulerSetNextStateTime(timeDelta_t ){}