Skip to content

Commit

Permalink
Release v3.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
renesas-fsp-development committed May 23, 2022
1 parent a44c4cf commit b58ec0d
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 39 deletions.
6 changes: 3 additions & 3 deletions ra/fsp/inc/fsp_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ extern "C" {
#define FSP_VERSION_MINOR (7U)

/** FSP pack patch version. */
#define FSP_VERSION_PATCH (0U)
#define FSP_VERSION_PATCH (1U)

/** FSP pack version build number (currently unused). */
#define FSP_VERSION_BUILD (0U)

/** Public FSP version name. */
#define FSP_VERSION_STRING ("3.7.0")
#define FSP_VERSION_STRING ("3.7.1")

/** Unique FSP version ID. */
#define FSP_VERSION_BUILD_STRING ("Built with Renesas Advanced Flexible Software Package version 3.7.0")
#define FSP_VERSION_BUILD_STRING ("Built with Renesas Advanced Flexible Software Package version 3.7.1")

/**********************************************************************************************************************
* Typedef definitions
Expand Down
13 changes: 9 additions & 4 deletions ra/fsp/src/r_adc_b/r_adc_b.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ fsp_err_t R_ADC_B_ScanCfg (adc_ctrl_t * p_ctrl, void const * const p_scan_cfg)
}
else
{
p_instance_ctrl->cached_adsystr = (adc_group_mask_t) (1 << p_adc_group->scan_group_id);
p_instance_ctrl->cached_adsystr |= (adc_group_mask_t) (1 << p_adc_group->scan_group_id);
}

/* Configure External Triggers, ELC Triggers, GPT Triggers, Self-diagnosis / Disconnect detect */
Expand Down Expand Up @@ -536,7 +536,7 @@ fsp_err_t R_ADC_B_CallbackSet (adc_ctrl_t * const p_api_ctrl,
* If the unit was configured for ELC, GPT, or external hardware triggering, then this function allows the trigger
* signal to get to the ADC unit. The function is not able to control the generation of the trigger itself.
* If the unit was configured for software triggering, This function was added to this ADC version for compatability
* with r_adc driver. For additional flexibility, it is recommended R_ADC_B_GroupScanStart.
* with r_adc driver. For additional flexibility, it is recommended to use R_ADC_B_ScanGroupStart.
*
* @pre Call R_ADC_B_ScanCfg after R_ADC_B_Open before starting a scan.
* @pre Call R_ADC_B_Calibrate and wait for calibration to complete before starting a scan.
Expand Down Expand Up @@ -573,6 +573,11 @@ fsp_err_t R_ADC_B_ScanStart (adc_ctrl_t * p_ctrl)
* get to the ADC unit. The function itself is not able to control the generation of peripheral triggers. If the unit
* was configured for software triggering, then this function starts the software triggered scan.
*
* @note Except for Group Priority Operation, if ADC0 or ADC1 are currently performing an A/D conversion operation,
* attempting to start another scan group that uses the same A/D converter will be ignored. This also applies to
* starting multiple groups at one time. When Group Priority Operation is not enabled, only the lowest numbered group
* will be started (for each ADC converter), other groups will be ignored.
*
* @pre Call R_ADC_B_ScanCfg after R_ADC_B_Open before starting a scan.
* @pre Call R_ADC_B_Calibrate and wait for calibration to complete before starting a scan.
*
Expand All @@ -592,9 +597,9 @@ fsp_err_t R_ADC_B_ScanGroupStart (adc_ctrl_t * p_ctrl, adc_group_mask_t group_ma
FSP_ERROR_RETURN(ADC_B_OPEN == p_instance_ctrl->opened, FSP_ERR_NOT_OPEN);
FSP_ERROR_RETURN(ADC_B_OPEN == p_instance_ctrl->initialized, FSP_ERR_NOT_INITIALIZED);

adc_group_mask_t configured_channels =
adc_group_mask_t configured_groups =
(adc_group_mask_t) (p_instance_ctrl->cached_adtrgenr | p_instance_ctrl->cached_adsystr);
FSP_ERROR_RETURN(0 != (configured_channels & group_mask), FSP_ERR_INVALID_ARGUMENT);
FSP_ERROR_RETURN(0 != (configured_groups & group_mask), FSP_ERR_INVALID_ARGUMENT);
FSP_ERROR_RETURN(0 == (group_mask & R_ADC_B->ADGRSR), FSP_ERR_IN_USE);
#endif

Expand Down
24 changes: 11 additions & 13 deletions ra/fsp/src/rm_ble_abs_spp/r_ble_spp_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,18 +275,13 @@ ble_status_t R_BLE_GAP_StopAdv (uint8_t adv_hdl)
ble_status_t R_BLE_GAP_SetAdvSresData (st_ble_gap_adv_data_t * p_adv_srsp_data)
{
r_ble_spp_adv_data_t advertising_data;
advertising_data.data_type = R_BLE_SPP_ADV_DATA_MODE;
advertising_data.data_type = (r_ble_spp_adv_type_t) p_adv_srsp_data->data_type;
advertising_data.data_length = p_adv_srsp_data->data_length;
advertising_data.p_data = p_adv_srsp_data->p_data;

/* Set advertising data */
BLE_SPP_COMMAND(R_BLE_SPP_GAP_SetAdvSresData(&advertising_data), R_BLE_SPP_EVENT_SET_ADV_SRES);

advertising_data.data_type = R_BLE_SPP_SCAN_RSP_DATA_MODE;

/* Set scan response data */
BLE_SPP_COMMAND(R_BLE_SPP_GAP_SetAdvSresData(&advertising_data), R_BLE_SPP_EVENT_SET_ADV_SRES);

return BLE_SUCCESS;
}

Expand Down Expand Up @@ -324,10 +319,10 @@ ble_status_t R_BLE_GAP_SetAdvParam (st_ble_gap_adv_param_t * p_adv_param)

r_ble_spp_adv_param_t adv_param;
adv_param.adv_ch_map = chan_map;
adv_param.filter_policy = p_adv_param->filter_policy;
adv_param.adv_phy = 0x01;
adv_param.sec_adv_phy = 0x01;
adv_param.adv_prop_type = 0x0000;
adv_param.filter_policy = (r_ble_spp_filter_policy_t) p_adv_param->filter_policy;
adv_param.adv_phy = R_BLE_SPP_SET_PHYS_PREF_1M;
adv_param.sec_adv_phy = R_BLE_SPP_SET_PHYS_PREF_1M;
adv_param.adv_prop_type = R_BLE_SPP_ADV_TYPE_CONNECTABLE_UNDIRECTED;
adv_param.adv_intv_min = p_adv_param->adv_intv_min;
adv_param.adv_intv_max = p_adv_param->adv_intv_max;

Expand Down Expand Up @@ -792,8 +787,6 @@ static int r_ble_spp_api_fsp_callback_read (void * const p_context,
}

return R_BLE_SPP_SUCCESS;

return err;
}

#endif
Expand All @@ -808,7 +801,12 @@ static int r_ble_spp_api_fsp_callback_close (void * p_context)
err = bkup_context->p_spi_instance->p_api->close(bkup_context->p_spi_instance->p_ctrl);
#endif

return err;
if (FSP_SUCCESS != err)
{
return R_BLE_APP_TRANSPORT_READ_ERROR;
}

return R_BLE_SPP_SUCCESS;
}

ble_status_t R_BLE_Execute (void)
Expand Down
42 changes: 26 additions & 16 deletions ra/fsp/src/rm_ble_abs_spp/rm_ble_abs_spp.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,27 +402,37 @@ fsp_err_t RM_BLE_ABS_StartLegacyAdvertising (ble_abs_ctrl_t * const
g_mac_id_is_set = 1;
}

FSP_ERROR_RETURN(FSP_SUCCESS == R_BLE_GAP_SetAdvParam(&advertising_parameter), FSP_ERR_INVALID_ARGUMENT);
FSP_ERROR_RETURN(BLE_SUCCESS == R_BLE_GAP_SetAdvParam(&advertising_parameter), FSP_ERR_INVALID_ARGUMENT);

if ((NULL != p_advertising_parameter->p_advertising_data) && (0 < p_advertising_parameter->advertising_data_length))
{
/* Configure the GAP Advertisment Payload. */
st_ble_gap_adv_data_t advertising_data = {0};
advertising_data.data_type = (uint8_t) (BLE_GAP_ADV_DATA_MODE);
advertising_data.data_length = p_advertising_parameter->advertising_data_length;
advertising_data.p_data = p_advertising_parameter->p_advertising_data;
FSP_ERROR_RETURN(BLE_SUCCESS == R_BLE_GAP_SetAdvSresData(&advertising_data), FSP_ERR_INVALID_ARGUMENT);
}

if ((NULL != p_advertising_parameter->p_scan_response_data) &&
(0 < p_advertising_parameter->scan_response_data_length))
{
/* Configure the GAP Scan Response Payload. */
st_ble_gap_adv_data_t advertising_data = {0};
advertising_data.data_type = (uint8_t) (BLE_GAP_SCAN_RSP_DATA_MODE);
advertising_data.data_length = p_advertising_parameter->scan_response_data_length;
advertising_data.p_data = p_advertising_parameter->p_scan_response_data;
FSP_ERROR_RETURN(BLE_SUCCESS == R_BLE_GAP_SetAdvSresData(&advertising_data), FSP_ERR_INVALID_ARGUMENT);
}

/* Start Legacy Advertisment. */
FSP_ERROR_RETURN(BLE_SUCCESS == R_BLE_GAP_StartAdv(0, 0, 0), FSP_ERR_INVALID_ARGUMENT);

/* Set the internal status flags to indicate the advertisment mode. */
uint32_t status =
p_advertising_parameter->fast_advertising_period ? BLE_ABS_ADV_STATUS_PARAM_FAST : BLE_ABS_ADV_STATUS_PARAM_SLOW;
ble_abs_set_advertising_status(p_instance_ctrl, advertising_handle, status, 0);

st_ble_evt_data_t event;
st_ble_gap_adv_set_evt_t data;
data.adv_hdl = 0x00;
event.param_len = sizeof(st_ble_gap_adv_set_evt_t);
event.p_param = (void *) &data;
ble_abs_advertising_parameter_set_handler(p_instance_ctrl, &event);

st_ble_evt_data_t event2;
st_ble_gap_adv_data_evt_t data2;
data2.adv_hdl = 0x00;
data2.data_type = 0x02;
event2.param_len = sizeof(st_ble_gap_adv_data_evt_t);
event2.p_param = (void *) &data2;
ble_abs_advertising_data_set_handler(p_instance_ctrl, &event2);

return FSP_SUCCESS;
} /* End of function RM_BLE_ABS_StartLegacyAdvertising() */

