board/sg-led.c: Remove error path from update cmd

No way to return it to the host application anyway since this
command is unacknowledged.
This commit is contained in:
Tau 2019-02-25 21:55:49 -05:00
parent 8606d17699
commit 2cbb18604b
3 changed files with 4 additions and 11 deletions

View File

@ -160,24 +160,18 @@ static HRESULT sg_led_cmd_set_color(
const struct sg_led *led,
const struct sg_led_req_set_color *req)
{
HRESULT hr;
if (req->req.payload_len != sizeof(req->payload)) {
sg_led_dprintf(led, "%s: Payload size is incorrect\n", __func__);
goto fail;
}
hr = led->ops->set_color(
led->ops->set_color(
led->ops_ctx,
req->payload[0],
req->payload[1],
req->payload[2]);
if (FAILED(hr)) {
sg_led_dprintf(led, "led->ops->set_color: Error %x\n", hr);
}
fail:
/* No response */
return S_FALSE;

View File

@ -8,7 +8,7 @@
struct sg_led_ops {
HRESULT (*reset)(void *ctx);
HRESULT (*set_color)(void *ctx, uint8_t r, uint8_t g, uint8_t b);
void (*set_color)(void *ctx, uint8_t r, uint8_t g, uint8_t b);
};
struct sg_led {

View File

@ -26,7 +26,7 @@ static HRESULT com12_mifare_read_luid(
uint32_t uid,
uint8_t *luid,
size_t nbytes);
static HRESULT com12_led_set_color(void *ctx, uint8_t r, uint8_t g, uint8_t b);
static void com12_led_set_color(void *ctx, uint8_t r, uint8_t g, uint8_t b);
static const struct sg_nfc_ops com12_nfc_ops = {
.mifare_poll = com12_mifare_poll,
@ -188,7 +188,6 @@ static HRESULT com12_mifare_read_luid(
return S_OK;
}
static HRESULT com12_led_set_color(void *ctx, uint8_t r, uint8_t g, uint8_t b)
static void com12_led_set_color(void *ctx, uint8_t r, uint8_t g, uint8_t b)
{
return S_OK;
}