50 #ifndef bsm_lp_mpsm0c1106_hal_h 51 #define bsm_lp_mpsm0c1106_hal_h 53 #include "ti_msp_dl_config.h" 54 #include <ti/iqmath/include/IQmathLib.h> 63 #define HIGH (PIN_MODE_OUTPUT_HIGH) 68 #define LOW (PIN_MODE_OUTPUT_LOW) GPIO_INPUT_PINS
Definition: hal.h:153
PWM_CHANNELS
Channels described here simply references individual PWM output pins. This means a micro-controller c...
Definition: hal.h:97
bool HAL_readGPIOInput(GPIO_INPUT_PINS pin)
Read GPIO input pin value.
Definition: hal.c:220
void HAL_configurePWMPin(PWM_CHANNELS pwmChan, PIN_MODE mode)
Sets the PWM pin to specified pin mode.
Definition: hal.c:198
SPI_CS
The chip select number here has no relationship with the physical chip select that the SPI peripheral...
Definition: hal.h:123
_iq20 HAL_getIQ20VoltageFromADC(ADC_CHANS adcChan)
Returns the voltage in mV in IQ20 format read from the specified ADC channel Important This function ...
Definition: hal.c:346
void HAL_writeSPI16withTimeout(SPI_CHANNELS spi_chan, SPI_CS cs_chan, uint16_t data, int32_t timeout)
Performs a 16-bit SPI write with timeout.
Definition: hal.c:297
uint8_t HAL_readSPI8withTimeout(SPI_CHANNELS spi_chan, SPI_CS cs_chan, uint32_t timeout)
Performs a 8-bit SPI read with timeout.
Definition: hal.c:285
void HAL_setPWMFreq(PWM_CHANNELS pwmChan, uint32_t targetFreq)
Sets the PWM frequency for a specific channel.
Definition: hal.c:161
uint16_t HAL_getRawADCValue(ADC_CHANS adcChan)
Return the latest raw ADC value from the specified ADC channel.
Definition: hal.c:337
GPIO_OUTPUT_PINS
Definition: hal.h:137
void HAL_writeSPI8withTimeout(SPI_CHANNELS spi_chan, SPI_CS cs_chan, uint8_t data, uint32_t timeout)
Performs a 8-bit SPI write with timeout.
Definition: hal.c:273
SPI_CHANNELS
Channels described usually references individual SPI peripheral instances ie ( SCLK, PICO and POCI).
Definition: hal.h:110
ADC_CHANS
Definition: hal.h:161
void HAL_setGPIOOutput(GPIO_OUTPUT_PINS pin, PIN_MODE mode)
Set output pin's value.
Definition: hal.c:210
uint16_t HAL_readSPI16withTimeout(SPI_CHANNELS spi_chan, SPI_CS cs_chan, int32_t timeout)
Performs a 16-bit SPI write with timeout.
Definition: hal.c:309
void HAL_setADCRefVoltage(ADC_CHANS adcChan, uint16_t voltage_mV)
Set the reference voltage that specified ADC channel is using. The software doesn't know what referen...
Definition: hal.c:334
PIN_MODE
Definition: hal.h:71
DL_ADC12_IIDX HAL_processADCIRQ(ADC12_Regs *adcInst)
Function to process ADC interrupts and read converted ADC values. Should only be used in ADC irqs...
Definition: hal.c:360
void HAL_setDutyCycle(PWM_CHANNELS pwmChan, uint8_t targetDutyCycle)
Sets the PWM duty cycle for a specific channel.
Definition: hal.c:256
void HAL_delayMicroSeconds(uint32_t num_us)
Delay function in microseconds.
Definition: hal.c:320
void HAL_Init()
Function called to run initialization code needed by the HAL.
Definition: hal.c:152
void HAL_delayMilliSeconds(uint32_t num_us)
Delay function in milliseconds.
Definition: hal.c:327
uint32_t HAL_getmVfromADC(ADC_CHANS adcChan)
Returns the voltage in mV read from the specified ADC channel. Important This function depends on the...
Definition: hal.c:341