7 gpio functions, 7 gpio functions -14 – Solvline Eddy DK Ver 2.20 User Manual

Page 57

Advertising
background image

Chapter 6. Library

6-14

SB_SendUdpServer

Function

Transmits data to UDP socket. (Server mode)

Format

Int SB_SendUdpServer (int Handle, char *Buffer, int Data_Size);

Parameter Handle

Buffer

Data_Size

Handle number bound to UDP socket

Buffer point where packet data to be sent is saved

Size of the buffer to send

Returns None

Notice

This function can be called after confirming client’s network information
by sending data to UDP socket bound to Eddy from network; that is, user
has to call SB_ReadUdp first.

When data transmission has to be made first, user has to use
SB_SendUdpClient function.

SB_SendUdpClient

Function

Transmit data to UDP socket (Client mode)

Format

Int SB_SendUdpClient (int Handle, char *Buffer, int Data_Size,

Char *IP_Address, int Socket_No);

Parameter Handle

Buffer

Data_Size

IP_Address

Socket_No

Handle number bound to UDP socket.

Buffer point where packet data to be sent is saved.

Size of the buffer to send.

IP address to send data to.

Socket number to send data to.

Returns None

Notice

This function can be used when user already knows destination network
information to send data to using UDP socket.

When data transmission has to be made first, user has to use
SB_SendUdpClient function..

6.7 GPIO Functions

The following functions are used to control maximum 16 different GPIO ports that have been installed.

Using each GPIO port user can sense 3.3V voltage or control output.

SB_SetGpioMode

Function

Configures data communication direction of GPIO port.

Advertising