S32K automatically calculate size of periphclocks array

This commit is contained in:
Peter van der Perk
2022-12-13 10:50:00 +01:00
committed by Xiang Xiao
parent 4873fec670
commit 6b3b5751c1
28 changed files with 38 additions and 43 deletions
@@ -77,10 +77,6 @@
#define NUM_OF_GPIO 12
/* Count of peripheral clock user configurations */
#define NUM_OF_PERIPHERAL_CLOCKS_0 12
/****************************************************************************
* Public Data
****************************************************************************/
@@ -163,7 +163,6 @@ const struct clock_configuration_s g_initial_clkconfig =
},
.pcc =
{
.count = NUM_OF_PERIPHERAL_CLOCKS_0, /* Number peripheral clock configurations */
.pclks = g_peripheral_clockconfig0, /* Peripheral clock configurations */
},
.pmc =
@@ -123,6 +123,10 @@ const struct peripheral_clock_config_s g_peripheral_clockconfig0[] =
},
};
unsigned int const num_of_peripheral_clocks_0 =
sizeof(g_peripheral_clockconfig0) /
sizeof(g_peripheral_clockconfig0[0]);
/****************************************************************************
* Public Functions
****************************************************************************/
@@ -64,10 +64,6 @@
#define GPIO_SW2 (PIN_PTD3 | PIN_INT_BOTH)
#define GPIO_SW3 (PIN_PTD5 | PIN_INT_BOTH)
/* Count of peripheral clock user configurations */
#define NUM_OF_PERIPHERAL_CLOCKS_0 11
/****************************************************************************
* Public Data
****************************************************************************/
@@ -145,7 +145,6 @@ const struct clock_configuration_s g_initial_clkconfig =
},
.pcc =
{
.count = NUM_OF_PERIPHERAL_CLOCKS_0, /* Number peripheral clock configurations */
.pclks = g_peripheral_clockconfig0, /* Peripheral clock configurations */
},
.pmc =
@@ -115,6 +115,10 @@ const struct peripheral_clock_config_s g_peripheral_clockconfig0[] =
},
};
unsigned int const num_of_peripheral_clocks_0 =
sizeof(g_peripheral_clockconfig0) /
sizeof(g_peripheral_clockconfig0[0]);
/****************************************************************************
* Public Functions
****************************************************************************/
@@ -64,10 +64,6 @@
#define GPIO_SW2 (PIN_PTC12 | PIN_INT_BOTH)
#define GPIO_SW3 (PIN_PTC13 | PIN_INT_BOTH)
/* Count of peripheral clock user configurations */
#define NUM_OF_PERIPHERAL_CLOCKS_0 15
/****************************************************************************
* Public Data
****************************************************************************/
@@ -163,7 +163,6 @@ const struct clock_configuration_s g_initial_clkconfig =
},
.pcc =
{
.count = NUM_OF_PERIPHERAL_CLOCKS_0, /* Number peripheral clock configurations */
.pclks = g_peripheral_clockconfig0, /* Peripheral clock configurations */
},
.pmc =
@@ -149,6 +149,10 @@ const struct peripheral_clock_config_s g_peripheral_clockconfig0[] =
},
};
unsigned int const num_of_peripheral_clocks_0 =
sizeof(g_peripheral_clockconfig0) /
sizeof(g_peripheral_clockconfig0[0]);
/****************************************************************************
* Public Functions
****************************************************************************/
@@ -64,10 +64,6 @@
#define GPIO_SW2 (PIN_PTC12 | PIN_INT_BOTH)
#define GPIO_SW3 (PIN_PTC13 | PIN_INT_BOTH)
/* Count of peripheral clock user configurations */
#define NUM_OF_PERIPHERAL_CLOCKS_0 15
/****************************************************************************
* Public Data
****************************************************************************/
@@ -163,7 +163,6 @@ const struct clock_configuration_s g_initial_clkconfig =
},
.pcc =
{
.count = NUM_OF_PERIPHERAL_CLOCKS_0, /* Number peripheral clock configurations */
.pclks = g_peripheral_clockconfig0, /* Peripheral clock configurations */
},
.pmc =
@@ -149,6 +149,10 @@ const struct peripheral_clock_config_s g_peripheral_clockconfig0[] =
},
};
size_t const num_of_peripheral_clocks_0 =
sizeof(g_peripheral_clockconfig0) /
sizeof(g_peripheral_clockconfig0[0]);
/****************************************************************************
* Public Functions
****************************************************************************/
@@ -64,10 +64,6 @@
#define GPIO_SW3 (PIN_PTC12 | PIN_INT_BOTH)
#define GPIO_SW4 (PIN_PTC13 | PIN_INT_BOTH)
/* Count of peripheral clock user configurations */
#define NUM_OF_PERIPHERAL_CLOCKS_0 18
/****************************************************************************
* Public Data
****************************************************************************/
@@ -169,7 +169,6 @@ const struct clock_configuration_s g_initial_clkconfig =
},
.pcc =
{
.count = NUM_OF_PERIPHERAL_CLOCKS_0, /* Number peripheral clock configurations */
.pclks = g_peripheral_clockconfig0, /* Peripheral clock configurations */
},
.pmc =
@@ -177,6 +177,10 @@ const struct peripheral_clock_config_s g_peripheral_clockconfig0[] =
},
};
unsigned int const num_of_peripheral_clocks_0 =
sizeof(g_peripheral_clockconfig0) /
sizeof(g_peripheral_clockconfig0[0]);
/****************************************************************************
* Public Functions
****************************************************************************/
@@ -163,7 +163,6 @@ const struct clock_configuration_s g_initial_clkconfig =
},
.pcc =
{
.count = NUM_OF_PERIPHERAL_CLOCKS_0, /* Number peripheral clock configurations */
.pclks = g_peripheral_clockconfig0, /* Peripheral clock configurations */
},
.pmc =
@@ -122,6 +122,10 @@ const struct peripheral_clock_config_s g_peripheral_clockconfig0[] =
},
};
unsigned int const num_of_peripheral_clocks_0 =
sizeof(g_peripheral_clockconfig0) /
sizeof(g_peripheral_clockconfig0[0]);
/****************************************************************************
* Public Functions
****************************************************************************/
@@ -66,10 +66,6 @@
#define GPIO_SE050_EN (PIN_PTA6 | GPIO_LOWDRIVE)
/* Count of peripheral clock user configurations */
#define NUM_OF_PERIPHERAL_CLOCKS_0 12
/****************************************************************************
* Public Data
****************************************************************************/
@@ -66,10 +66,6 @@
#define GPIO_SW1 (PIN_EIRQ31_2 | PIN_INT_BOTH) /* PTD15 */
#define GPIO_SW2 (PIN_EIRQ5_2 | PIN_INT_BOTH) /* PTA25 */
/* Count of peripheral clock user configurations */
#define NUM_OF_PERIPHERAL_CLOCKS_0 26
/****************************************************************************
* Public Data
****************************************************************************/
@@ -152,7 +152,6 @@ const struct clock_configuration_s g_initial_clkconfig =
},
.pcc =
{
.count = NUM_OF_PERIPHERAL_CLOCKS_0, /* Number of peripheral clock configurations */
.pclks = g_peripheral_clockconfig0, /* Peripheral clock configurations */
},
};
@@ -253,6 +253,10 @@ const struct peripheral_clock_config_s g_peripheral_clockconfig0[] =
}
};
unsigned int const num_of_peripheral_clocks_0 =
sizeof(g_peripheral_clockconfig0) /
sizeof(g_peripheral_clockconfig0[0]);
/****************************************************************************
* Public Functions
****************************************************************************/
@@ -74,10 +74,6 @@
#define GPIO_SW0 (PIN_WKPU41 | PIN_INT_BOTH)
#define GPIO_SW1 (PIN_WKPU38 | PIN_INT_BOTH)
/* Count of peripheral clock user configurations */
#define NUM_OF_PERIPHERAL_CLOCKS_0 25
/****************************************************************************
* Public Data
****************************************************************************/
@@ -147,7 +147,6 @@ const struct clock_configuration_s g_initial_clkconfig =
},
.pcc =
{
.count = NUM_OF_PERIPHERAL_CLOCKS_0, /* Number of peripheral clock configurations */
.pclks = g_peripheral_clockconfig0, /* Peripheral clock configurations */
},
};
@@ -245,6 +245,10 @@ const struct peripheral_clock_config_s g_peripheral_clockconfig0[] =
},
};
unsigned int const num_of_peripheral_clocks_0 =
sizeof(g_peripheral_clockconfig0) /
sizeof(g_peripheral_clockconfig0[0]);
/****************************************************************************
* Public Functions
****************************************************************************/