Adding missing sensor functions

This commit is contained in:
iabdalkader 2014-03-30 19:37:16 +02:00
parent b23eeda8e5
commit 5998aa4857
3 changed files with 4 additions and 0 deletions

View File

@ -259,6 +259,7 @@ Q(reset, (const byte*)"\x10\xf4\x05\x00" "reset")
Q(snapshot, (const byte*)"\x49\xb8\x08\x00" "snapshot")
Q(set_pixformat, (const byte*)"\x3a\x5c\x0d\x00" "set_pixformat")
Q(set_framerate, (const byte*)"\x47\x05\x0d\x00" "set_framerate")
Q(set_framesize, (const byte*)"\x20\xa2\x0d\x00" "set_framesize")
Q(set_gainceiling, (const byte*)"\xba\x38\x0f\x00" "set_gainceiling")
Q(set_brightness, (const byte*)"\x91\xbe\x0e\x00" "set_brightness")
Q(__write_reg, (const byte*)"\xd7\xa5\x0b\x00" "__write_reg")

Binary file not shown.

View File

@ -74,6 +74,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_reset_obj, py_sensor_reset)
STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_snapshot_obj, py_sensor_snapshot);
STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_pixformat_obj, py_sensor_set_pixformat);
STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_framerate_obj, py_sensor_set_framerate);
STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_framesize_obj, py_sensor_set_framesize);
STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_gainceiling_obj, py_sensor_set_gainceiling);
STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_brightness_obj, py_sensor_set_brightness);
STATIC MP_DEFINE_CONST_FUN_OBJ_2(py_sensor_write_reg_obj, py_sensor_write_reg);
@ -100,7 +101,9 @@ STATIC const mp_map_elem_t module_globals_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_snapshot), (mp_obj_t)&py_sensor_snapshot_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_set_pixformat), (mp_obj_t)&py_sensor_set_pixformat_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_set_framerate), (mp_obj_t)&py_sensor_set_framerate_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_set_framesize), (mp_obj_t)&py_sensor_set_framesize_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_set_gainceiling), (mp_obj_t)&py_sensor_set_gainceiling_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_set_brightness), (mp_obj_t)&py_sensor_set_brightness_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR___write_reg), (mp_obj_t)&py_sensor_write_reg_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR___read_reg), (mp_obj_t)&py_sensor_read_reg_obj },
};