Expand Down
20 changes: 17 additions & 3 deletions ra/fsp/src/rm_netxduo_wifi/rm_netxduo_wifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,6 @@ static UINT _nx_driver_tcpip_handler (struct NX_IP_STRUCT * ip_ptr,
}

case NX_TCPIP_OFFLOAD_TCP_SOCKET_DISCONNECT:
case NX_TCPIP_OFFLOAD_UDP_SOCKET_UNBIND:
{
/* Disconnect socket */
i = (UINT) (((NX_TCP_SOCKET *) socket_ptr)->nx_tcp_socket_tcpip_offload_context);
Expand All @@ -1051,10 +1050,25 @@ static UINT _nx_driver_tcpip_handler (struct NX_IP_STRUCT * ip_ptr,
break;
}

case NX_TCPIP_OFFLOAD_UDP_SOCKET_UNBIND:
{
/* Disconnect socket */
i = (UINT) (((NX_UDP_SOCKET *) socket_ptr)->nx_udp_socket_tcpip_offload_context);
if (nx_driver_sockets[i].remote_port)
{
status = rm_wifi_onchip_silex_socket_disconnect(nx_driver_sockets[i].socket_id);
}

/* Reset socket to free this entry. */
nx_driver_sockets[i].socket_ptr = NX_NULL;
nx_driver_sockets[i].remote_port = 0;
break;
}

case NX_TCPIP_OFFLOAD_UDP_SOCKET_BIND:
{
/* Store the index of driver socket. */
((NX_TCP_SOCKET *) socket_ptr)->nx_tcp_socket_tcpip_offload_context = (VOID *) i;
((NX_UDP_SOCKET *) socket_ptr)->nx_udp_socket_tcpip_offload_context = (VOID *) i;

/* Create UDP socket */
if (rm_wifi_onchip_silex_socket_create(i, RM_NETXDUO_WIFI_SOCKET_TYPE_UDP, RM_NETXDUO_WIFI_SOCKET_IPV4)) // Create a UDP socket
Expand All @@ -1072,7 +1086,7 @@ static UINT _nx_driver_tcpip_handler (struct NX_IP_STRUCT * ip_ptr,

case NX_TCPIP_OFFLOAD_UDP_SOCKET_SEND:
{
i = (UINT) (((NX_TCP_SOCKET *) socket_ptr)->nx_tcp_socket_tcpip_offload_context);
i = (UINT) (((NX_UDP_SOCKET *) socket_ptr)->nx_udp_socket_tcpip_offload_context);

/* Initialize the current packet to the input packet pointer. */
current_packet = packet_ptr;
Expand Down

0 comments on commit b58ec0d

Please sign in to comment.