MSPM0G3519SensoredFOCMotorControlLibrary  1.0
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
hal.h File Reference

Detailed Description

Hall Sensored Trap Motor Control Library HAL Module.


#include "ti_msp_dl_config.h"
#include <ti/iqmath/include/IQmathLib.h>
Include dependency graph for hal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  HAL_GPIO_Instance_
 Defines a GPIO instance. More...
 
struct  HAL_Timer_Instance_
 Defines a timer instance. More...
 

Macros

#define HAL_SYSTEM_FREQ_MHZ   ((int32_t)80)
 Defines the system clock frequency, MHz.
 
#define HAL_CAPTURE_TIMER_FREQ   ((int32_t)100000)
 Defines the input capture timer frequency in Hz.
 

Typedefs

typedef struct HAL_GPIO_Instance_ HAL_GPIO_Instance
 Defines a GPIO instance.
 
typedef struct HAL_Timer_Instance_ HAL_Timer_Instance
 Defines a timer instance.
 

Enumerations

enum  HAL_GPIO_STATE {
  HAL_GPIO_PIN_LOW = 0,
  HAL_GPIO_PIN_HIGH
}
 HAL_GPIO_STATE. More...
 
enum  HAL_GPIO_IN {
  HAL_GPIO_IN_01 = 0,
  HAL_GPIO_IN_02,
  HAL_GPIO_IN_03,
  HAL_GPIO_IN_04,
  HAL_GPIO_IN_MAX
}
 HAL_GPIO_IN. More...
 
enum  HAL_CAPTURE_TIMER {
  HAL_CAPTURE_TIMER_01 = 0,
  HAL_CAPTURE_TIMER_02 = 1,
  HAL_CAPTURE_TIMER_MAX
}
 

Functions

void HAL_init ()
 Initializes the hal object. More...
 
void HAL_enableGPIOInterrupt (HAL_GPIO_IN pin)
 Enables GPIO interrupts. More...
 
uint32_t HAL_getCaptureFrequency (HAL_CAPTURE_TIMER capture)
 Calculates the capture frequency. More...
 
uint32_t HAL_getCaptureValue (HAL_CAPTURE_TIMER capture)
 Capture the Timer Value. More...
 
uint32_t HAL_getCaptureRunningValue (HAL_CAPTURE_TIMER capture)
 Capture the Timer Running Value. More...
 
__STATIC_INLINE void HAL_delayMicroSeconds (uint32_t microSeconds)
 Delays for specific time in microseconds. More...
 
__STATIC_INLINE uint32_t HAL_getTimerLoadValue (HAL_CAPTURE_TIMER capture)
 Timer Period Value. More...
 
__STATIC_INLINE bool HAL_readGPIOPin (HAL_GPIO_IN pin)
 Reads a GPIOpin. More...
 

Variables

HAL_GPIO_Instance gpioInputPin [HAL_GPIO_IN_MAX]
 Array for storing the input GPIO pin instances.
 
HAL_Timer_Instance inputCapture [HAL_CAPTURE_TIMER_MAX]
 Array to store the capture instances.
 
© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale