From d2e42029ec04c3f224580f8007cdfbbfe0fc47a6 Mon Sep 17 00:00:00 2001 From: Fulup Ar Foll Date: Fri, 26 May 2017 18:45:56 +0200 Subject: Initial Commit --- ...g_p_i_o_gaff68acc9fb26096cae9374694b43ae92.html | 245 +++++++++++++++++++++ 1 file changed, 245 insertions(+) create mode 100644 ucs2-lib/doc/html/group___g___u_c_s___g_p_i_o_gaff68acc9fb26096cae9374694b43ae92.html (limited to 'ucs2-lib/doc/html/group___g___u_c_s___g_p_i_o_gaff68acc9fb26096cae9374694b43ae92.html') diff --git a/ucs2-lib/doc/html/group___g___u_c_s___g_p_i_o_gaff68acc9fb26096cae9374694b43ae92.html b/ucs2-lib/doc/html/group___g___u_c_s___g_p_i_o_gaff68acc9fb26096cae9374694b43ae92.html new file mode 100644 index 0000000..0dc841e --- /dev/null +++ b/ucs2-lib/doc/html/group___g___u_c_s___g_p_i_o_gaff68acc9fb26096cae9374694b43ae92.html @@ -0,0 +1,245 @@ + + + + + +UNICENS: Ucs_Gpio_WritePort + + + + + + + + + + + + + + + +
+
+
+ + + + + + + +
Logo +
UNICENS V2.1.0-3491
+
User Manual and API Reference
+ +
+
+ + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Ucs_Return_t Ucs_Gpio_WritePort (Ucs_Inst_tself,
uint16_t destination_address,
uint16_t gpio_port_handle,
uint16_t mask,
uint16_t data,
Ucs_Gpio_PinStateResCb_t result_fptr 
)
+
+ +

Writes data to the given GPIO port.

+ + + +
 This function corresponds with the INIC function INIC.GPIOPortPinState.
+
Parameters
+ + + + + + + +
selfThe UNICENS instance pointer
destination_addressAddress of the target device. Use the UCS_ADDR_LOCAL_DEV macro to target the local device.
+ The following address ranges are supported:
    +
  • [0x10 ... 0x2FF]
  • +
  • [0x500 ... 0xFEF]
  • +
  • UCS_ADDR_LOCAL_DEV
  • +
+
gpio_port_handleThe GPIO Port resource handle. + + +
 GPIOPortHandle
+
maskThe GPIO pin to be written. + + +
 Mask
+
dataThe state of the GPIO pin to be written. + + +
 Data
+
result_fptrRequired result callback function pointer.
+
+
+
Returns
Possible return values are shown in the table below. + + + + + + + + + + + + +
Value Description
UCS_RET_SUCCESS No error
UCS_RET_ERR_PARAM At least one parameter is wrong
UCS_RET_ERR_BUFFER_OVERFLOW No message buffer available
UCS_RET_ERR_API_LOCKED API is currently locked
UCS_RET_ERR_NOT_INITIALIZED UNICENS is not initialized
+
+


+ Example

+
// Main function
+
void main()
+
{
+
Ucs_Return_t result = Ucs_Gpio_WritePort(0x555U, 0x1D00, 0x0039U, 0x0038U, &App_GpioWritePortResCb);
+
if (result != UCS_RET_SUCCESS)
+
{
+
// Error handling here
+
}
+
}
+
+
// The event handler function
+
// Handle GpioWritePort event
+
static void App_GpioWritePortResCb(uint16_t device_id, uint16_t port_handle, uint16_t current_state, uint16_t sticky_state, Ucs_Gpio_Result_t result, void * user_ptr)
+
{
+
if (result.code == UCS_GPIO_RES_SUCCESS)
+
{
+
// Do what needs to be..
+
}
+
else
+
{
+
// Error handling here
+
switch(result.details.result_type)
+
{
+ +
// Handle the target results
+
break;
+
+ +
// Handle transmission error
+
break;
+
}
+
}
+
}
+
+
+
+
+
+ + + + + + -- cgit 1.2.3-korg