@@ -100,6 +100,7 @@ extern "C"
100100 PyObject * meth_get_all_chip_versions (PyObject * self , PyObject * args ); // icsneoGetAllChipVersions
101101 PyObject * meth_flash_accessory_firmware (PyObject * self , PyObject * args );
102102 PyObject * meth_get_accessory_firmware_version (PyObject * self , PyObject * args );
103+ PyObject * meth_set_safe_boot_mode (PyObject * self , PyObject * args );
103104
104105#ifdef _cplusplus
105106}
@@ -1913,6 +1914,25 @@ extern "C"
19131914 "\tNone\n" \
19141915 "\n"
19151916
1917+ #define _DOC_SET_SAFE_BOOT_MODE \
1918+ MODULE_NAME ".set_safe_boot_mode(device, enable: bool) -> bool\n" \
1919+ "\n" \
1920+ "Sets safe boot mode. If not sure, don't use this method.\n" \
1921+ "FIRE3 will reboot to safe boot mode when called with enable = True.\n" \
1922+ "\n" \
1923+ "Args:\n" \
1924+ "\tdevice (:class:`" MODULE_NAME ".PyNeoDeviceEx`): :class:`" MODULE_NAME \
1925+ ".PyNeoDeviceEx`\n\n" \
1926+ "\n" \
1927+ "\tenable (:class:`bool`): :class:`bool`: Tells the device to enter safe boot mode upon restart.\n\n" \
1928+ "\n" \
1929+ "Raises:\n" \
1930+ "\t:class:`" MODULE_NAME ".RuntimeError`\n" \
1931+ "\n" \
1932+ "Returns:\n" \
1933+ "\tNone\n" \
1934+ "\n"
1935+
19161936static PyMethodDef IcsMethods [] = {
19171937 _EZ_ICS_STRUCT_METHOD ("find_devices" ,
19181938 "icsneoFindNeoDevices" ,
@@ -2422,6 +2442,12 @@ static PyMethodDef IcsMethods[] = {
24222442 meth_get_accessory_firmware_version ,
24232443 METH_VARARGS ,
24242444 _DOC_GET_ACCESSORY_FIRMWARE_VERSION ),
2445+ _EZ_ICS_STRUCT_METHOD ("set_safe_boot_mode" ,
2446+ "icsneoSetSafeBootMode" ,
2447+ "SetSafeBootMode" ,
2448+ meth_set_safe_boot_mode ,
2449+ METH_VARARGS ,
2450+ _DOC_SET_SAFE_BOOT_MODE ),
24252451
24262452 { "override_library_name" , (PyCFunction )meth_override_library_name , METH_VARARGS , _DOC_OVERRIDE_LIBRARY_NAME },
24272453 { "get_library_path" , (PyCFunction )meth_get_library_path , METH_NOARGS , "" },
0 commit comments