Embedded Wireless Framework
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
ewf_adapter_renesas_common.h File Reference

The Embedded Wireless Framework generic Renesas adapter functionality. Renesas adapter common definitions are defined here. for eg. the application should define EWF_CONFIG_ADAPTER_RENESAS_COMMON_ROOT_CA_CERTIFICATE_ID/ EWF_CONFIG_ADAPTER_RENESAS_COMMON_USER_CA_CERTIFICATE_ID, EWF_CONFIG_ADAPTER_RENESAS_COMMON_CLIENT_PRIVATE_KEY_ID, EWF_CONFIG_ADAPTER_RENESAS_COMMON_CLIENT_CERTIFICATE_ID while provisioning certificates onto the device. EWF_CONFIG_ADAPTER_RENESAS_COMMON_SECURITY_PROFILE_ID and EWF_CONFIG_ADAPTER_RENESAS_COMMON_CA_CERTIFICATE_ID must be defined when using MQTT connection. If not defined, the adapter has default definitions to be used. More...

#include "ewf_adapter.h"

Go to the source code of this file.

Data Structures

struct  _ewf_adapter_renesas_common_socket
 Internal structure for internet socket status
More...
 
struct  _ewf_adapter_renesas_common
 The Renesas adapter data structure. More...
 

Macros

#define EWF_ADAPTER_RENESAS_COMMON_NVM_ENABLED   (1)
 
#define EWF_ADAPTER_RENESAS_COMMON_TLS_BASIC_ENABLED   (1)
 
#define EWF_ADAPTER_RENESAS_COMMON_TLS_ENABLED   (0)
 
#define EWF_ADAPTER_RENESAS_COMMON_TCP_ENABLED   (1)
 
#define EWF_ADAPTER_RENESAS_COMMON_UDP_ENABLED   (1)
 
#define EWF_ADAPTER_RENESAS_COMMON_MQTT_BASIC_ENABLED   (1)
 
#define EWF_ADAPTER_RENESAS_COMMON_MQTT_ENABLED   (0)
 
#define EWF_ADAPTER_RENESAS_COMMON_INTERNET_SOCKET_POOL_SIZE   (6)
 The total number of supported Internet sockets in the adapter.
 
#define EWF_ADAPTER_RENESAS_COMMON_INTERNET_SOCKET_INVALID   (-1)
 The Internet socket invalid value.
 
#define EWF_ADAPTER_RENESAS_COMMON_INTERNET_SOCKET_TCP   (0)
 The Internet socket transmission protocol values.
 
#define EWF_ADAPTER_RENESAS_COMMON_INTERNET_SOCKET_UDP   (1)
 
#define EWF_ADAPTER_RENESAS_COMMON_MQTT_SOCKET_POOL_SIZE   (1)
 The total number of supported MQTT sockets in the adapter. Only one MQTT client is supported in Renesas RYZ adapters.
 
#define EWF_ADAPTER_RENESAS_COMMON_MQTT_SOCKET_INVALID   (-1)
 The MQTT socket invalid value.
 
#define EWF_ADAPTER_RENESAS_COMMON_SOCKET_MAX_SEND_SIZE   (1460)
 
#define EWF_ADAPTER_RENESAS_COMMON_SOCKET_MAX_RECEIVE_SIZE   (1500)
 
#define EWF_ADAPTER_RENESAS_COMMON_SOCKET_COMMAND_MODE   ("1")
 
#define EWF_ADAPTER_RENESAS_COMMON_SOCKET_ONLINE_DATA_MODE   ("0")
 
#define EWF_CONFIG_ADAPTER_RENESAS_COMMON_ROOT_CA_CERTIFICATE_ID   ("11")
 Trusted Certificate Authority certificate index number(0-19) The index in the non volatile memory where the root CA certificate will be stored.
 
#define EWF_CONFIG_ADAPTER_RENESAS_COMMON_USER_CA_CERTIFICATE_ID   ("12")
 User Certificate Authority certificate index number(0-19) The index in the non volatile memory where the user CA certificate will be stored.
 
#define EWF_CONFIG_ADAPTER_RENESAS_COMMON_CA_CERTIFICATE_ID   ("11")
 CA certificate index that will be used in the security/TLS profile configuration This number will either be EWF_CONFIG_ADAPTER_RENESAS_COMMON_ROOT_CA_CERTIFICATE_ID or EWF_CONFIG_ADAPTER_RENESAS_COMMON_USER_CA_CERTIFICATE_ID Default to Root CA.
 
