99 lines
2.3 KiB
C
99 lines
2.3 KiB
C
/*
|
|
* ti_msp_config.c
|
|
*
|
|
* Created on: 29-Feb-2024
|
|
* Author: saara
|
|
*/
|
|
|
|
#include "ti_msp_config.h"
|
|
/*
|
|
* ======== SYSCFG_DL_init ========
|
|
* Perform any initialization needed before using any board APIs
|
|
*/
|
|
|
|
|
|
SYSCONFIG_WEAK void DL_initPower(void)
|
|
{
|
|
DL_GPIO_reset(GPIOA);
|
|
DL_GPIO_reset(GPIOB);
|
|
|
|
|
|
DL_GPIO_enablePower(GPIOA);
|
|
DL_GPIO_enablePower(GPIOB);
|
|
|
|
delay_cycles(POWER_STARTUP_DELAY);
|
|
}
|
|
|
|
SYSCONFIG_WEAK void DL_GPIO_init(void)
|
|
{
|
|
|
|
DL_GPIO_initDigitalOutput(GPIO_LCD_B_PIN_0_IOMUX);
|
|
|
|
DL_GPIO_initDigitalOutput(GPIO_LCD_B_PIN_1_IOMUX);
|
|
|
|
DL_GPIO_initDigitalOutput(GPIO_LCD_B_PIN_2_IOMUX);
|
|
|
|
DL_GPIO_initDigitalOutput(GPIO_LCD_B_PIN_RS_IOMUX);
|
|
|
|
DL_GPIO_initDigitalOutput(GPIO_LCD_B_PIN_EN_IOMUX);
|
|
|
|
DL_GPIO_initDigitalOutput(GPIO_LCD_B_PIN_RW_IOMUX);
|
|
|
|
DL_GPIO_initDigitalOutput(GPIO_LCD_A_PIN_DB4_IOMUX);
|
|
|
|
DL_GPIO_initDigitalOutput(GPIO_LCD_A_PIN_DB5_IOMUX);
|
|
|
|
DL_GPIO_initDigitalOutput(GPIO_LCD_A_PIN_DB6_IOMUX);
|
|
|
|
DL_GPIO_initDigitalOutput(GPIO_LCD_A_PIN_DB7_IOMUX);
|
|
|
|
DL_GPIO_clearPins(GPIO_LCD_A_PORT, GPIO_LCD_A_PIN_DB4_PIN |
|
|
GPIO_LCD_A_PIN_DB5_PIN |
|
|
GPIO_LCD_A_PIN_DB6_PIN |
|
|
GPIO_LCD_A_PIN_DB7_PIN);
|
|
DL_GPIO_enableOutput(GPIO_LCD_A_PORT, GPIO_LCD_A_PIN_DB4_PIN |
|
|
GPIO_LCD_A_PIN_DB5_PIN |
|
|
GPIO_LCD_A_PIN_DB6_PIN |
|
|
GPIO_LCD_A_PIN_DB7_PIN);
|
|
DL_GPIO_clearPins(GPIO_LCD_B_PORT, GPIO_LCD_B_PIN_0_PIN |
|
|
GPIO_LCD_B_PIN_1_PIN |
|
|
GPIO_LCD_B_PIN_2_PIN |
|
|
GPIO_LCD_B_PIN_RS_PIN |
|
|
GPIO_LCD_B_PIN_EN_PIN |
|
|
GPIO_LCD_B_PIN_RW_PIN);
|
|
DL_GPIO_enableOutput(GPIO_LCD_B_PORT, GPIO_LCD_B_PIN_0_PIN |
|
|
GPIO_LCD_B_PIN_1_PIN |
|
|
GPIO_LCD_B_PIN_2_PIN |
|
|
GPIO_LCD_B_PIN_RS_PIN |
|
|
GPIO_LCD_B_PIN_EN_PIN |
|
|
GPIO_LCD_B_PIN_RW_PIN);
|
|
|
|
}
|
|
|
|
|
|
|
|
SYSCONFIG_WEAK void DL_SYSCTL_init(void)
|
|
{
|
|
|
|
//Low Power Mode is configured to be SLEEP0
|
|
DL_SYSCTL_setBORThreshold(DL_SYSCTL_BOR_THRESHOLD_LEVEL_0);
|
|
|
|
DL_SYSCTL_setSYSOSCFreq(DL_SYSCTL_SYSOSC_FREQ_BASE);
|
|
/* Set default configuration */
|
|
DL_SYSCTL_disableHFXT();
|
|
DL_SYSCTL_disableSYSPLL();
|
|
|
|
}
|
|
|
|
SYSCONFIG_WEAK void DL_init(void)
|
|
{
|
|
DL_initPower();
|
|
DL_GPIO_init();
|
|
/* Module-Specific Initializations*/
|
|
// SYSCFG_DL_SYSCTL_init();
|
|
//SYSCFG_DL_SYSTICK_init();
|
|
}
|
|
|
|
|
|
|