コード例 #1
0
nyx_error_t nyx_sensor_orientation_set_threshold(nyx_device_handle_t handle, const nyx_sensor_orientation_threshold_t* new_threshold)
{
    nyx_device_t* d = (nyx_device_t*)handle;
    CHECK_DEVICE(d);
    nyx_orientation_set_threshold_function_t f = LOOKUP_METHOD(d, NYX_SENSOR_ORIENTATION_SET_THRESHOLD_MODULE_METHOD);
    if (f)
        return f(d,new_threshold);
    else
        return NYX_ERROR_NOT_IMPLEMENTED;
}
コード例 #2
0
ファイル: nyx_device_impl.c プロジェクト: anupamkaul/nyx-lib
nyx_error_t nyx_device_get_report_rate(nyx_device_handle_t handle, nyx_report_rate_t *rate_out_ptr)
{
	nyx_device_t* d = (nyx_device_t*)handle;
	CHECK_DEVICE(d);
	nyx_get_report_rate_function_t f = LOOKUP_METHOD(d, NYX_GET_REPORT_RATE_MODULE_METHOD);
	if (f)
		return f(d,rate_out_ptr);
	else
		return NYX_ERROR_NOT_IMPLEMENTED;
}
コード例 #3
0
ファイル: nyx_device_impl.c プロジェクト: anupamkaul/nyx-lib
nyx_error_t nyx_device_get_property(nyx_device_handle_t handle, const char* property_name_in, void** property_value_out_ptr)
{
    nyx_device_t* d = (nyx_device_t*)handle;
    CHECK_DEVICE(d);
    nyx_get_property_function_t f = LOOKUP_METHOD(d, NYX_GET_PROPERTY_MODULE_METHOD);
    if (f)
        return f(d,property_name_in, property_value_out_ptr);
    else
        return NYX_ERROR_NOT_IMPLEMENTED;
}
コード例 #4
0
ファイル: nyx_device_impl.c プロジェクト: anupamkaul/nyx-lib
nyx_error_t nyx_device_get_event(nyx_device_handle_t handle, nyx_event_handle_t* event_out_ptr)
{
	nyx_device_t* d = (nyx_device_t*)handle;
	CHECK_DEVICE(d);
	nyx_get_event_function_t f = LOOKUP_METHOD(d, NYX_GET_EVENT_MODULE_METHOD);
	if (f)
		return f(d, (nyx_event_t**)event_out_ptr);
	else
		return NYX_ERROR_NOT_IMPLEMENTED;
}
コード例 #5
0
ファイル: nyx_device_impl.c プロジェクト: anupamkaul/nyx-lib
nyx_error_t nyx_device_release_event (nyx_device_handle_t handle, nyx_event_handle_t event_handle)
{
	nyx_device_t* d = (nyx_device_t*)handle;
	CHECK_DEVICE(d);
	nyx_release_event_function_t f = LOOKUP_METHOD(d, NYX_RELEASE_EVENT_MODULE_METHOD);
	if (f)
		return f(d, (nyx_event_t*)event_handle);
	else
		return NYX_ERROR_NOT_IMPLEMENTED;
}
コード例 #6
0
ファイル: nyx_device_impl.c プロジェクト: anupamkaul/nyx-lib
nyx_error_t nyx_device_get_operating_mode(nyx_device_handle_t handle, nyx_operating_mode_t* mode_out_ptr)
{
	nyx_device_t* d = (nyx_device_t*)handle;
	CHECK_DEVICE(d);
	nyx_get_operating_mode_function_t f = LOOKUP_METHOD(d, NYX_GET_OPERATING_MODE_MODULE_METHOD);
	if (f)
		return f(d, mode_out_ptr);
	else
		return NYX_ERROR_NOT_IMPLEMENTED;
}
コード例 #7
0
ファイル: nyx_device_impl.c プロジェクト: anupamkaul/nyx-lib
nyx_error_t nyx_device_get_event_source(nyx_device_handle_t handle, int32_t* source_out_ptr)
{
	nyx_device_t* d = (nyx_device_t*)handle;
	CHECK_DEVICE(d);
	nyx_get_event_source_function_t f = LOOKUP_METHOD(d, NYX_GET_EVENT_SOURCE_MODULE_METHOD);
	if (f)
		return f(d, source_out_ptr);
	else
		return NYX_ERROR_NOT_IMPLEMENTED;
}
コード例 #8
0
nyx_error_t nyx_touchpanel_set_mode(nyx_device_handle_t handle, int32_t mode_mask)
{
    nyx_device_t* d = (nyx_device_t*)handle;
    CHECK_DEVICE(d);
    nyx_set_int_function_t f = LOOKUP_METHOD(d,  NYX_TOUCHPANEL_SET_MODE_MODULE_METHOD);
    if (f)
        return f(d,mode_mask);
    else
        return NYX_ERROR_NOT_IMPLEMENTED;
}
コード例 #9
0
nyx_error_t nyx_touchpanel_get_idle_scan_rate(nyx_device_handle_t handle, uint32_t *idle_scan_rate_out_ptr)
{
    nyx_device_t* d = (nyx_device_t*)handle;
    CHECK_DEVICE(d);
    nyx_get_rate_t f = LOOKUP_METHOD(d, NYX_TOUCHPANEL_GET_IDLE_SCAN_RATE_MODULE_METHOD);
    if (f)
        return f(d,idle_scan_rate_out_ptr);
    else
        return NYX_ERROR_NOT_IMPLEMENTED;
}
コード例 #10
0
nyx_error_t nyx_touchpanel_set_active_scan_rate(nyx_device_handle_t handle, uint32_t active_scan_rate_in)
{
    nyx_device_t* d = (nyx_device_t*)handle;
    CHECK_DEVICE(d);
    nyx_set_rate_t f = LOOKUP_METHOD(d,  NYX_TOUCHPANEL_SET_ACTIVE_SCAN_RATE_MODULE_METHOD);
    if (f)
        return f(d,active_scan_rate_in);
    else
        return NYX_ERROR_NOT_IMPLEMENTED;
}
コード例 #11
0
nyx_error_t nyx_sensor_bearing_set_location(nyx_device_handle_t handle, nyx_sensor_bearing_location_t* new_location)
{
    nyx_device_t* d = (nyx_device_t*)handle;
    CHECK_DEVICE(d);
    nyx_bearing_set_location_function_t f = LOOKUP_METHOD(d, NYX_SENSOR_BEARING_SET_LOCATION_MODULE_METHOD);
    if (f)
        return f(d,new_location);
    else
        return NYX_ERROR_NOT_IMPLEMENTED;
}
コード例 #12
0
nyx_error_t nyx_device_set_report_rate(nyx_device_handle_t handle,
                                       nyx_report_rate_t rate)
{
	nyx_device_t *d = (nyx_device_t *)handle;
	CHECK_DEVICE(d);
	nyx_set_report_rate_function_t f = LOOKUP_METHOD(d,
	                                   NYX_SET_REPORT_RATE_MODULE_METHOD);

	if (f)
	{
		return f(d, rate);
	}
	else
	{
		return NYX_ERROR_NOT_IMPLEMENTED;
	}
}
コード例 #13
0
nyx_error_t nyx_device_set_operating_mode(nyx_device_handle_t handle,
        nyx_operating_mode_t mode)
{
	nyx_device_t *d = (nyx_device_t *)handle;
	CHECK_DEVICE(d);
	nyx_set_operating_mode_function_t f = LOOKUP_METHOD(d,
	                                      NYX_SET_OPERATING_MODE_MODULE_METHOD);

	if (f)
	{
		return f(d, mode);
	}
	else
	{
		return NYX_ERROR_NOT_IMPLEMENTED;
	}
}
コード例 #14
0
nyx_error_t nyx_haptics_cancel_all(nyx_device_handle_t handle)
{
	nyx_device_t *d = (nyx_device_t *)handle;
	CHECK_DEVICE(d);
	CHECK_DEVICE_TYPE(d, NYX_DEVICE_HAPTICS);
	nyx_haptics_cancel_all_function_t f_ptr = LOOKUP_METHOD(d,
	        NYX_HAPTICS_CANCEL_ALL_MODULE_METHOD);

	if (f_ptr)
	{
		return f_ptr(d);
	}
	else
	{
		return NYX_ERROR_NOT_IMPLEMENTED;
	}
}