Skip to content

Commit

Permalink
Release v1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
renesas-fsp-development committed Sep 18, 2020
1 parent 15b2501 commit a678257
Show file tree
Hide file tree
Showing 13 changed files with 75 additions and 78 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 @@ -44,16 +44,16 @@
#define FSP_VERSION_MINOR (3U)

/** 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 ("1.3.0")
#define FSP_VERSION_STRING ("1.3.1")

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

/**********************************************************************************************************************
* Typedef definitions
Expand Down
Binary file modified ra/fsp/lib/r_ble/cm4_ac6/all/libr_ble.a
Binary file not shown.
Binary file modified ra/fsp/lib/r_ble/cm4_ac6/all_freertos/libr_ble.a
Binary file not shown.
Binary file modified ra/fsp/lib/r_ble/cm4_gcc/all/libr_ble.a
Binary file not shown.
Binary file modified ra/fsp/lib/r_ble/cm4_gcc/all_freertos/libr_ble.a
Binary file not shown.
Binary file modified ra/fsp/lib/r_ble/cm4_iar/all/libr_ble.a
Binary file not shown.
Binary file modified ra/fsp/lib/r_ble/cm4_iar/all_freertos/libr_ble.a
Binary file not shown.
14 changes: 12 additions & 2 deletions ra/fsp/src/r_usb_basic/r_usb_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
******************************************************************************/
#define USB_VALUE_100 (100)
#define USB_VALUE_7FH (0x7F)
#define USB_VALUE_FFH (0xFF)

/******************************************************************************
* Exported global variables (to be accessed by other files)
Expand Down Expand Up @@ -99,6 +100,10 @@ usb_utr_t g_usb_pdata[USB_MAXPIPE_NUM + 1];
volatile uint16_t g_usb_usbmode[USB_NUM_USBIP];
volatile uint16_t g_usb_open_class[USB_NUM_USBIP];

#if defined(USB_CFG_PMSC_USE)
uint8_t g_usb_pmsc_usbip = USB_VALUE_FFH;
#endif /* defined(USB_CFG_PMSC_USE) */

/******************************************************************************
* Private global variables and functions
******************************************************************************/
Expand Down Expand Up @@ -238,7 +243,7 @@ fsp_err_t R_USB_EventGet (usb_ctrl_t * const p_api_ctrl, usb_status_t * event)
(*event) = USB_STATUS_NONE;
usb_instance_ctrl_t * p_ctrl = (usb_instance_ctrl_t *) p_api_ctrl;

usb_cstd_usb_task(p_ctrl->module_number);
usb_cstd_usb_task();
if (g_usb_cstd_event.write_pointer != g_usb_cstd_event.read_pointer)
{
*p_ctrl = g_usb_cstd_event.ctrl[g_usb_cstd_event.read_pointer];
Expand Down Expand Up @@ -516,7 +521,8 @@ fsp_err_t R_USB_Open (usb_ctrl_t * const p_api_ctrl, usb_cfg_t const * const p_c
g_usb_usbmode[p_ctrl->module_number] = USB_MODE_PERI;

#if defined(USB_CFG_PMSC_USE)
err = r_usb_pmsc_media_initialize(p_cfg->p_context); /* Register the media device driver. */
g_usb_pmsc_usbip = p_ctrl->module_number;
err = r_usb_pmsc_media_initialize(p_cfg->p_context); /* Register the media device driver. */
if (FSP_SUCCESS != err)
{
return err;
Expand Down Expand Up @@ -724,6 +730,10 @@ fsp_err_t R_USB_Close (usb_ctrl_t * const p_api_ctrl)
ret_code = FSP_ERR_USB_NOT_OPEN;
}

#if defined(USB_CFG_PMSC_USE)
g_usb_pmsc_usbip = USB_VALUE_FFH;
#endif /* defined(USB_CFG_PMSC_USE) */

return ret_code;
}

Expand Down
20 changes: 9 additions & 11 deletions ra/fsp/src/r_usb_basic/src/driver/inc/r_usb_extern.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,18 @@ extern uint16_t g_usb_pstd_pipe0_request;
extern uint16_t g_usb_pstd_std_request;
extern uint16_t g_usb_peri_connected; /* Peri CDC application enable */

#endif /* (USB_CFG_MODE & USB_CFG_PERI) == USB_CFG_PERI */
#if defined(USB_CFG_PMSC_USE)
extern uint8_t g_usb_pmsc_usbip;
#endif /* defined(USB_CFG_PMSC_USE) */

#endif /* (USB_CFG_MODE & USB_CFG_PERI) == USB_CFG_PERI */

extern uint16_t g_usb_pstd_remote_wakeup; /* Remote Wake up Enable Flag */
extern uint16_t g_usb_pstd_remote_wakeup_state; /* Result for Remote wake up */
extern uint16_t g_usb_pstd_remote_wakeup; /* Remote Wake up Enable Flag */
extern uint16_t g_usb_pstd_remote_wakeup_state; /* Result for Remote wake up */

/* r_usb.c */

extern volatile uint16_t g_usb_usbmode[USB_NUM_USBIP]; /* USB mode HOST/PERI */
extern volatile uint16_t g_usb_usbmode[USB_NUM_USBIP]; /* USB mode HOST/PERI */

#if ((USB_CFG_MODE & USB_CFG_HOST) == USB_CFG_HOST)
extern usb_utr_t g_usb_hdata[USB_NUM_USBIP][USB_MAXPIPE_NUM + 1];
Expand Down Expand Up @@ -290,7 +294,7 @@ uint16_t usb_cstd_get_pipe_type(usb_utr_t * ptr, uint16_t pipe);
void usb_cstd_do_aclrm(usb_utr_t * ptr, uint16_t pipe);
void usb_cstd_set_buf(usb_utr_t * ptr, uint16_t pipe);
void usb_cstd_clr_stall(usb_utr_t * ptr, uint16_t pipe);
void usb_cstd_usb_task(uint8_t module_number);
void usb_cstd_usb_task(void);
void usb_class_task(void);
void usb_set_event(usb_status_t event, usb_instance_ctrl_t * ctrl);
uint16_t usb_cstd_remote_wakeup(usb_utr_t * p_utr);
Expand Down Expand Up @@ -624,14 +628,8 @@ extern void usb_phid_write_complete(usb_utr_t * mess, uint16_t data1, uint16_t d
#endif /* defined(USB_CFG_PHID_USE) */

#if defined(USB_CFG_PMSC_USE)
#if (BSP_CFG_RTOS == 0)
extern void usb_pmsc_task(uint8_t module_number);

#else /* (BSP_CFG_RTOS == 0) */
extern void usb_pmsc_task(void);

#endif /* (BSP_CFG_RTOS == 0) */

#endif /* defined(USB_CFG_PMSC_USE) */

#if defined(USB_CFG_HCDC_USE)
Expand Down
57 changes: 24 additions & 33 deletions ra/fsp/src/r_usb_basic/src/driver/r_usb_clibusbip.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,33 +559,13 @@ fsp_err_t usb_cstd_rel_semaphore (usb_instance_ctrl_t * p_ctrl)
* Arguments : none
* Return value : none
******************************************************************************/
void usb_cstd_usb_task (uint8_t module_number)
void usb_cstd_usb_task (void)
{
if (USB_MODE_HOST == g_usb_usbmode[module_number])
{
FSP_PARAMETER_NOT_USED(module_number);
#if ((USB_CFG_MODE & USB_CFG_HOST) == USB_CFG_HOST)
#if defined(USB_CFG_HMSC_USE)
do
{
usb_cstd_scheduler(); /* Scheduler */
if (USB_FLGSET == usb_cstd_check_schedule()) /* Check for any task processing requests flags. */
{
/** Use only in non-OS. In RTOS, the kernel will schedule these tasks, no polling. **/
usb_hstd_hcd_task((void *) 0); /* HCD Task */
usb_hstd_mgr_task((void *) 0); /* MGR Task */
#if USB_CFG_HUB == USB_CFG_ENABLE
usb_hhub_task((usb_vp_int_t) 0); /* HUB Task */
#endif /* USB_CFG_HUB == USB_CFG_ENABLE */
usb_class_task();
}
}
/* WAIT_LOOP */
while (USB_FALSE != g_drive_search_lock);

#else /* defined(USB_CFG_HMSC_USE) */
do
{
usb_cstd_scheduler(); /* Scheduler */

if (USB_FLGSET == usb_cstd_check_schedule()) /* Check for any task processing requests flags. */
{
/** Use only in non-OS. In RTOS, the kernel will schedule these tasks, no polling. **/
Expand All @@ -594,25 +574,36 @@ void usb_cstd_usb_task (uint8_t module_number)
#if USB_CFG_HUB == USB_CFG_ENABLE
usb_hhub_task((usb_vp_int_t) 0); /* HUB Task */
#endif /* USB_CFG_HUB == USB_CFG_ENABLE */
#if defined(USB_CFG_HCDC_USE) || defined(USB_CFG_HHID_USE) || defined(USB_CFG_HVND_USE)
usb_class_task();
#endif /* defined(USB_CFG_HCDC_USE) || defined(USB_CFG_HHID_USE) || defined(USB_CFG_HVND_USE) */
}
#endif /* defined(USB_CFG_HMSC_USE) */
#endif /*( (USB_CFG_MODE & USB_CFG_HOST) == USB_CFG_HOST )*/
}
else
/* WAIT_LOOP */
while (USB_FALSE != g_drive_search_lock);

#else /* defined(USB_CFG_HMSC_USE) */
usb_cstd_scheduler(); /* Scheduler */

if (USB_FLGSET == usb_cstd_check_schedule()) /* Check for any task processing requests flags. */
{
/** Use only in non-OS. In RTOS, the kernel will schedule these tasks, no polling. **/
usb_hstd_hcd_task((void *) 0); /* HCD Task */
usb_hstd_mgr_task((void *) 0); /* MGR Task */
#if USB_CFG_HUB == USB_CFG_ENABLE
usb_hhub_task((usb_vp_int_t) 0); /* HUB Task */
#endif /* USB_CFG_HUB == USB_CFG_ENABLE */
#if defined(USB_CFG_HCDC_USE) || defined(USB_CFG_HHID_USE) || defined(USB_CFG_HVND_USE)
usb_class_task();
#endif /* defined(USB_CFG_HCDC_USE) || defined(USB_CFG_HHID_USE) || defined(USB_CFG_HVND_USE) */
}
#endif /* defined(USB_CFG_HMSC_USE) */
#endif /*( (USB_CFG_MODE & USB_CFG_HOST) == USB_CFG_HOST )*/
#if ((USB_CFG_MODE & USB_CFG_PERI) == USB_CFG_PERI)
usb_pstd_pcd_task();
usb_pstd_pcd_task();

#if defined(USB_CFG_PMSC_USE)
usb_pmsc_task(module_number);
#else /* defined(USB_CFG_PMSC_USE) */
FSP_PARAMETER_NOT_USED(module_number);
usb_pmsc_task();
#endif /* defined(USB_CFG_PMSC_USE) */
#endif /*( (USB_CFG_MODE & USB_CFG_PERI) == USB_CFG_PERI )*/
}
} /* End of function usb_cstd_usb_task() */

/******************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion ra/fsp/src/r_usb_basic/src/driver/r_usb_hmanager.c
Original file line number Diff line number Diff line change
Expand Up @@ -2518,7 +2518,7 @@ usb_er_t usb_hstd_mgr_open (usb_utr_t * ptr)
memset(g_usb_hstd_config_descriptor[ptr->ip], 0, USB_CONFIGSIZE);
memset((void *) &g_usb_hstd_class_request[ptr->ip], 0, (5 * 2));
memset((void *) &g_usb_hstd_class_ctrl[ptr->ip], 0, sizeof(usb_utr_t));
memset((void *) p_usb_shstd_mgr_msg[ptr->ip], 0, sizeof(usb_mgrinfo_t));
memset((void *) &p_usb_shstd_mgr_msg[ptr->ip], 0, sizeof(usb_mgrinfo_t *));

g_usb_hstd_enum_seq[ptr->ip] = 0;
g_usb_hstd_check_enu_result[ptr->ip] = 0;
Expand Down
38 changes: 21 additions & 17 deletions ra/fsp/src/r_usb_basic/src/driver/r_usb_pstdrequest.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static void usb_pstd_set_interface3(usb_utr_t * p_utr);
static void usb_pstd_synch_rame1(usb_utr_t * p_utr);

#if USB_CFG_REQUEST == USB_CFG_ENABLE
static void usb_pstd_request_event_set(void);
static void usb_pstd_request_event_set(usb_utr_t * p_utr);

#endif /* USB_CFG_REQUEST == USB_CFG_ENABLE */

Expand Down Expand Up @@ -254,6 +254,7 @@ void usb_pstd_stand_req3 (usb_utr_t * p_utr)
ctrl.data_size = 0;
ctrl.status = USB_SETUP_STATUS_ACK;
ctrl.type = USB_CLASS_REQUEST;
ctrl.module_number = p_utr->ip;
#if (BSP_CFG_RTOS == 2)
ctrl.p_data = (void *) xTaskGetCurrentTaskHandle();
#endif /* (BSP_CFG_RTOS == 2) */
Expand Down Expand Up @@ -327,6 +328,7 @@ void usb_pstd_stand_req4 (usb_utr_t * p_utr)
ctrl.data_size = 0;
ctrl.status = USB_SETUP_STATUS_ACK;
ctrl.type = USB_CLASS_REQUEST;
ctrl.module_number = p_utr->ip;
#if (BSP_CFG_RTOS == 2)
ctrl.p_data = (void *) xTaskGetCurrentTaskHandle();
#endif /* (BSP_CFG_RTOS == 2) */
Expand Down Expand Up @@ -370,9 +372,10 @@ void usb_pstd_stand_req5 (usb_utr_t * p_utr)
ctrl.setup.request_index = g_usb_pstd_req_index; /* Index */
ctrl.setup.request_length = g_usb_pstd_req_length; /* Length */

ctrl.data_size = 0;
ctrl.status = USB_SETUP_STATUS_ACK;
ctrl.type = USB_CLASS_REQUEST;
ctrl.data_size = 0;
ctrl.status = USB_SETUP_STATUS_ACK;
ctrl.type = USB_CLASS_REQUEST;
ctrl.module_number = p_utr->ip;
#if (BSP_CFG_RTOS == 2)
ctrl.p_data = (void *) xTaskGetCurrentTaskHandle();
#endif /* (BSP_CFG_RTOS == 2) */
Expand Down Expand Up @@ -852,7 +855,7 @@ static void usb_pstd_clr_feature0 (void)
{
if (USB_TRUE == usb_pstd_chk_remote())
{
usb_pstd_request_event_set();
usb_pstd_request_event_set(p_utr);
}
}
}
Expand Down Expand Up @@ -1015,7 +1018,7 @@ static void usb_pstd_set_feature0 (void)
{
if (USB_TRUE == usb_pstd_chk_remote())
{
usb_pstd_request_event_set();
usb_pstd_request_event_set(p_utr);
}
}
}
Expand Down Expand Up @@ -1363,7 +1366,7 @@ static void usb_pstd_set_interface0 (usb_utr_t * p_utr)
}

