faft: Support EC hostevent in Chrome EC class

We set the EC hostevent to emulate the keyboard recovery combination
(Esc+Refresh+Power) has been pressed. Such that on EC reboot, it triggers
the same recovery path.

This CL wraps the underlying hostevent command into a method. It makes
the hostevent more easy to be used without knowing any detail of the EC
command.

BUG=chromium-os:35254
TEST=run_remote_tests.sh --board link --remote dut RecoveryButton/control$

Change-Id: I565a933e0f9ba775386d66120eef02e543a2a48c
Reviewed-on: https://gerrit.chromium.org/gerrit/36868
Reviewed-by: Vic Yang <victoryang@chromium.org>
Commit-Ready: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
diff --git a/server/cros/faftsequence.py b/server/cros/faftsequence.py
index 3bb327a..baa17c5 100644
--- a/server/cros/faftsequence.py
+++ b/server/cros/faftsequence.py
@@ -13,7 +13,7 @@
 from autotest_lib.client.bin import utils
 from autotest_lib.client.common_lib import error
 from autotest_lib.server.cros import vboot_constants as vboot
-from autotest_lib.server.cros.chrome_ec import ChromeEC
+from autotest_lib.server.cros import chrome_ec
 from autotest_lib.server.cros.faft_checkers import FAFTCheckers
 from autotest_lib.server.cros.faft_client_attribute import FAFTClientAttribute
 from autotest_lib.server.cros.faft_delay_constants import FAFTDelayConstants
@@ -169,7 +169,7 @@
             self.checkers = FAFTCheckers(self, self.faft_client)
 
             if self.client_attr.chrome_ec:
-                self.ec = ChromeEC(self.servo)
+                self.ec = chrome_ec.ChromeEC(self.servo)
 
             if not self.client_attr.has_keyboard:
                 # The environment variable USBKM232_UART_DEVICE should point
@@ -821,7 +821,7 @@
             time.sleep(self.delay.ec_boot_to_console)
             self.ec.reboot("ap-off")
             time.sleep(self.delay.ec_boot_to_console)
-            self.ec.send_command("hostevent set 0x4000")
+            self.ec.set_hostevent(chrome_ec.HOSTEVENT_KEYBOARD_RECOVERY)
             self.servo.power_short_press()
         else:
             self.servo.enable_recovery_mode()