GM6000 Digital Heater Controller Branch: main
SDX-1330
Macros
Api.h File Reference

Detailed Description

This BSP is developed/build with a 'just-in-time' approach.

This means as functional is added to the BSP incrementally as there is 'client' need for. This BSP does not claim to provide full/complete functional and/or APIs for everything the board supports.

DO NOT include this file directly! Instead include the generic BSP interface - src/Bsp/Api.h - and then configure your project's 'colony_map.h' to include THIS file.


#include "colony_config.h"
#include "Bsp/Initech/alpha1/MX/Core/Inc/main.h"
#include "Bsp/Initech/alpha1/MX/Core/Inc/usart.h"
#include "Bsp/Initech/alpha1/MX/Core/Inc/tim.h"
#include "Bsp/Initech/alpha1/MX/Core/Inc/spi.h"
#include "Bsp/Initech/alpha1/MX/Core/Inc/i2c.h"
#include "Bsp/Initech/alpha1/MX/Core/Inc/adc.h"
Include dependency graph for Api.h:

Go to the source code of this file.

Macros

#define BSP_I2C_ADDRESS_EEPROM   0x50
 BOARD Specific APIs.
 
#define BSP_I2C_HANDLE   &hi2c2
 I2C Bus handle.
 
#define Bsp_NVIC_disableIRQ(irqNum)   do { HAL_NVIC_DisableIRQ(irqNum); __DSB(); __ISB(); } while(0)
 ARM Specific APIs.
 
#define Bsp_NVIC_enableIRQ(irqNum)   do { HAL_NVIC_EnableIRQ(irqNum); __DSB(); __ISB(); } while(0)
 Enable a specific interrupt (with memory barrier protection)
 
#define Bsp_Api_reset_MCU()   NVIC_SystemReset()
 Resets the MCU.
 
#define Bsp_Api_nop_MAP()   __asm("nop")
 Generic APIs.
 
#define Bsp_Api_disableIrqs_MAP()   __disable_irq()
 Generic API.
 
#define Bsp_Api_enableIrqs_MAP()   do { __enable_irq(); __ISB(); } while(0)
 Generic API (with memory barrier protection)
 
#define Bsp_Api_pushAndDisableIrqs_MAP()   Bsp_Api_disableIrqs_MAP()
 Generic API.
 
#define Bsp_Api_popIrqs_MAP()   Bsp_Api_enableIrqs_MAP()
 Generic API.
 
#define Bsp_Api_turnOn_debug1_MAP()   HAL_GPIO_WritePin( LD1_GPIO_Port, LD1_Pin, GPIO_PIN_SET )
 Generic API.
 
#define Bsp_Api_turnOff_debug1_MAP()   HAL_GPIO_WritePin( LD1_GPIO_Port, LD1_Pin, GPIO_PIN_RESET )
 Generic API.
 
#define Bsp_Api_toggle_debug1_MAP()   HAL_GPIO_TogglePin( LD1_GPIO_Port, LD1_Pin )
 Generic API.
 
#define Bsp_Api_turnOn_debug2_MAP()   HAL_GPIO_WritePin( LD2_GPIO_Port, LD2_Pin, GPIO_PIN_SET )
 Generic API.
 
#define Bsp_Api_turnOff_debug2_MAP()   HAL_GPIO_WritePin( LD2_GPIO_Port, LD2_Pin, GPIO_PIN_RESET )
 Generic API.
 
#define Bsp_Api_toggle_debug2_MAP()   HAL_GPIO_TogglePin( LD2_GPIO_Port, LD2_Pin )
 Generic API.
 
#define Bsp_yieldOnExit(r)   portYIELD_FROM_ISR(r)
 FreeRTOS specific APIs.
 

Macro Definition Documentation

◆ Bsp_Api_disableIrqs_MAP

#define Bsp_Api_disableIrqs_MAP (   void)    __disable_irq()

Generic API.

◆ Bsp_Api_enableIrqs_MAP

#define Bsp_Api_enableIrqs_MAP (   void)    do { __enable_irq(); __ISB(); } while(0)

Generic API (with memory barrier protection)

◆ Bsp_Api_nop_MAP

#define Bsp_Api_nop_MAP (   void)    __asm("nop")

Generic APIs.

Generic API

◆ Bsp_Api_popIrqs_MAP

#define Bsp_Api_popIrqs_MAP (   void)    Bsp_Api_enableIrqs_MAP()

Generic API.

◆ Bsp_Api_pushAndDisableIrqs_MAP

#define Bsp_Api_pushAndDisableIrqs_MAP (   void)    Bsp_Api_disableIrqs_MAP()

Generic API.

◆ Bsp_Api_reset_MCU

#define Bsp_Api_reset_MCU ( )    NVIC_SystemReset()

Resets the MCU.

◆ Bsp_Api_toggle_debug1_MAP

#define Bsp_Api_toggle_debug1_MAP ( )    HAL_GPIO_TogglePin( LD1_GPIO_Port, LD1_Pin )

Generic API.

◆ Bsp_Api_toggle_debug2_MAP

#define Bsp_Api_toggle_debug2_MAP ( )    HAL_GPIO_TogglePin( LD2_GPIO_Port, LD2_Pin )

Generic API.

◆ Bsp_Api_turnOff_debug1_MAP

#define Bsp_Api_turnOff_debug1_MAP ( )    HAL_GPIO_WritePin( LD1_GPIO_Port, LD1_Pin, GPIO_PIN_RESET )

Generic API.

◆ Bsp_Api_turnOff_debug2_MAP

#define Bsp_Api_turnOff_debug2_MAP ( )    HAL_GPIO_WritePin( LD2_GPIO_Port, LD2_Pin, GPIO_PIN_RESET )

Generic API.

◆ Bsp_Api_turnOn_debug1_MAP

#define Bsp_Api_turnOn_debug1_MAP ( )    HAL_GPIO_WritePin( LD1_GPIO_Port, LD1_Pin, GPIO_PIN_SET )

Generic API.

◆ Bsp_Api_turnOn_debug2_MAP

#define Bsp_Api_turnOn_debug2_MAP ( )    HAL_GPIO_WritePin( LD2_GPIO_Port, LD2_Pin, GPIO_PIN_SET )

Generic API.

◆ BSP_I2C_ADDRESS_EEPROM

#define BSP_I2C_ADDRESS_EEPROM   0x50

BOARD Specific APIs.

7bit address for the offboard EEPROM

◆ BSP_I2C_HANDLE

#define BSP_I2C_HANDLE   &hi2c2

I2C Bus handle.

◆ Bsp_NVIC_disableIRQ

#define Bsp_NVIC_disableIRQ (   irqNum)    do { HAL_NVIC_DisableIRQ(irqNum); __DSB(); __ISB(); } while(0)

ARM Specific APIs.

Disable a specific interrupt (with memory barrier protection)

◆ Bsp_NVIC_enableIRQ

#define Bsp_NVIC_enableIRQ (   irqNum)    do { HAL_NVIC_EnableIRQ(irqNum); __DSB(); __ISB(); } while(0)

Enable a specific interrupt (with memory barrier protection)

◆ Bsp_yieldOnExit

#define Bsp_yieldOnExit (   r)    portYIELD_FROM_ISR(r)

FreeRTOS specific APIs.

This method informs the schedule that a context switch is required on exit from the ISR. The 'r' argument is the result for the su_signal() call.