#if USB_CFG_REQUEST == USB_CFG_ENABLE
usb_pstd_request_event_set();
usb_pstd_request_event_set(p_utr);
#endif /* USB_CFG_REQUEST == USB_CFG_ENABLE */
}

Expand Down Expand Up @@ -1738,17 +1741,18 @@ void usb_peri_class_request_wss (usb_setup_t * req, usb_utr_t * p_utr)
* Arguments : none
* Return value : none
******************************************************************************/
void usb_pstd_request_event_set (void)
void usb_pstd_request_event_set (usb_utr_t * p_utr)
{
usb_ctrl_t ctrl;

ctrl.setup.type = g_usb_pstd_req_type; /* Request type */
ctrl.setup.value = g_usb_pstd_req_value; /* Value */
ctrl.setup.index = g_usb_pstd_req_index; /* Index */
ctrl.setup.length = g_usb_pstd_req_length; /* Length */
ctrl.size = 0;
ctrl.status = USB_SETUP_STATUS_ACK;
ctrl.type = USB_CLASS_REQUEST;
usb_instance_ctrl_t ctrl;

ctrl.setup.request_type = g_usb_pstd_req_type; /* Request type */
ctrl.setup.request_value = g_usb_pstd_req_value; /* Value */
ctrl.setup.request_index = g_usb_pstd_req_index; /* Index */
ctrl.setup.request_length = g_usb_pstd_req_length; /* Length */
ctrl.data_size = 0;
ctrl.status = USB_SETUP_STATUS_ACK;
ctrl.type = USB_CLASS_REQUEST;
ctrl.module_number = p_utr->ip;
usb_set_event(USB_STATUS_REQUEST, &ctrl);
} /* End of function usb_pstd_request_event_set */