#define EWF_CONFIG_ADAPTER_RENESAS_COMMON_CLIENT_CERTIFICATE_ID   ("13")
 Client certificate index number(0-19) The index in the non volatile memory where the client certificate will be stored.
 
#define EWF_CONFIG_ADAPTER_RENESAS_COMMON_CLIENT_PRIVATE_KEY_ID   ("13")
 Client Key index number(0-19) The index in the non volatile memory where the client key will be stored.
 
#define EWF_CONFIG_ADAPTER_RENESAS_COMMON_SECURITY_PROFILE_ID   ("5")
 Security Profile ID (0-6) The id number for the security profile configuration.
 
#define EWF_CONFIG_ADAPTER_RENESAS_COMMON_ROOT_CA_CERTIFICATE_BUFFER_NAME   (root_ca_cert_pem)
 Trusted Certificate Authority certificate pointer name.
 
#define EWF_CONFIG_ADAPTER_RENESAS_COMMON_USER_CA_CERTIFICATE_BUFFER_NAME   (ca_cert_pem)
 User Certificate Authority certificate pointing buffer name.
 
#define EWF_CONFIG_ADAPTER_RENESAS_COMMON_CLIENT_CERTIFICATE_BUFFER_NAME   (device_cert_pem)
 Client certificate pointing buffer name.
 
#define EWF_CONFIG_ADAPTER_RENESAS_COMMON_CLIENT_PRIVATE_KEY_BUFFER_NAME   (device_key_pem)
 Client private key filename

 
#define EWF_ADAPTER_RENESAS_COMMON_FILE_TYPE_CERTIFICATE   ("certificate")
 
#define EWF_ADAPTER_RENESAS_COMMON_FILE_TYPE_PRIVATEKEY   ("privatekey")
 
#define EWF_ADAPTER_RENESAS_COMMON_CLOSE_LISTENING_SOCKET   ("0")
 
#define EWF_ADAPTER_RENESAS_COMMON_OPEN_LISTNEING_IPV4_SOCKET   ("1")
 
#define EWF_ADAPTER_RENESAS_COMMON_OPEN_LISTENING_IPV6_SOCKET   ("2")
 

Typedefs

typedef enum _ewf_adapter_bg96_internet_socket_service_type ewf_adapter_renesas_common_internet_socket_service_type
 The socket service type

 
typedef struct _ewf_adapter_renesas_common_socket ewf_adapter_renesas_common_internet_socket
 Internal structure for internet socket status

 
typedef struct _ewf_adapter_renesas_common ewf_adapter_renesas_common
 The Renesas adapter data structure.
 

Enumerations

enum  _ewf_adapter_bg96_internet_socket_service_type {
  ewf_adapter_renesas_common_socket_service_type_not_initialized , ewf_adapter_renesas_common_socket_service_type_tcp , ewf_adapter_renesas_common_socket_service_type_udp , ewf_adapter_renesas_common_socket_service_type_tcp_listener ,
  ewf_adapter_renesas_common_socket_service_type_udp_listener
}
 The socket service type

 

Functions

ewf_result ewf_adapter_renesas_common_start (ewf_adapter *adapter_ptr)
 
ewf_result ewf_adapter_renesas_common_stop (ewf_adapter *adapter_ptr)
 
ewf_result ewf_adapter_renesas_common_info (ewf_adapter *adapter_ptr)
 
ewf_result ewf_adapter_renesas_common_get_ipv4_address (ewf_adapter *adapter_ptr, uint32_t *address_ptr)
 
ewf_result ewf_adapter_renesas_common_get_ipv4_netmask (ewf_adapter *adapter_ptr, uint32_t *netmask_ptr)
 
ewf_result ewf_adapter_renesas_common_get_ipv4_gateway (ewf_adapter *adapter_ptr, uint32_t *gateway_ptr)
 
ewf_result ewf_adapter_renesas_common_get_ipv4_dns (ewf_adapter *adapter_ptr, uint32_t *dns)
 
ewf_result ewf_adapter_renesas_common_urc_callback (ewf_interface *interface_ptr, uint8_t *buffer_ptr, uint32_t buffer_length)
 
