Add shared PySetTerminal with asynchronous cancellable macros
This commit is contained in:
@@ -18,6 +18,19 @@ static int test_terminal(void)
|
||||
uint8_t reply[] = {0x0a, 0x38, 0x65, 0xa5, 0, 0, 0xaf, 0x9b, 0, 0};
|
||||
const uint8_t test_prefix[] = {7, 66, 25, 0, 18, 0};
|
||||
size_t size;
|
||||
uint32_t bus_address;
|
||||
uint16_t bus_value;
|
||||
uint8_t bus_command;
|
||||
if (tms2812_bus_step(1, 0, 3, 5, 0x1234, &bus_address, &bus_value, &bus_command) ||
|
||||
bus_address != 0x200AU || bus_value != 0x1234 || bus_command != 57) return 20;
|
||||
if (tms2812_bus_step(1, 1, 3, 5, 0x1234, &bus_address, &bus_value, &bus_command) ||
|
||||
bus_address != 0x200BU || bus_value != 0x8035 || bus_command != 57) return 21;
|
||||
if (tms2812_bus_step(0, 0, 3, 5, 0, &bus_address, &bus_value, &bus_command) ||
|
||||
bus_address != 0x200BU || bus_value != 0x35 || bus_command != 57) return 22;
|
||||
if (tms2812_bus_step(0, 1, 3, 5, 0, &bus_address, &bus_value, &bus_command) ||
|
||||
bus_address != 0x200FU || bus_command != 56) return 23;
|
||||
if (tms2812_bus_step(0, 0, 15, 0, 0, &bus_address, &bus_value, &bus_command) != TMS2812_ERROR_RANGE ||
|
||||
tms2812_bus_step(0, 2, 0, 0, 0, &bus_address, &bus_value, &bus_command) != TMS2812_ERROR_RANGE) return 24;
|
||||
if (tms2812_build_memory_request(10, 0, 0, 0, output, sizeof output) != 8U ||
|
||||
memcmp(output, ping, sizeof ping) != 0) return 10;
|
||||
if (tms2812_build_memory_request(10, TMS2812_CMD_POKE, 0x12345678UL, 0xABCD,
|
||||
|
||||
Reference in New Issue
Block a user