Expand Down
16 changes: 5 additions & 11 deletions ra/fsp/src/r_usb_pmsc/src/r_usb_pmsc_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,7 @@ usb_pmsc_cbm_t g_usb_pmsc_message;
* Arguments : none
* Return value : none
***********************************************************************************************************************/
#if (BSP_CFG_RTOS == 0)
void usb_pmsc_task (uint8_t module_number)
#else /* (BSP_CFG_RTOS == 0) */
void usb_pmsc_task (void)
#endif /* (BSP_CFG_RTOS == 0) */
{
#if (BSP_CFG_RTOS == 0)
usb_utr_t utr;
Expand Down Expand Up @@ -129,7 +125,7 @@ void usb_pmsc_task (void)
/* Normal Status Condotion */
case USB_DATA_OK:
{
usb_pmsc_check_cbw(module_number);
usb_pmsc_check_cbw(g_usb_pmsc_usbip);

break;
}
Expand Down Expand Up @@ -173,7 +169,7 @@ void usb_pmsc_task (void)
pmsc_atapi_command_processing(g_usb_pmsc_cbw.cbwcb,
g_usb_pmscstatus,
&usb_pmsc_data_transfer,
module_number);
g_usb_pmsc_usbip);

break;
}
Expand Down Expand Up @@ -207,7 +203,7 @@ void usb_pmsc_task (void)
pmsc_atapi_command_processing(g_usb_pmsc_cbw.cbwcb,
g_usb_pmscstatus,
&usb_pmsc_data_transfer,
module_number);
g_usb_pmsc_usbip);

break;
}
Expand Down Expand Up @@ -238,7 +234,7 @@ void usb_pmsc_task (void)
/* Normal Status Condotion */
case USB_DATA_NONE:
{
utr.ip = module_number;
utr.ip = g_usb_pmsc_usbip;
usb_pmsc_receive_cbw(&utr);

break;
Expand Down Expand Up @@ -572,9 +568,7 @@ static void usb_pmsc_check_cbw (uint8_t module_number)
case USB_PMSC_CSWSND:
{
g_usb_pmsc_seq = result;
pmsc_atapi_command_processing(g_usb_pmsc_cbw.cbwcb,
g_usb_pmscstatus,
&usb_pmsc_data_transfer,
pmsc_atapi_command_processing(g_usb_pmsc_cbw.cbwcb, g_usb_pmscstatus, &usb_pmsc_data_transfer,
module_number);

break;
Expand Down

0 comments on commit a678257

Please sign in to comment.