ewf_result ewf_adapter_renesas_common_set_user_urc_callback (ewf_adapter *adapter_ptr, ewf_interface_urc_callback callback)
 
ewf_result ewf_adapter_renesas_common_tls_basic_start (ewf_adapter *adapter_ptr)
 
ewf_result ewf_adapter_renesas_common_tls_basic_stop (ewf_adapter *adapter_ptr)
 
ewf_result ewf_adapter_renesas_common_tls_basic_urc_callback (ewf_interface *interface_ptr, uint8_t *buffer_ptr, uint32_t buffer_length)
 
ewf_result ewf_adapter_renesas_common_tls_basic_init (ewf_adapter *adapter_ptr)
 
ewf_result ewf_adapter_renesas_common_tls_basic_clean (ewf_adapter *adapter_ptr)
 
ewf_result ewf_adapter_renesas_common_internet_start (ewf_adapter *adapter_ptr)
 
ewf_result ewf_adapter_renesas_common_internet_stop (ewf_adapter *adapter_ptr)
 
ewf_result ewf_adapter_renesas_common_internet_urc_callback (ewf_interface *interface_ptr, uint8_t *buffer_ptr, uint32_t buffer_length)
 
ewf_result ewf_adapter_renesas_common_tcp_open (ewf_adapter *adapter_ptr, ewf_socket_tcp *socket_ptr)
 
ewf_result ewf_adapter_renesas_common_tcp_close (ewf_socket_tcp *socket_ptr)
 
ewf_result ewf_adapter_renesas_common_tcp_control (ewf_socket_tcp *socket_ptr, const char *control_str, const uint8_t *buffer_ptr, uint32_t *buffer_length_ptr)
 
ewf_result ewf_adapter_renesas_common_tcp_set_tls_configuration (ewf_socket_tcp *socket_ptr, uint32_t tls_configuration_id)
 
ewf_result ewf_adapter_renesas_common_tcp_bind (ewf_socket_tcp *socket_ptr, uint32_t local_port)
 
ewf_result ewf_adapter_renesas_common_tcp_listen (ewf_socket_tcp *socket_ptr)
 
ewf_result ewf_adapter_renesas_common_tcp_accept (ewf_socket_tcp *socket_ptr, ewf_socket_tcp *socket_new_ptr)
 
ewf_result ewf_adapter_renesas_common_tcp_connect (ewf_socket_tcp *socket_ptr, const char *const server, uint32_t remote_port)
 
ewf_result ewf_adapter_renesas_common_tcp_shutdown (ewf_socket_tcp *socket_ptr)
 
ewf_result ewf_adapter_renesas_common_tcp_send (ewf_socket_tcp *socket_ptr, const uint8_t *buffer_ptr, uint32_t buffer_length)
 
ewf_result ewf_adapter_renesas_common_tcp_receive (ewf_socket_tcp *socket_ptr, uint8_t *buffer_ptr, uint32_t *buffer_length, bool wait)
 
ewf_result ewf_adapter_renesas_common_udp_open (ewf_adapter *adapter_ptr, ewf_socket_udp *socket_ptr)
 
ewf_result ewf_adapter_renesas_common_udp_close (ewf_socket_udp *socket_ptr)
 
ewf_result ewf_adapter_renesas_common_udp_control (ewf_socket_udp *socket_ptr, const char *control_str, const uint8_t *buffer_ptr, uint32_t *buffer_length_ptr)
 
ewf_result ewf_adapter_renesas_common_udp_set_dtls_configuration (ewf_socket_udp *socket_ptr, uint32_t dtls_configuration_id)
 
ewf_result ewf_adapter_renesas_common_udp_bind (ewf_socket_udp *socket_ptr, uint32_t local_port)
 
ewf_result ewf_adapter_renesas_common_udp_shutdown (ewf_socket_udp *socket_ptr)
 
ewf_result ewf_adapter_renesas_common_udp_send_to (ewf_socket_udp *socket_ptr, const char *remote_address_str, uint32_t remote_port, const uint8_t *buffer_ptr, uint32_t buffer_length)
 
ewf_result ewf_adapter_renesas_common_udp_receive_from (ewf_socket_udp *socket_ptr, char *remote_address_str, uint32_t *remote_address_length_ptr, uint32_t *remote_port_ptr, char *buffer_ptr, uint32_t *buffer_length_ptr, bool wait)
 
