Skip to content

Commit

Permalink
feat(PeriphDrivers): Add PinMux tool supporting functions (#997)
Browse files Browse the repository at this point in the history
Co-authored-by: lorne-maxim <lorne-maxim@users.noreply.github.com>
  • Loading branch information
2 people authored and Jake-Carter committed Apr 29, 2024
1 parent 9417f4e commit b87895f
Show file tree
Hide file tree
Showing 49 changed files with 794 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Libraries/CMSIS/Device/Maxim/MAX32520/Source/system_max32520.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@ __weak int PreInit(void)
return 0;
}

/* This function is called before the Board_Init function. This weak
* implementation does nothing, but you may over-ride this function in your
* program if you want to configure the state of all pins prior to the
* application running. This is useful when using external tools (like a
* Pin Mux configuration tool) that generate code to initialize the pins.
*/
__weak void PinInit(void)
{
/* Do nothing */
}

/* This function can be implemented by the application to initialize the board */
__weak int Board_Init(void)
{
Expand Down Expand Up @@ -139,5 +150,6 @@ __weak void SystemInit(void)
MXC_GPIO1->pdpu_sel0 |= 0xFFFFFFFF;
MXC_GPIO1->pdpu_sel1 &= ~(0xFFFFFFFF);

PinInit();
Board_Init();
}
12 changes: 12 additions & 0 deletions Libraries/CMSIS/Device/Maxim/MAX32570/Source/system_max32570.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@ __weak int PreInit(void)
return 0;
}

/* This function is called before the Board_Init function. This weak
* implementation does nothing, but you may over-ride this function in your
* program if you want to configure the state of all pins prior to the
* application running. This is useful when using external tools (like a
* Pin Mux configuration tool) that generate code to initialize the pins.
*/
__weak void PinInit(void)
{
/* Do nothing */
}

/* This function can be implemented by the application to initialize the board */
__weak int Board_Init(void)
{
Expand Down Expand Up @@ -138,5 +149,6 @@ __weak void SystemInit(void)
MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_GPIO0);
MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_GPIO1);

PinInit();
Board_Init();
}
12 changes: 12 additions & 0 deletions Libraries/CMSIS/Device/Maxim/MAX32572/Source/system_max32572.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@ __weak int PreInit(void)
return 0;
}

/* This function is called before the Board_Init function. This weak
* implementation does nothing, but you may over-ride this function in your
* program if you want to configure the state of all pins prior to the
* application running. This is useful when using external tools (like a
* Pin Mux configuration tool) that generate code to initialize the pins.
*/
__weak void PinInit(void)
{
/* Do nothing */
}

/* This function can be implemented by the application to initialize the board */
__weak int Board_Init(void)
{
Expand Down Expand Up @@ -139,5 +150,6 @@ __weak void SystemInit(void)
MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_GPIO0);
MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_GPIO1);

PinInit();
Board_Init();
}
12 changes: 12 additions & 0 deletions Libraries/CMSIS/Device/Maxim/MAX32650/Source/system_max32650.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ __weak int PreInit(void)
return 0;
}

/* This function is called before the Board_Init function. This weak
* implementation does nothing, but you may over-ride this function in your
* program if you want to configure the state of all pins prior to the
* application running. This is useful when using external tools (like a
* Pin Mux configuration tool) that generate code to initialize the pins.
*/
__weak void PinInit(void)
{
/* Do nothing */
}

/* This function can be implemented by the application to initialize the board */
__weak int Board_Init(void)
{
Expand Down Expand Up @@ -177,6 +188,7 @@ __weak void SystemInit(void)
MXC_SYS_ClockDisable(MXC_SYS_PERIPH_CLOCK_I2S);
MXC_SYS_ClockDisable(MXC_SYS_PERIPH_CLOCK_SPIXIPR);

PinInit();
Board_Init();
}

Expand Down
12 changes: 12 additions & 0 deletions Libraries/CMSIS/Device/Maxim/MAX32655/Source/system_max32655.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,17 @@ __weak int PreInit(void)
return 0;
}

/* This function is called before the Board_Init function. This weak
* implementation does nothing, but you may over-ride this function in your
* program if you want to configure the state of all pins prior to the
* application running. This is useful when using external tools (like a
* Pin Mux configuration tool) that generate code to initialize the pins.
*/
__weak void PinInit(void)
{
/* Do nothing */
}

