swdc: minor improvements

This commit is contained in:
2024-09-30 23:17:37 +02:00
parent 259b763a13
commit 5f817c8a36
3 changed files with 17 additions and 13 deletions

View File

@ -177,6 +177,8 @@ static HRESULT swdc_io4_poll(void *ctx, struct io4_state *state) {
static HRESULT swdc_io4_write_gpio(uint8_t* payload, size_t len)
{
assert(swdc_dll.led_set_leds != NULL);
// Just fast fail if there aren't enough bytes in the payload
if (len < 3)
return S_OK;