diff options
-rw-r--r-- | firmware/include/vboot_api.h | 26 | ||||
-rw-r--r-- | firmware/lib/vboot_display.c | 2 | ||||
-rw-r--r-- | firmware/stub/vboot_api_stub.c | 3 |
3 files changed, 23 insertions, 8 deletions
diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h index c468868f..2703e05b 100644 --- a/firmware/include/vboot_api.h +++ b/firmware/include/vboot_api.h @@ -94,7 +94,11 @@ enum VbErrorPredefined_t { /* Simulated (test) error */ VBERROR_SIMULATED = 0x10016, /* Invalid parameter */ - VBERROR_INVALID_PARAMETER = 0x10017 + VBERROR_INVALID_PARAMETER = 0x10017, + /* VbExBeep() can't make sounds at all */ + VBERROR_NO_SOUND = 0x10018, + /* VbExBeep() can't make sound in the background */ + VBERROR_NO_BACKGROUND_SOUND = 0x10019 }; @@ -329,11 +333,21 @@ void VbExSleepMs(uint32_t msec); /* Play a beep tone of the specified frequency in Hz and duration in msec. * This is effectively a VbSleep() variant that makes noise. * - * The implementation should do the best it can if it cannot fully - * support this interface - for example, beeping at a fixed frequency - * if frequency support is not available. At a minimum, it must delay for - * the specified duration. */ -void VbExBeep(uint32_t msec, uint32_t frequency); + * If the audio codec can run in the background, then: + * zero frequency means OFF, non-zero frequency means ON + * zero msec means return immediately, non-zero msec means delay (and + * then OFF if needed) + * else: + * non-zero msec and non-zero frequency means ON, delay, OFF, return + * zero msec or zero frequency means do nothing and return immediately + * + * The return value is used by the caller to determine the capabilities. The + * implementation should always do the best it can if it cannot fully support + * all features - for example, beeping at a fixed frequency if frequency + * support is not available. At a minimum, it must delay for the specified + * non-zero duration. + */ +VbError_t VbExBeep(uint32_t msec, uint32_t frequency); /*****************************************************************************/ diff --git a/firmware/lib/vboot_display.c b/firmware/lib/vboot_display.c index bd2a93c8..b0166e81 100644 --- a/firmware/lib/vboot_display.c +++ b/firmware/lib/vboot_display.c @@ -315,7 +315,7 @@ VbError_t VbDisplayScreenFromGBB(VbCommonParams* cparams, uint32_t screen, */ if (gbb->major_version == GBB_MAJOR_VER && gbb->minor_version >= 1 && (gbb->flags != 0)) { - (void)VbExDisplayDebugInfo("GBB.flags is nonzero"); + (void)VbExDisplayDebugInfo("gbb.flags is nonzero"); } diff --git a/firmware/stub/vboot_api_stub.c b/firmware/stub/vboot_api_stub.c index 80368300..732facb9 100644 --- a/firmware/stub/vboot_api_stub.c +++ b/firmware/stub/vboot_api_stub.c @@ -64,7 +64,8 @@ void VbExSleepMs(uint32_t msec) { } -void VbExBeep(uint32_t msec, uint32_t frequency) { +VbError_t VbExBeep(uint32_t msec, uint32_t frequency) { + return VBERROR_SUCCESS; } |