/* This function can be implemented by the application to initialize the board */
__weak int Board_Init(void)
{
Expand Down Expand Up @@ -164,6 +175,7 @@ __weak void SystemInit(void)
MXC_SYS_SetClockDiv(MXC_SYS_CLOCK_DIV_1);
SystemCoreClockUpdate();

PinInit();
Board_Init();

PalSysInit();
Expand Down
12 changes: 12 additions & 0 deletions Libraries/CMSIS/Device/Maxim/MAX32660/Source/system_max32660.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@ __weak int PreInit(void)
return 0;
}

/* This function is called before the Board_Init function. This weak
* implementation does nothing, but you may over-ride this function in your
* program if you want to configure the state of all pins prior to the
* application running. This is useful when using external tools (like a
* Pin Mux configuration tool) that generate code to initialize the pins.
*/
__weak void PinInit(void)
{
/* Do nothing */
}

/* This function can be implemented by the application to initialize the board */
__weak int Board_Init(void)
{
Expand Down Expand Up @@ -142,6 +153,7 @@ __weak void SystemInit(void)
MXC_SYS_ClockDisable(MXC_SYS_PERIPH_CLOCK_TMR2);
MXC_SYS_ClockDisable(MXC_SYS_PERIPH_CLOCK_I2C1);

PinInit();
Board_Init();
}

Expand Down
12 changes: 12 additions & 0 deletions Libraries/CMSIS/Device/Maxim/MAX32662/Source/system_max32662.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,17 @@ __weak int PreInit(void)
return 0;
}

/* This function is called before the Board_Init function. This weak
* implementation does nothing, but you may over-ride this function in your
* program if you want to configure the state of all pins prior to the
* application running. This is useful when using external tools (like a
* Pin Mux configuration tool) that generate code to initialize the pins.
*/
__weak void PinInit(void)
{
/* Do nothing */
}

/* This function can be implemented by the application to initialize the board */
__weak int Board_Init(void)
{
Expand Down Expand Up @@ -161,6 +172,7 @@ __weak void SystemInit(void)
MXC_SYS_Clock_Select(MXC_SYS_CLOCK_IPO);
SystemCoreClockUpdate();

PinInit();
Board_Init();

__enable_irq();
Expand Down
12 changes: 12 additions & 0 deletions Libraries/CMSIS/Device/Maxim/MAX32665/Source/system_max32665.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,17 @@ __weak int PreInit(void)
return 0;
}

/* This function is called before the Board_Init function. This weak
* implementation does nothing, but you may over-ride this function in your
* program if you want to configure the state of all pins prior to the
* application running. This is useful when using external tools (like a
* Pin Mux configuration tool) that generate code to initialize the pins.
*/
__weak void PinInit(void)
{
/* Do nothing */
}

// This function can be implemented by the application to initialize the board
__weak int Board_Init(void)
{
Expand Down Expand Up @@ -191,6 +202,7 @@ __weak void SystemInit(void)
/* Disable fast wakeup due to issues with SIMO in wakeup */
MXC_PWRSEQ->lpcn &= ~MXC_F_PWRSEQ_LPCN_FWKM;

PinInit();
Board_Init();

PalSysInit();
Expand Down
12 changes: 12 additions & 0 deletions Libraries/CMSIS/Device/Maxim/MAX32670/Source/system_max32670.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,17 @@ __weak int PreInit(void)
return 0;
}

/* This function is called before the Board_Init function. This weak
* implementation does nothing, but you may over-ride this function in your
* program if you want to configure the state of all pins prior to the
* application running. This is useful when using external tools (like a
* Pin Mux configuration tool) that generate code to initialize the pins.
*/
__weak void PinInit(void)
{
/* Do nothing */
}

/* This function can be implemented by the application to initialize the board */
__weak int Board_Init(void)
{
Expand Down Expand Up @@ -148,6 +159,7 @@ __weak void SystemInit(void)
MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_GPIO0);
MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_GPIO1);

PinInit();
Board_Init();
}

Expand Down
12 changes: 12 additions & 0 deletions Libraries/CMSIS/Device/Maxim/MAX32672/Source/system_max32672.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ __weak int PreInit(void)
return 0;
}

/* This function is called before the Board_Init function. This weak
* implementation does nothing, but you may over-ride this function in your
* program if you want to configure the state of all pins prior to the
* application running. This is useful when using external tools (like a
* Pin Mux configuration tool) that generate code to initialize the pins.
*/
__weak void PinInit(void)
{
/* Do nothing */
}

/* This function can be implemented by the application to initialize the board */
__weak int Board_Init(void)
{
Expand Down Expand Up @@ -154,5 +165,6 @@ __weak void SystemInit(void)
MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_GPIO0);
MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_GPIO1);

PinInit();
Board_Init();
}
12 changes: 12 additions & 0 deletions Libraries/CMSIS/Device/Maxim/MAX32675/Source/system_max32675.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,17 @@ __weak int PreInit(void)
return 0;
}

/* This function is called before the Board_Init function. This weak
* implementation does nothing, but you may over-ride this function in your
* program if you want to configure the state of all pins prior to the
* application running. This is useful when using external tools (like a
* Pin Mux configuration tool) that generate code to initialize the pins.
*/
__weak void PinInit(void)
{
/* Do nothing */
}

/* This function can be implemented by the application to initialize the board */
__weak int Board_Init(void)
{
Expand Down Expand Up @@ -156,6 +167,7 @@ __weak void SystemInit(void)
MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_GPIO0);
MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_GPIO1);

PinInit();
Board_Init();
}

Expand Down
12 changes: 12 additions & 0 deletions Libraries/CMSIS/Device/Maxim/MAX32680/Source/system_max32680.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,17 @@ __weak int PreInit(void)
return 0;
}

/* This function is called before the Board_Init function. This weak
* implementation does nothing, but you may over-ride this function in your
* program if you want to configure the state of all pins prior to the
* application running. This is useful when using external tools (like a
* Pin Mux configuration tool) that generate code to initialize the pins.
*/
__weak void PinInit(void)
{
/* Do nothing */
}

/* This function can be implemented by the application to initialize the board */
__weak int Board_Init(void)
{
Expand Down Expand Up @@ -143,6 +154,7 @@ __weak void SystemInit(void)
MXC_SYS_SetClockDiv(MXC_SYS_CLOCK_DIV_1);
SystemCoreClockUpdate();

PinInit();
Board_Init();

PalSysInit();
Expand Down
12 changes: 12 additions & 0 deletions Libraries/CMSIS/Device/Maxim/MAX32690/Source/system_max32690.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,17 @@ __weak int PreInit(void)
return 0;
}

/* This function is called before the Board_Init function. This weak
* implementation does nothing, but you may over-ride this function in your
* program if you want to configure the state of all pins prior to the
* application running. This is useful when using external tools (like a
* Pin Mux configuration tool) that generate code to initialize the pins.
*/
__weak void PinInit(void)
{
/* Do nothing */
}

/* This function can be implemented by the application to initialize the board */
__weak int Board_Init(void)
{
Expand Down Expand Up @@ -150,6 +161,7 @@ __weak void SystemInit(void)

PalSysInit();

PinInit();
Board_Init();

__enable_irq();
Expand Down
12 changes: 12 additions & 0 deletions Libraries/CMSIS/Device/Maxim/MAX78000/Source/system_max78000.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@ __weak int PreInit(void)
return 0;
}

/* This function is called before the Board_Init function. This weak
* implementation does nothing, but you may over-ride this function in your
* program if you want to configure the state of all pins prior to the
* application running. This is useful when using external tools (like a
* Pin Mux configuration tool) that generate code to initialize the pins.
*/
__weak void PinInit(void)
{
/* Do nothing */
}

/* This function can be implemented by the application to initialize the board */
__weak int Board_Init(void)
{
Expand Down Expand Up @@ -131,5 +142,6 @@ __weak void SystemInit(void)

SystemCoreClockUpdate();

PinInit();
Board_Init();
}
12 changes: 12 additions & 0 deletions Libraries/CMSIS/Device/Maxim/MAX78002/Source/system_max78002.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,17 @@ __weak int PreInit(void)
return 0;
}

/* This function is called before the Board_Init function. This weak
* implementation does nothing, but you may over-ride this function in your
* program if you want to configure the state of all pins prior to the
* application running. This is useful when using external tools (like a
* Pin Mux configuration tool) that generate code to initialize the pins.
*/
__weak void PinInit(void)
{
/* Do nothing */
}

/* This function can be implemented by the application to initialize the board */
__weak int Board_Init(void)
{
Expand Down Expand Up @@ -133,5 +144,6 @@ __weak void SystemInit(void)

SystemCoreClockUpdate();

PinInit();
Board_Init();
}
Loading

0 comments on commit b87895f

Please sign in to comment.