Skip to content

Commit 5ba54c8

Browse files
congnguyenhuummahadevan108
authored andcommitted
s32: s32ze: patch SENT for integration with zephyr
Remove 'u' suffix from macros that used with LISTIFY in shim-driver Get number of the used controller instances form device tree Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
1 parent d7f039f commit 5ba54c8

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

s32/drivers/s32ze/BaseNXP/header/S32Z2_SRX.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
*/
7070

7171
/** SRX - Size of Registers Arrays */
72-
#define SRX_CNL_COUNT 8u
72+
#define SRX_CNL_COUNT 8
7373

7474
/** SRX - Register Layout Typedef */
7575
typedef struct {
@@ -111,7 +111,7 @@ typedef struct {
111111
} SRX_Type, *SRX_MemMapPtr;
112112

113113
/** Number of instances of the SRX module. */
114-
#define SRX_INSTANCE_COUNT (2u)
114+
#define SRX_INSTANCE_COUNT 2
115115

116116
/* SRX - Peripheral instance base addresses */
117117
/** Peripheral SRX_0 base address */

s32/soc/s32z270/include/Srx_Ip_Defines.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ extern "C"{
2828

2929
#include "Mcal.h"
3030

31+
#include <zephyr/devicetree.h>
3132

3233
/*==================================================================================================
3334
* SOURCE FILE VERSION INFORMATION
@@ -126,14 +127,7 @@ extern "C"{
126127
* @details Number of configured controllers as defined by user in configuration tool
127128
*
128129
*/
129-
#define SRX_IP_INSTANCE_COUNT 1U
130-
/*
131-
* @brief Max number of configured channels
132-
* @details Max number of configured channels as defined by user in configuration tool
133-
*
134-
*/
135-
136-
#define SRX_IP_CHANNEL_COUNT 1U
130+
#define SRX_IP_INSTANCE_COUNT DT_NUM_INST_STATUS_OKAY(nxp_s32_sent)
137131

138132
#define SRX_IP_ISR_PROCESS_ERROR_HANDLER_CTRL0_COMBINED
139133

0 commit comments

Comments
 (0)