77* File Name : r_rspi_rx.c
88* Description : Functions for using RSPI on RX devices.
99************************************************************************************************************************
10- * History : DD.MM.YYYY Version Description
10+ * History : DD.MM.YYYY Version Description
1111* 25.10.2013 1.00 First Release
1212* 01.05.2014 1.20 Added support for RX62N. Minor bug fixes.
1313* 19.01.2014 1.30 Added support for RX113, RX64M, and RX71M
2222* 20.12.2018 2.00 Added double buffer and dmadtc transfer mode.
2323* Supported RX72T.
2424* 20.05.2019 2.01 Added support for GNUC and ICCRX.
25- * Fixed coding style.
25+ * Fixed coding style.
2626* 20.06.2019 2.02 Supported RX23W.
2727* 30.07.2019 2.03 Supported RX72M.
2828* 22.11.2019 2.04 Supported RX72N and RX66N.
3535* Fixed bug. Set the RSPCK auto-stop function enable bit(SPCR2.SCKASE) and update
3636* functions rspi_sptiX_isr (X = 0, 1, 2) to ensure RSPI can communication normally when it
3737* is in high speed reception.
38- * Fixed two warning when the MCU is RX111 etc., the unused function(rspi_spei_grp_isr)
38+ * Fixed two warning when the MCU is RX111 etc., the unused function(rspi_spei_grp_isr)
3939* and variable(int_ctrl) will be valid.
4040* Added communication completion interrupt for rx671.
4141* 31.07.2021 3.02 Supported RX140.
4646* Added idle interrupt for RX671.
4747* 29.05.2023 3.20 Supported RX23E-B.
4848* Fixed to comply with GSCE Coding Standards Rev.6.5.0.
49- * 18.08.2023 3.30 Modified comments of the following API functions: R_RSPI_IntSptiIerClear,
49+ * 18.08.2023 3.30 Modified comments of the following API functions: R_RSPI_IntSptiIerClear,
5050* R_RSPI_IntSpriIerClear, R_RSPI_DisableSpti, R_RSPI_DisableRSPI.
5151* 05.10.2023 3.40 Implemented code to clear the SPRF flag at the start of SPI communication.
52- * Modified the order of disabling the error interrupt and canceling the error
52+ * Modified the order of disabling the error interrupt and canceling the error
5353* handler registration when disabling interrupts.
5454* Modified the order of disabling interrupts between SPTI and SPRI
5555* when disabling interrupts.
@@ -63,7 +63,6 @@ Includes <System Includes> , "Project Includes"
6363/* Defines for RSPI support */
6464#include "platform.h"
6565#include "r_rspi_rx_if.h"
66- #include "r_bsp_locking.h"
6766
6867#if RSPI_CFG_LONGQ_ENABLE == 1
6968/* Uses LONGQ driver header file. */
@@ -492,7 +491,7 @@ rspi_err_t R_RSPI_Open(uint8_t channel, // @suppress("6.6a Sour
492491 {
493492 R_BSP_NOP ();
494493 }
495-
494+
496495 /* Peripheral Initialized */
497496 g_rspi_handles [channel ].rspi_chnl_opened = true;
498497 g_rspi_handles [channel ].pcallback = pcallback ;
@@ -1131,7 +1130,7 @@ static rspi_err_t rspi_write_read_common(rspi_handle_t handle,
11311130 * @retval RSPI_ERR_NULL_PTR
11321131 * A required pointer argument is NULL
11331132 * @details Use this function when disabling interrupt from within the callback function generated at DMAC
1134- * transfer-end or an intentional cancellation of transmission.\n
1133+ * transfer-end or an intentional cancellation of transmission.\n
11351134 * Please call this function after calling R_RSPI_DisableSpti().
11361135 * @note Do not use this function during transmission other than an intentional cancellation of transmission.\n
11371136 * Doing so could disrupt the transfer.
@@ -1204,7 +1203,7 @@ rspi_err_t R_RSPI_IntSptiIerClear(rspi_handle_t handle)
12041203 * @retval RSPI_ERR_NULL_PTR
12051204 * A required pointer argument is NULL
12061205 * @details Use this function when disabling interrupt from within the callback function generated at DMAC
1207- * transfer-end or an intentional cancellation of transmission.\n
1206+ * transfer-end or an intentional cancellation of transmission.\n
12081207 * Please call this function before calling R_RSPI_DisableRSPI().
12091208 * @note Do not use this function during transmission other than an intentional cancellation of transmission.\n
12101209 * Doing so could disrupt the transfer.
@@ -1277,7 +1276,7 @@ rspi_err_t R_RSPI_IntSpriIerClear(rspi_handle_t handle)
12771276 * @retval RSPI_ERR_NULL_PTR
12781277 * A required pointer argument is NULL
12791278 * @details Use this function when disabling interrupt from within the callback function generated at DMAC
1280- * transfer-end or an intentional cancellation of transmission.\n
1279+ * transfer-end or an intentional cancellation of transmission.\n
12811280 * Please call this function before calling R_RSPI_IntSptiIerClear().
12821281 * @note Do not use this function during transmission other than an intentional cancellation of transmission.\n
12831282 * Doing so could disrupt the transfer.
@@ -1311,7 +1310,7 @@ rspi_err_t R_RSPI_DisableSpti(rspi_handle_t handle)
13111310 * @retval RSPI_ERR_NULL_PTR
13121311 * A required pointer argument is NULL
13131312 * @details Use this function when disabling the RSPI function from within the callback function generated at DMAC
1314- * transfer-end or an intentional cancellation of transmission.\n
1313+ * transfer-end or an intentional cancellation of transmission.\n
13151314 * Please call this function after calling R_RSPI_IntSpriIerClear().
13161315 * @note Do not use this function during transmission other than an intentional cancellation of transmission.\n
13171316 * Doing so could disrupt the transfer.
@@ -1865,7 +1864,7 @@ static void rspi_interrupts_clear(uint8_t channel)
18651864 #if defined BSP_MCU_RX671 || defined BSP_MCU_RX26T
18661865 /* Clear any pending communication end interrupts */
18671866 IR (RSPI0 , SPCI0 ) = 0 ;
1868- #endif
1867+ #endif
18691868 #if !(defined(BSP_MCU_RX64M ) || defined(BSP_MCU_RX71M ) || defined(BSP_MCU_RX65N )\
18701869 || defined(BSP_MCU_RX66T ) || defined(BSP_MCU_RX72T ) || defined(BSP_MCU_RX72M )\
18711870 || defined(BSP_MCU_RX72N ) || defined(BSP_MCU_RX66N ) || defined(BSP_MCU_RX671 )\
@@ -1895,7 +1894,7 @@ static void rspi_interrupts_clear(uint8_t channel)
18951894 || defined(BSP_MCU_RX671 ))
18961895 /* Clear any pending error interrupt */
18971896 IR (RSPI1 , SPEI1 ) = 0 ;
1898- #endif
1897+ #endif
18991898 if (0 == IR (RSPI1 , SPTI1 ))
19001899 {
19011900 R_BSP_NOP ();
@@ -2003,7 +2002,7 @@ static void rspi_interrupts_enable(uint8_t channel, bool enabled)
20032002 {
20042003 R_BSP_NOP ();
20052004 }
2006-
2005+
20072006 #if defined BSP_MCU_RX64M || defined BSP_MCU_RX71M || defined BSP_MCU_RX65N || defined BSP_MCU_RX66T \
20082007 || defined BSP_MCU_RX72T || defined BSP_MCU_RX72M || defined BSP_MCU_RX72N || defined BSP_MCU_RX66N \
20092008 || defined BSP_MCU_RX671 || defined BSP_MCU_RX660 || defined BSP_MCU_RX26T
@@ -2097,7 +2096,7 @@ static void rspi_interrupts_enable(uint8_t channel, bool enabled)
20972096 {
20982097 R_BSP_InterruptRequestEnable (VECT (RSPI1 ,SPRI1 ));
20992098 R_BSP_InterruptRequestEnable (VECT (RSPI1 ,SPTI1 ));
2100- #ifdef BSP_MCU_RX671
2099+ #ifdef BSP_MCU_RX671
21012100 R_BSP_InterruptRequestEnable (VECT (RSPI1 ,SPCI1 ));
21022101 #endif
21032102 }
@@ -2875,7 +2874,7 @@ static void rspi_spei_isr_common(uint8_t channel)
28752874 /* Clear error source: OVRF flag. */
28762875 (* g_rspi_channels [channel ]).SPSR .BIT .OVRF = 0 ;
28772876 }
2878-
2877+
28792878 if (status_flags & RSPI_SPSR_MODF )
28802879 {
28812880 if (status_flags & RSPI_SPSR_UDRF )
@@ -2899,7 +2898,7 @@ static void rspi_spei_isr_common(uint8_t channel)
28992898 (* g_rspi_channels [channel ]).SPSR .BIT .MODF = 0 ;
29002899 }
29012900 }
2902-
2901+
29032902 if (status_flags & RSPI_SPSR_PERF )
29042903 {
29052904 if (RSPI_EVT_ERR_UNDEF == event )
@@ -3014,7 +3013,7 @@ static void rspi_spei_grp_isr(void *pdata)
30143013 }
30153014 #endif
30163015 #endif
3017-
3016+
30183017 #if defined BSP_MCU_RX65N || defined BSP_MCU_RX72M || defined BSP_MCU_RX72N || defined BSP_MCU_RX66N \
30193018 || defined BSP_MCU_RX671
30203019 #if RSPI_CFG_USE_CHAN2 == 1
@@ -3219,7 +3218,7 @@ static void rspi_spii_grp_isr(void *pdata)
32193218 }
32203219 #endif
32213220 #endif
3222-
3221+
32233222 #if defined BSP_MCU_RX65N || defined BSP_MCU_RX72M || defined BSP_MCU_RX72N || defined BSP_MCU_RX66N \
32243223 || defined BSP_MCU_RX671
32253224 #if RSPI_CFG_USE_CHAN2 == 1
0 commit comments