The foxBMS secondary mcu API documentation
IO User configuration

Macros

#define IO_NR_OF_PINS_PER_PORT   16
 
#define IO_PACKAGE_LQFP100
 

Enumerations

enum  IO_PIN_MODES_e {
  IO_MODE_INPUT = GPIO_MODE_INPUT, IO_MODE_OUTPUT_PP = GPIO_MODE_OUTPUT_PP, IO_MODE_OUTPUT_OD = GPIO_MODE_OUTPUT_OD, IO_MODE_AF_PP = GPIO_MODE_AF_PP,
  IO_MODE_AF_OD = GPIO_MODE_AF_OD, IO_MODE_ANALOG = GPIO_MODE_ANALOG, IO_MODE_IT_RISING = GPIO_MODE_IT_RISING, IO_MODE_IT_FALLING = GPIO_MODE_IT_FALLING,
  IO_MODE_IT_RISING_FALLING = GPIO_MODE_IT_RISING_FALLING, IO_MODE_EVT_RISING = GPIO_MODE_EVT_RISING, IO_MODE_EVT_FALLLING = GPIO_MODE_EVT_FALLING, IO_MODE_EVT_RISING_FALLING = GPIO_MODE_EVT_RISING_FALLING
}
 

Detailed Description

Contains the configuration of the GPIO pins contained in the MCU.

Macro Definition Documentation

◆ IO_NR_OF_PINS_PER_PORT

#define IO_NR_OF_PINS_PER_PORT   16

Nr. of pins per port must always be set to 16

Type:
int
Default:
16 Number of pins per port at the microcontroller. This number is fixed.

◆ IO_PACKAGE_LQFP100

#define IO_PACKAGE_LQFP100

specify the type of microcontroller used

Type:
switch (3)
Default:
2 Defines the used microcontroller package. The user can choose between
  • IO_PACKAGE_LQFP100
  • IO_PACKAGE_LQFP144
  • IO_PACKAGE_LQFP176

Enumeration Type Documentation

◆ IO_PIN_MODES_e

description if port locking is enabled, one can specify in the io_cfg[] array each pin configuration as locked/unlocked.

Type:
toggle
Default:
True Enables pin locking globally. If this macro is not defined, pin locking can not be activated. symbolic names for possible modes of the pins
Enumerator
IO_MODE_INPUT 

The pin is used as input

IO_MODE_OUTPUT_PP 

The pin is used as output with push-pull

IO_MODE_OUTPUT_OD 

The pin is used as output with open-drain

IO_MODE_AF_PP 

The pin is used as alternate function with push-pull

IO_MODE_AF_OD 

The pin is used as alternate function with open-drain

IO_MODE_ANALOG 

The pin is used as analog pin

IO_MODE_IT_RISING 

The pin is used as interrupt at rising edge

IO_MODE_IT_FALLING 

The pin is used as interrupt at falling edge

IO_MODE_IT_RISING_FALLING 

The pin is used as interrupt at rising/falling edge

IO_MODE_EVT_RISING 

The pin is used as event mode at rising edge

IO_MODE_EVT_FALLLING 

The pin is used as event mode at falling edge

IO_MODE_EVT_RISING_FALLING 

The pin is used as event mode at rising/falling edge