ewf_result ewf_adapter_renesas_common_mqtt_basic_start (ewf_adapter *adapter_ptr)
 
ewf_result ewf_adapter_renesas_common_mqtt_basic_stop (ewf_adapter *adapter_ptr)
 
ewf_result ewf_adapter_renesas_common_mqtt_basic_urc_callback (ewf_interface *interface_ptr, uint8_t *buffer_ptr, uint32_t buffer_length)
 
ewf_result ewf_adapter_renesas_common_mqtt_basic_default_state_callback (ewf_adapter *adapter_ptr, const char *state_cstr, const char *param_cstr)
 
ewf_result ewf_adapter_renesas_common_mqtt_basic_default_message_callback (ewf_adapter *adapter_ptr, const char *topic_cstr, const char *payload_cstr)
 
ewf_result ewf_adapter_renesas_common_mqtt_basic_connect (ewf_adapter *adapter_ptr, char const *server_str, uint32_t port, char const *clientid, char const *username, char const *password)
 
ewf_result ewf_adapter_renesas_common_mqtt_basic_disconnect (ewf_adapter *adapter_ptr)
 
ewf_result ewf_adapter_renesas_common_mqtt_basic_subscribe (ewf_adapter *adapter_ptr, char const *topic)
 
ewf_result ewf_adapter_renesas_common_mqtt_basic_unsubscribe (ewf_adapter *adapter_ptr, char const *topic)
 
ewf_result ewf_adapter_renesas_common_mqtt_basic_publish (ewf_adapter *adapter_ptr, const char *topic, const char *msg_cstr)
 
ewf_result ewf_adapter_renesas_common_mqtt_basic_message_get (ewf_adapter *adapter_ptr, const char *topic, char *message_buffer_ptr)
 
ewf_result ewf_adapter_renesas_common_nvm_start (ewf_adapter *adapter_ptr)
 Start the NVM operation. More...
 
ewf_result ewf_adapter_renesas_common_nvm_stop (ewf_adapter *adapter_ptr)
 Stop the NVM operation. More...
 
ewf_result ewf_adapter_renesas_common_nvm_urc_callback (ewf_interface *interface_ptr, uint8_t *buffer_ptr, uint32_t buffer_length)
 NVM URC callback. More...
 
ewf_result ewf_adapter_renesas_common_nvm_list (ewf_adapter *adapter_ptr)
 List the files in the NVM. More...
 
ewf_result ewf_adapter_renesas_common_nvm_delete (ewf_adapter *adapter_ptr, const char *const filename_str, const char *index)
 Delete a file from the NVM. More...
 
ewf_result ewf_adapter_renesas_common_nvm_upload (ewf_adapter *adapter_ptr, const char *filename_str, const uint8_t *data, uint32_t length, const char *index)
 Upload a file to the NVM. More...
 

Variables

ewf_adapter_api_control ewf_adapter_renesas_common_api_control
 
ewf_adapter_api_info ewf_adapter_renesas_common_api_info
 
ewf_adapter_api_tls_basic ewf_adapter_renesas_common_api_tls_basic
 
ewf_adapter_api_tcp ewf_adapter_renesas_common_api_tcp
 
ewf_adapter_api_udp ewf_adapter_renesas_common_api_udp
 
ewf_adapter_api_mqtt_basic ewf_adapter_renesas_common_api_mqtt_basic
 

Detailed Description

The Embedded Wireless Framework generic Renesas adapter functionality. Renesas adapter common definitions are defined here. for eg. the application should define EWF_CONFIG_ADAPTER_RENESAS_COMMON_ROOT_CA_CERTIFICATE_ID/ EWF_CONFIG_ADAPTER_RENESAS_COMMON_USER_CA_CERTIFICATE_ID, EWF_CONFIG_ADAPTER_RENESAS_COMMON_CLIENT_PRIVATE_KEY_ID, EWF_CONFIG_ADAPTER_RENESAS_COMMON_CLIENT_CERTIFICATE_ID while provisioning certificates onto the device. EWF_CONFIG_ADAPTER_RENESAS_COMMON_SECURITY_PROFILE_ID and EWF_CONFIG_ADAPTER_RENESAS_COMMON_CA_CERTIFICATE_ID must be defined when using MQTT connection. If not defined, the adapter has default definitions to be used.

Version
Preview