![]() |
LibDriver CH9121X
|
ch9121x base driver modules More...
Data Structures | |
| struct | ch9121x_handle_s |
| ch9121x handle structure definition More... | |
| struct | ch9121x_info_s |
| ch9121x information structure definition More... | |
Macros | |
| #define | CH9121X_UART_PRE_DELAY 50 |
| ch9121x uart pre delay definition | |
Typedefs | |
| typedef struct ch9121x_handle_s | ch9121x_handle_t |
| ch9121x handle structure definition | |
| typedef struct ch9121x_info_s | ch9121x_info_t |
| ch9121x information structure definition | |
Functions | |
| uint8_t | ch9121x_info (ch9121x_info_t *info) |
| get chip's information | |
| uint8_t | ch9121x_init (ch9121x_handle_t *handle) |
| initialize the chip | |
| uint8_t | ch9121x_deinit (ch9121x_handle_t *handle) |
| close the chip | |
| uint8_t | ch9121x_read (ch9121x_handle_t *handle, uint8_t *buf, uint16_t *len) |
| read data | |
| uint8_t | ch9121x_write (ch9121x_handle_t *handle, uint8_t *buf, uint16_t len) |
| write data | |
| uint8_t | ch9121x_get_version (ch9121x_handle_t *handle, uint8_t *version) |
| get version | |
| uint8_t | ch9121x_reset (ch9121x_handle_t *handle) |
| reset the chip | |
| uint8_t | ch9121x_save_to_eeprom (ch9121x_handle_t *handle) |
| save to eeprom | |
| uint8_t | ch9121x_config_and_reset (ch9121x_handle_t *handle) |
| config and reset the chip | |
| uint8_t | ch9121x_exit (ch9121x_handle_t *handle) |
| exit | |
| uint8_t | ch9121x_set_dhcp (ch9121x_handle_t *handle, ch9121x_bool_t enable) |
| enable or disable dhcp | |
| uint8_t | ch9121x_get_dhcp (ch9121x_handle_t *handle, ch9121x_bool_t *enable) |
| get dhcp status | |
| uint8_t | ch9121x_set_mac (ch9121x_handle_t *handle, uint8_t mac[6]) |
| set mac address | |
| uint8_t | ch9121x_get_mac (ch9121x_handle_t *handle, uint8_t mac[6]) |
| get chip mac | |
| uint8_t | ch9121x_clear_mac (ch9121x_handle_t *handle) |
| clear mac address | |
| uint8_t | ch9121x_set_ip (ch9121x_handle_t *handle, uint8_t ip[4]) |
| set ip address | |
| uint8_t | ch9121x_get_ip (ch9121x_handle_t *handle, uint8_t ip[4]) |
| get ip address | |
| uint8_t | ch9121x_set_subnet_mask (ch9121x_handle_t *handle, uint8_t mask[4]) |
| set subnet mask | |
| uint8_t | ch9121x_get_subnet_mask (ch9121x_handle_t *handle, uint8_t mask[4]) |
| get subnet mask | |
| uint8_t | ch9121x_set_gateway (ch9121x_handle_t *handle, uint8_t ip[4]) |
| set gateway | |
| uint8_t | ch9121x_get_gateway (ch9121x_handle_t *handle, uint8_t ip[4]) |
| get gateway | |
| uint8_t | ch9121x_get_status (ch9121x_handle_t *handle, ch9121x_port_t port, ch9121x_status_t *status) |
| get status | |
| uint8_t | ch9121x_set_mode (ch9121x_handle_t *handle, ch9121x_port_t port, ch9121x_mode_t mode) |
| set mode | |
| uint8_t | ch9121x_get_mode (ch9121x_handle_t *handle, ch9121x_port_t port, ch9121x_mode_t *mode) |
| get mode | |
| uint8_t | ch9121x_set_source_port (ch9121x_handle_t *handle, ch9121x_port_t port, uint16_t num) |
| set source port | |
| uint8_t | ch9121x_get_source_port (ch9121x_handle_t *handle, ch9121x_port_t port, uint16_t *num) |
| get source port | |
| uint8_t | ch9121x_set_dest_ip (ch9121x_handle_t *handle, ch9121x_port_t port, uint8_t ip[4]) |
| set dest ip | |
| uint8_t | ch9121x_get_dest_ip (ch9121x_handle_t *handle, ch9121x_port_t port, uint8_t ip[4]) |
| get dest ip | |
| uint8_t | ch9121x_set_dest_port (ch9121x_handle_t *handle, ch9121x_port_t port, uint16_t num) |
| set dest port | |
| uint8_t | ch9121x_get_dest_port (ch9121x_handle_t *handle, ch9121x_port_t port, uint16_t *num) |
| get dest port | |
| uint8_t | ch9121x_set_uart_baud (ch9121x_handle_t *handle, ch9121x_port_t port, uint32_t baud) |
| set uart baud | |
| uint8_t | ch9121x_get_uart_baud (ch9121x_handle_t *handle, ch9121x_port_t port, uint32_t *baud) |
| get uart baud | |
| uint8_t | ch9121x_set_uart_config (ch9121x_handle_t *handle, ch9121x_port_t port, uint8_t data_bit, ch9121x_parity_t parity, uint8_t stop_bit) |
| set uart config | |
| uint8_t | ch9121x_get_uart_config (ch9121x_handle_t *handle, ch9121x_port_t port, uint8_t *data_bit, ch9121x_parity_t *parity, uint8_t *stop_bit) |
| get uart config | |
| uint8_t | ch9121x_set_uart_timeout (ch9121x_handle_t *handle, ch9121x_port_t port, uint8_t timeout) |
| set uart timeout | |
| uint8_t | ch9121x_get_uart_timeout (ch9121x_handle_t *handle, ch9121x_port_t port, uint8_t *timeout) |
| get uart timeout | |
| uint8_t | ch9121x_uart_timeout_convert_to_register (ch9121x_handle_t *handle, uint16_t ms, uint8_t *reg) |
| convert the uart timeout to the register raw data | |
| uint8_t | ch9121x_uart_timeout_convert_to_data (ch9121x_handle_t *handle, uint8_t reg, uint16_t *ms) |
| convert the register raw data to the offset | |
| uint8_t | ch9121x_set_source_port_random (ch9121x_handle_t *handle, ch9121x_port_t port, ch9121x_bool_t enable) |
| enable or disable random source port number | |
| uint8_t | ch9121x_get_source_port_random (ch9121x_handle_t *handle, ch9121x_port_t port, ch9121x_bool_t *enable) |
| get random source port number status | |
| uint8_t | ch9121x_set_uart_buffer_length (ch9121x_handle_t *handle, ch9121x_port_t port, uint32_t len) |
| set uart buffer length | |
| uint8_t | ch9121x_get_uart_buffer_length (ch9121x_handle_t *handle, ch9121x_port_t port, uint32_t *len) |
| get uart buffer length | |
| uint8_t | ch9121x_set_uart_flush (ch9121x_handle_t *handle, ch9121x_port_t port, ch9121x_bool_t enable) |
| enable or disable uart auto flush | |
| uint8_t | ch9121x_get_uart_flush (ch9121x_handle_t *handle, ch9121x_port_t port, ch9121x_bool_t *enable) |
| get uart auto flush status | |
| uint8_t | ch9121x_set_port2 (ch9121x_handle_t *handle, ch9121x_bool_t enable) |
| enable or disable uart port2 | |
| uint8_t | ch9121x_set_disconnect_with_no_rj45 (ch9121x_handle_t *handle, ch9121x_bool_t enable) |
| enable or disable disconnect with no rj45 | |
| uint8_t | ch9121x_get_disconnect_with_no_rj45 (ch9121x_handle_t *handle, ch9121x_bool_t *enable) |
| get disconnect with no rj45 status | |
| uint8_t | ch9121x_set_domain (ch9121x_handle_t *handle, char *domain) |
| set chip domain | |
| uint8_t | ch9121x_set_eth_cfg (ch9121x_handle_t *handle, ch9121x_bool_t enable) |
| set eth cfg | |
| uint8_t | ch9121x_get_eth_cfg (ch9121x_handle_t *handle, ch9121x_bool_t *enable) |
| get eth cfg | |
| uint8_t | ch9121x_set_uart_clock_mode (ch9121x_handle_t *handle, ch9121x_uart_clock_mode_t mode) |
| set uart clock mode | |
| uint8_t | ch9121x_get_uart_clock_mode (ch9121x_handle_t *handle, ch9121x_uart_clock_mode_t *mode) |
| get uart clock mode | |
| uint8_t | ch9121x_get_phy_status (ch9121x_handle_t *handle, ch9121x_phy_status_t *status) |
| get phy status | |
| uint8_t | ch9121x_set_tcp_retry_mode (ch9121x_handle_t *handle, uint8_t t) |
| set tcp retry mode | |
| uint8_t | ch9121x_get_tcp_retry_mode (ch9121x_handle_t *handle, uint8_t *t) |
| get tcp retry mode | |
| uint8_t | ch9121x_set_flow_control (ch9121x_handle_t *handle, ch9121x_bool_t enable) |
| enable or disable flow control | |
| uint8_t | ch9121x_get_flow_control (ch9121x_handle_t *handle, ch9121x_bool_t *enable) |
| get flow control status | |
| uint8_t | ch9121x_set_arp_retry (ch9121x_handle_t *handle, uint8_t period, uint8_t times) |
| set arp retry | |
| uint8_t | ch9121x_tcp_retry_time_convert_to_register (ch9121x_handle_t *handle, uint16_t ms, uint8_t *reg) |
| convert the tcp retry time to the register raw data | |
| uint8_t | ch9121x_tcp_retry_time_convert_to_data (ch9121x_handle_t *handle, uint8_t reg, uint16_t *ms) |
| convert the register raw data to the tcp retry time | |
| uint8_t | ch9121x_arp_retry_period_convert_to_register (ch9121x_handle_t *handle, uint16_t ms, uint8_t *reg) |
| convert the arp retry period to the register raw data | |
| uint8_t | ch9121x_arp_retry_period_convert_to_data (ch9121x_handle_t *handle, uint8_t reg, uint16_t *ms) |
| convert the register raw data to the arp retry period | |
ch9121x base driver modules
| #define CH9121X_UART_PRE_DELAY 50 |
| typedef struct ch9121x_handle_s ch9121x_handle_t |
ch9121x handle structure definition
| typedef struct ch9121x_info_s ch9121x_info_t |
ch9121x information structure definition
| enum ch9121x_bool_t |
ch9121x bool enumeration definition
| Enumerator | |
|---|---|
| CH9121X_BOOL_FALSE | false |
| CH9121X_BOOL_TRUE | true |
Definition at line 78 of file driver_ch9121x.h.
| enum ch9121x_mode_t |
ch9121x mode enumeration definition
| Enumerator | |
|---|---|
| CH9121X_MODE_TCP_SERVER | tcp server |
| CH9121X_MODE_TCP_CLIENT | tcp client |
| CH9121X_MODE_UDP_SERVER | udp server |
| CH9121X_MODE_UDP_CLIENT | udp client |
Definition at line 118 of file driver_ch9121x.h.
| enum ch9121x_parity_t |
ch9121x parity enumeration definition
| Enumerator | |
|---|---|
| CH9121X_PARITY_EVEN | even parity |
| CH9121X_PARITY_ODD | odd parity |
| CH9121X_PARITY_MARK | mark |
| CH9121X_PARITY_SPACE | space |
| CH9121X_PARITY_NONE | none |
Definition at line 129 of file driver_ch9121x.h.
| enum ch9121x_phy_status_t |
ch9121x phy status enumeration definition
Definition at line 105 of file driver_ch9121x.h.
| enum ch9121x_port_t |
ch9121x port enumeration definition
| Enumerator | |
|---|---|
| CH9121X_PORT1 | port1 |
| CH9121X_PORT2 | port2 |
Definition at line 69 of file driver_ch9121x.h.
| enum ch9121x_status_t |
ch9121x status enumeration definition
| Enumerator | |
|---|---|
| CH9121X_STATUS_DISCONNECT | disconnect |
| CH9121X_STATUS_CONNECT | connect |
Definition at line 87 of file driver_ch9121x.h.
ch9121x uart clock mode enumeration definition
| Enumerator | |
|---|---|
| CH9121X_UART_CLOCK_MODE_DEFAULT | default mode |
| CH9121X_UART_CLOCK_MODE_CLASSICAL | classical mode |
Definition at line 96 of file driver_ch9121x.h.
| uint8_t ch9121x_arp_retry_period_convert_to_data | ( | ch9121x_handle_t * | handle, |
| uint8_t | reg, | ||
| uint16_t * | ms ) |
convert the register raw data to the arp retry period
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | reg | register raw data |
| [out] | *ms | pointer to a ms buffer |
Definition at line 2496 of file driver_ch9121x.c.
| uint8_t ch9121x_arp_retry_period_convert_to_register | ( | ch9121x_handle_t * | handle, |
| uint16_t | ms, | ||
| uint8_t * | reg ) |
convert the arp retry period to the register raw data
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | ms | time in ms |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 2469 of file driver_ch9121x.c.
| uint8_t ch9121x_clear_mac | ( | ch9121x_handle_t * | handle | ) |
clear mac address
| [in] | *handle | pointer to a ch9121x handle structure |
Definition at line 1784 of file driver_ch9121x.c.
| uint8_t ch9121x_config_and_reset | ( | ch9121x_handle_t * | handle | ) |
config and reset the chip
| [in] | *handle | pointer to a ch9121x handle structure |
Definition at line 425 of file driver_ch9121x.c.
| uint8_t ch9121x_deinit | ( | ch9121x_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a ch9121x handle structure |
Definition at line 2667 of file driver_ch9121x.c.
| uint8_t ch9121x_exit | ( | ch9121x_handle_t * | handle | ) |
exit
| [in] | *handle | pointer to a ch9121x handle structure |
Definition at line 459 of file driver_ch9121x.c.
| uint8_t ch9121x_get_dest_ip | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| uint8_t | ip[4] ) |
get dest ip
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [out] | *ip | pointer to an ip buffer |
Definition at line 1044 of file driver_ch9121x.c.
| uint8_t ch9121x_get_dest_port | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| uint16_t * | num ) |
get dest port
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [out] | *num | pointer to a dest port buffer |
Definition at line 1130 of file driver_ch9121x.c.
| uint8_t ch9121x_get_dhcp | ( | ch9121x_handle_t * | handle, |
| ch9121x_bool_t * | enable ) |
get dhcp status
| [in] | *handle | pointer to a ch9121x handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 2188 of file driver_ch9121x.c.
| uint8_t ch9121x_get_disconnect_with_no_rj45 | ( | ch9121x_handle_t * | handle, |
| ch9121x_bool_t * | enable ) |
get disconnect with no rj45 status
| [in] | *handle | pointer to a ch9121x handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 2063 of file driver_ch9121x.c.
| uint8_t ch9121x_get_eth_cfg | ( | ch9121x_handle_t * | handle, |
| ch9121x_bool_t * | enable ) |
get eth cfg
| [in] | *handle | pointer to a ch9121x handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1853 of file driver_ch9121x.c.
| uint8_t ch9121x_get_flow_control | ( | ch9121x_handle_t * | handle, |
| ch9121x_bool_t * | enable ) |
get flow control status
| [in] | *handle | pointer to a ch9121x handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 2340 of file driver_ch9121x.c.
| uint8_t ch9121x_get_gateway | ( | ch9121x_handle_t * | handle, |
| uint8_t | ip[4] ) |
get gateway
| [in] | *handle | pointer to a ch9121x handle structure |
| [out] | *ip | pointer to an ip buffer |
Definition at line 875 of file driver_ch9121x.c.
| uint8_t ch9121x_get_ip | ( | ch9121x_handle_t * | handle, |
| uint8_t | ip[4] ) |
get ip address
| [in] | *handle | pointer to a ch9121x handle structure |
| [out] | *ip | pointer to an ip buffer |
Definition at line 731 of file driver_ch9121x.c.
| uint8_t ch9121x_get_mac | ( | ch9121x_handle_t * | handle, |
| uint8_t | mac[6] ) |
get chip mac
| [in] | *handle | pointer to a ch9121x handle structure |
| [out] | *mac | pointer to a mac buffer |
Definition at line 528 of file driver_ch9121x.c.
| uint8_t ch9121x_get_mode | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| ch9121x_mode_t * | mode ) |
get mode
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [out] | *mode | pointer to a mode buffer |
Definition at line 650 of file driver_ch9121x.c.
| uint8_t ch9121x_get_phy_status | ( | ch9121x_handle_t * | handle, |
| ch9121x_phy_status_t * | status ) |
get phy status
| [in] | *handle | pointer to a ch9121x handle structure |
| [out] | *status | pointer to a status buffer |
Definition at line 2004 of file driver_ch9121x.c.
| uint8_t ch9121x_get_source_port | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| uint16_t * | num ) |
get source port
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [out] | *num | pointer to a source port buffer |
Definition at line 954 of file driver_ch9121x.c.
| uint8_t ch9121x_get_source_port_random | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| ch9121x_bool_t * | enable ) |
get random source port number status
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 1961 of file driver_ch9121x.c.
| uint8_t ch9121x_get_status | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| ch9121x_status_t * | status ) |
get status
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [out] | *status | pointer to a status buffer |
Definition at line 563 of file driver_ch9121x.c.
| uint8_t ch9121x_get_subnet_mask | ( | ch9121x_handle_t * | handle, |
| uint8_t | mask[4] ) |
get subnet mask
| [in] | *handle | pointer to a ch9121x handle structure |
| [out] | *mask | pointer to a mask buffer |
Definition at line 803 of file driver_ch9121x.c.
| uint8_t ch9121x_get_tcp_retry_mode | ( | ch9121x_handle_t * | handle, |
| uint8_t * | t ) |
get tcp retry mode
| [in] | *handle | pointer to a ch9121x handle structure |
| [out] | *t | pointer to a time buffer |
Definition at line 2267 of file driver_ch9121x.c.
| uint8_t ch9121x_get_uart_baud | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| uint32_t * | baud ) |
get uart baud
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [out] | *baud | pointer to a baud buffer |
Definition at line 1220 of file driver_ch9121x.c.
| uint8_t ch9121x_get_uart_buffer_length | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| uint32_t * | len ) |
get uart buffer length
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [out] | *len | pointer to a buffer length buffer |
Definition at line 2100 of file driver_ch9121x.c.
| uint8_t ch9121x_get_uart_clock_mode | ( | ch9121x_handle_t * | handle, |
| ch9121x_uart_clock_mode_t * | mode ) |
get uart clock mode
| [in] | *handle | pointer to a ch9121x handle structure |
| [out] | *mode | pointer to an uart clock mode buffer |
Definition at line 1924 of file driver_ch9121x.c.
| uint8_t ch9121x_get_uart_config | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| uint8_t * | data_bit, | ||
| ch9121x_parity_t * | parity, | ||
| uint8_t * | stop_bit ) |
get uart config
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [out] | *data_bit | pointer to an uart data bit buffer |
| [out] | *parity | pointer to an uart parity buffer |
| [out] | *stop_bit | pointer to an uart stop bit buffer |
Definition at line 1314 of file driver_ch9121x.c.
| uint8_t ch9121x_get_uart_flush | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| ch9121x_bool_t * | enable ) |
get uart auto flush status
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 2145 of file driver_ch9121x.c.
| uint8_t ch9121x_get_uart_timeout | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| uint8_t * | timeout ) |
get uart timeout
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [out] | *timeout | pointer to an uart timeout buffer |
Definition at line 1406 of file driver_ch9121x.c.
| uint8_t ch9121x_get_version | ( | ch9121x_handle_t * | handle, |
| uint8_t * | version ) |
get version
| [in] | *handle | pointer to a ch9121x handle structure |
| [out] | *version | pointer to a version buffer |
Definition at line 325 of file driver_ch9121x.c.
| uint8_t ch9121x_info | ( | ch9121x_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a ch9121x info structure |
Definition at line 2833 of file driver_ch9121x.c.
| uint8_t ch9121x_init | ( | ch9121x_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a ch9121x handle structure |
Definition at line 2525 of file driver_ch9121x.c.
| uint8_t ch9121x_read | ( | ch9121x_handle_t * | handle, |
| uint8_t * | buf, | ||
| uint16_t * | len ) |
read data
| [in] | *handle | pointer to a ch9121x handle structure |
| [out] | *buf | pointer to a data buffer |
| [in,out] | *len | pointer to a length buffer |
Definition at line 2760 of file driver_ch9121x.c.
| uint8_t ch9121x_reset | ( | ch9121x_handle_t * | handle | ) |
reset the chip
| [in] | *handle | pointer to a ch9121x handle structure |
Definition at line 358 of file driver_ch9121x.c.
| uint8_t ch9121x_save_to_eeprom | ( | ch9121x_handle_t * | handle | ) |
save to eeprom
| [in] | *handle | pointer to a ch9121x handle structure |
Definition at line 392 of file driver_ch9121x.c.
| uint8_t ch9121x_set_arp_retry | ( | ch9121x_handle_t * | handle, |
| uint8_t | period, | ||
| uint8_t | times ) |
set arp retry
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | period | input period |
| [in] | times | input times |
Definition at line 2378 of file driver_ch9121x.c.
| uint8_t ch9121x_set_dest_ip | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| uint8_t | ip[4] ) |
set dest ip
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [in] | *ip | pointer to an ip buffer |
Definition at line 998 of file driver_ch9121x.c.
| uint8_t ch9121x_set_dest_port | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| uint16_t | num ) |
set dest port
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [in] | num | dest port |
Definition at line 1086 of file driver_ch9121x.c.
| uint8_t ch9121x_set_dhcp | ( | ch9121x_handle_t * | handle, |
| ch9121x_bool_t | enable ) |
enable or disable dhcp
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | enable | bool value |
Definition at line 493 of file driver_ch9121x.c.
| uint8_t ch9121x_set_disconnect_with_no_rj45 | ( | ch9121x_handle_t * | handle, |
| ch9121x_bool_t | enable ) |
enable or disable disconnect with no rj45
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | enable | bool value |
Definition at line 1668 of file driver_ch9121x.c.
| uint8_t ch9121x_set_domain | ( | ch9121x_handle_t * | handle, |
| char * | domain ) |
set chip domain
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | *domain | pointer to a domain buffer |
Definition at line 1703 of file driver_ch9121x.c.
| uint8_t ch9121x_set_eth_cfg | ( | ch9121x_handle_t * | handle, |
| ch9121x_bool_t | enable ) |
set eth cfg
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | enable | bool value |
Definition at line 1818 of file driver_ch9121x.c.
| uint8_t ch9121x_set_flow_control | ( | ch9121x_handle_t * | handle, |
| ch9121x_bool_t | enable ) |
enable or disable flow control
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | enable | bool value |
Definition at line 2304 of file driver_ch9121x.c.
| uint8_t ch9121x_set_gateway | ( | ch9121x_handle_t * | handle, |
| uint8_t | ip[4] ) |
set gateway
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | *ip | pointer to an ip buffer |
Definition at line 837 of file driver_ch9121x.c.
| uint8_t ch9121x_set_ip | ( | ch9121x_handle_t * | handle, |
| uint8_t | ip[4] ) |
set ip address
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | *ip | pointer to an ip buffer |
Definition at line 693 of file driver_ch9121x.c.
| uint8_t ch9121x_set_mac | ( | ch9121x_handle_t * | handle, |
| uint8_t | mac[6] ) |
set mac address
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | *mac | pointer to a mac buffer |
Definition at line 1745 of file driver_ch9121x.c.
| uint8_t ch9121x_set_mode | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| ch9121x_mode_t | mode ) |
set mode
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [in] | mode | chip mode |
Definition at line 607 of file driver_ch9121x.c.
| uint8_t ch9121x_set_port2 | ( | ch9121x_handle_t * | handle, |
| ch9121x_bool_t | enable ) |
enable or disable uart port2
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | enable | bool value |
Definition at line 1633 of file driver_ch9121x.c.
| uint8_t ch9121x_set_source_port | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| uint16_t | num ) |
set source port
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [in] | num | source port |
Definition at line 910 of file driver_ch9121x.c.
| uint8_t ch9121x_set_source_port_random | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| ch9121x_bool_t | enable ) |
enable or disable random source port number
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [in] | enable | bool value |
Definition at line 1502 of file driver_ch9121x.c.
| uint8_t ch9121x_set_subnet_mask | ( | ch9121x_handle_t * | handle, |
| uint8_t | mask[4] ) |
set subnet mask
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | *mask | pointer to a mask buffer |
Definition at line 765 of file driver_ch9121x.c.
| uint8_t ch9121x_set_tcp_retry_mode | ( | ch9121x_handle_t * | handle, |
| uint8_t | t ) |
set tcp retry mode
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | t | time |
Definition at line 2225 of file driver_ch9121x.c.
| uint8_t ch9121x_set_uart_baud | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| uint32_t | baud ) |
set uart baud
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [in] | baud | chip baud |
Definition at line 1174 of file driver_ch9121x.c.
| uint8_t ch9121x_set_uart_buffer_length | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| uint32_t | len ) |
set uart buffer length
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [in] | len | buffer length |
Definition at line 1545 of file driver_ch9121x.c.
| uint8_t ch9121x_set_uart_clock_mode | ( | ch9121x_handle_t * | handle, |
| ch9121x_uart_clock_mode_t | mode ) |
set uart clock mode
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | mode | uart clock mode |
Definition at line 1889 of file driver_ch9121x.c.
| uint8_t ch9121x_set_uart_config | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| uint8_t | data_bit, | ||
| ch9121x_parity_t | parity, | ||
| uint8_t | stop_bit ) |
set uart config
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [in] | data_bit | uart data bit |
| [in] | parity | uart parity |
| [in] | stop_bit | uart stop bit |
Definition at line 1267 of file driver_ch9121x.c.
| uint8_t ch9121x_set_uart_flush | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| ch9121x_bool_t | enable ) |
enable or disable uart auto flush
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [in] | enable | bool value |
Definition at line 1591 of file driver_ch9121x.c.
| uint8_t ch9121x_set_uart_timeout | ( | ch9121x_handle_t * | handle, |
| ch9121x_port_t | port, | ||
| uint8_t | timeout ) |
set uart timeout
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | port | input port |
| [in] | timeout | uart timeout |
Definition at line 1360 of file driver_ch9121x.c.
| uint8_t ch9121x_tcp_retry_time_convert_to_data | ( | ch9121x_handle_t * | handle, |
| uint8_t | reg, | ||
| uint16_t * | ms ) |
convert the register raw data to the tcp retry time
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | reg | register raw data |
| [out] | *ms | pointer to a ms buffer |
Definition at line 2442 of file driver_ch9121x.c.
| uint8_t ch9121x_tcp_retry_time_convert_to_register | ( | ch9121x_handle_t * | handle, |
| uint16_t | ms, | ||
| uint8_t * | reg ) |
convert the tcp retry time to the register raw data
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | ms | time in ms |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 2415 of file driver_ch9121x.c.
| uint8_t ch9121x_uart_timeout_convert_to_data | ( | ch9121x_handle_t * | handle, |
| uint8_t | reg, | ||
| uint16_t * | ms ) |
convert the register raw data to the offset
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | reg | register raw data |
| [out] | *ms | pointer to a ms buffer |
Definition at line 1474 of file driver_ch9121x.c.
| uint8_t ch9121x_uart_timeout_convert_to_register | ( | ch9121x_handle_t * | handle, |
| uint16_t | ms, | ||
| uint8_t * | reg ) |
convert the uart timeout to the register raw data
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | ms | timeout |
| [out] | *reg | pointer to a register raw buffer |
Definition at line 1447 of file driver_ch9121x.c.
| uint8_t ch9121x_write | ( | ch9121x_handle_t * | handle, |
| uint8_t * | buf, | ||
| uint16_t | len ) |
write data
| [in] | *handle | pointer to a ch9121x handle structure |
| [in] | *buf | pointer to a data buffer |
| [in] | len | data length |
Definition at line 2721 of file driver_ch9121x.c.