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.remotes/1722699834674540220/tmp_refs/heads/master
parent
8606d17699
commit
2cbb18604b
|
@ -160,24 +160,18 @@ static HRESULT sg_led_cmd_set_color(
|
||||||
const struct sg_led *led,
|
const struct sg_led *led,
|
||||||
const struct sg_led_req_set_color *req)
|
const struct sg_led_req_set_color *req)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
|
||||||
|
|
||||||
if (req->req.payload_len != sizeof(req->payload)) {
|
if (req->req.payload_len != sizeof(req->payload)) {
|
||||||
sg_led_dprintf(led, "%s: Payload size is incorrect\n", __func__);
|
sg_led_dprintf(led, "%s: Payload size is incorrect\n", __func__);
|
||||||
|
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = led->ops->set_color(
|
led->ops->set_color(
|
||||||
led->ops_ctx,
|
led->ops_ctx,
|
||||||
req->payload[0],
|
req->payload[0],
|
||||||
req->payload[1],
|
req->payload[1],
|
||||||
req->payload[2]);
|
req->payload[2]);
|
||||||
|
|
||||||
if (FAILED(hr)) {
|
|
||||||
sg_led_dprintf(led, "led->ops->set_color: Error %x\n", hr);
|
|
||||||
}
|
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
/* No response */
|
/* No response */
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
struct sg_led_ops {
|
struct sg_led_ops {
|
||||||
HRESULT (*reset)(void *ctx);
|
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 {
|
struct sg_led {
|
||||||
|
|
|
@ -26,7 +26,7 @@ static HRESULT com12_mifare_read_luid(
|
||||||
uint32_t uid,
|
uint32_t uid,
|
||||||
uint8_t *luid,
|
uint8_t *luid,
|
||||||
size_t nbytes);
|
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 = {
|
static const struct sg_nfc_ops com12_nfc_ops = {
|
||||||
.mifare_poll = com12_mifare_poll,
|
.mifare_poll = com12_mifare_poll,
|
||||||
|
@ -188,7 +188,6 @@ static HRESULT com12_mifare_read_luid(
|
||||||
return S_OK;
|
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;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue