mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-31 02:51:26 +00:00
poppy: add detachbase and attachbase uart console commands
This patch adds two commands to simulate detachbase and attachbase uart console commands to test & debug automation. BRANCH=none BUG=b:37223093 TEST=attach or detach base and check if event is generated Change-Id: Ie4a487ebd8929f0584da0b59c094f9d9aff13fb7 Signed-off-by: Subramony Sesha <subramony.sesha@intel.com> Signed-off-by: Archana Patni <archana.patni@intel.com> Signed-off-by: Jenny TC <jenny.tc@intel.com> Reviewed-on: https://chromium-review.googlesource.com/486521 Commit-Ready: Jenny Tc <jenny.tc@intel.corp-partner.google.com> Tested-by: Jenny Tc <jenny.tc@intel.corp-partner.google.com> Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
This commit is contained in:
@@ -181,6 +181,25 @@ static void base_detect_change(enum base_status status)
|
||||
static uint64_t pulse_start;
|
||||
static uint32_t pulse_width;
|
||||
|
||||
static int command_attach_base(int argc, char **argv)
|
||||
{
|
||||
host_set_single_event(EC_HOST_EVENT_MODE_CHANGE);
|
||||
tablet_set_mode(0);
|
||||
return EC_SUCCESS;
|
||||
}
|
||||
DECLARE_CONSOLE_COMMAND(attachbase, command_attach_base,
|
||||
NULL, "Simulate attach base");
|
||||
|
||||
static int command_detach_base(int argc, char **argv)
|
||||
{
|
||||
host_set_single_event(EC_HOST_EVENT_MODE_CHANGE);
|
||||
tablet_set_mode(1);
|
||||
return EC_SUCCESS;
|
||||
}
|
||||
DECLARE_CONSOLE_COMMAND(detachbase, command_detach_base,
|
||||
NULL, "Simulate detach base");
|
||||
|
||||
|
||||
static void base_detect_deferred(void)
|
||||
{
|
||||
uint64_t time_now = get_time().val;
|
||||
|
||||
Reference in New Issue
Block a user