The foxBMS secondary mcu API documentation
io_package_cfg.h File Reference

configuration header of the io-module More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IO_NR_OF_PINS_PER_PORT   16
 
#define IO_PACKAGE_LQFP100
 

Enumerations

enum  IO_PORTS_e {
  IO_PA_0 = 0, IO_PA_1 = 1, IO_PA_2 = 2, IO_PA_3 = 3,
  IO_PA_4 = 4, IO_PA_5 = 5, IO_PA_6 = 6, IO_PA_7 = 7,
  IO_PA_8 = 8, IO_PA_9 = 9, IO_PA_10 = 10, IO_PA_11 = 11,
  IO_PA_12 = 12, IO_PA_13 = 13, IO_PA_14 = 14, IO_PA_15 = 15,
  IO_PB_0 = 16, IO_PB_1 = 17, IO_PB_2 = 18, IO_PB_3 = 19,
  IO_PB_4 = 20, IO_PB_5 = 21, IO_PB_6 = 22, IO_PB_7 = 23,
  IO_PB_8 = 24, IO_PB_9 = 25, IO_PB_10 = 26, IO_PB_11 = 27,
  IO_PB_12 = 28, IO_PB_13 = 29, IO_PB_14 = 30, IO_PB_15 = 31,
  IO_PC_0 = 32, IO_PC_1 = 33, IO_PC_2 = 34, IO_PC_3 = 35,
  IO_PC_4 = 36, IO_PC_5 = 37, IO_PC_6 = 38, IO_PC_7 = 39,
  IO_PC_8 = 40, IO_PC_9 = 41, IO_PC_10 = 42, IO_PC_11 = 43,
  IO_PC_12 = 44, IO_PC_13 = 45, IO_PC_14 = 46, IO_PC_15 = 47,
  IO_PD_0 = 48, IO_PD_1 = 49, IO_PD_2 = 50, IO_PD_3 = 51,
  IO_PD_4 = 52, IO_PD_5 = 53, IO_PD_6 = 54, IO_PD_7 = 55,
  IO_PD_8 = 56, IO_PD_9 = 57, IO_PD_10 = 58, IO_PD_11 = 59,
  IO_PD_12 = 60, IO_PD_13 = 61, IO_PD_14 = 62, IO_PD_15 = 63,
  IO_PE_0 = 64, IO_PE_1 = 65, IO_PE_2 = 66, IO_PE_3 = 67,
  IO_PE_4 = 68, IO_PE_5 = 69, IO_PE_6 = 70, IO_PE_7 = 71,
  IO_PE_8 = 72, IO_PE_9 = 73, IO_PE_10 = 74, IO_PE_11 = 75,
  IO_PE_12 = 76, IO_PE_13 = 77, IO_PE_14 = 78, IO_PE_15 = 79
}
 

Detailed Description

configuration header of the io-module

BSD 3-Clause License Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

We kindly request you to use one or more of the following phrases to refer to foxBMS in your hardware, software, documentation or advertising materials:

″This product uses parts of foxBMS®″

″This product includes parts of foxBMS®″

″This product is derived from foxBMS®″

Author
foxBMS Team
Date
07.10.2015 (date of creation)
Module-prefix IO

Configuration of the GPIOs

The io_package_cfg.h assigns a name of each GPIO available on the specific package to a unique, ascending number starting 0, e.g. the first pin at the port A gets the name IO_PA_0 = 0, the second IO_PA_1 = 1, ... With this unique number for each pin it is possible to calculate from every pin name the corresponding port (by integer division) and corresponding pin (by modulo division).

Enumeration Type Documentation

◆ IO_PORTS_e

enum IO_PORTS_e

symbolic names of the pins at the microcontroller

Enumerator
IO_PA_0 

Port A, Pin 0

IO_PA_1 

Port A, Pin 1

IO_PA_2 

Port A, Pin 2

IO_PA_3 

Port A, Pin 3

IO_PA_4 

Port A, Pin 4

IO_PA_5 

Port A, Pin 5

IO_PA_6 

Port A, Pin 6

IO_PA_7 

Port A, Pin 7

IO_PA_8 

Port A, Pin 8

IO_PA_9 

Port A, Pin 9

IO_PA_10 

Port A, Pin 10

IO_PA_11 

Port A, Pin 11

IO_PA_12 

Port A, Pin 12

IO_PA_13 

Port A, Pin 13

IO_PA_14 

Port A, Pin 14

IO_PA_15 

Port A, Pin 15

IO_PB_0 

Port B, Pin 0

IO_PB_1 

Port B, Pin 1

IO_PB_2 

Port B, Pin 2

IO_PB_3 

Port B, Pin 3

IO_PB_4 

Port B, Pin 4

IO_PB_5 

Port B, Pin 5

IO_PB_6 

Port B, Pin 6

IO_PB_7 

Port B, Pin 7

IO_PB_8 

Port B, Pin 8

IO_PB_9 

Port B, Pin 9

IO_PB_10 

Port B, Pin 10

IO_PB_11 

Port B, Pin 11

IO_PB_12 

Port B, Pin 12

IO_PB_13 

Port B, Pin 13

IO_PB_14 

Port B, Pin 14

IO_PB_15 

Port B, Pin 15

IO_PC_0 

Port C, Pin 0

IO_PC_1 

Port C, Pin 1

IO_PC_2 

Port C, Pin 2

IO_PC_3 

Port C, Pin 3

IO_PC_4 

Port C, Pin 4

IO_PC_5 

Port C, Pin 5

IO_PC_6 

Port C, Pin 6

IO_PC_7 

Port C, Pin 7

IO_PC_8 

Port C, Pin 8

IO_PC_9 

Port C, Pin 9

IO_PC_10 

Port C, Pin 10

IO_PC_11 

Port C, Pin 11

IO_PC_12 

Port C, Pin 12

IO_PC_13 

Port C, Pin 13

IO_PC_14 

Port C, Pin 14

IO_PC_15 

Port C, Pin 15

IO_PD_0 

Port D, Pin 0

IO_PD_1 

Port D, Pin 1

IO_PD_2 

Port D, Pin 2

IO_PD_3 

Port D, Pin 3

IO_PD_4 

Port D, Pin 4

IO_PD_5 

Port D, Pin 5

IO_PD_6 

Port D, Pin 6

IO_PD_7 

Port D, Pin 7

IO_PD_8 

Port D, Pin 8

IO_PD_9 

Port D, Pin 9

IO_PD_10 

Port D, Pin 10

IO_PD_11 

Port D, Pin 11

IO_PD_12 

Port D, Pin 12

IO_PD_13 

Port D, Pin 13

IO_PD_14 

Port D, Pin 14

IO_PD_15 

Port D, Pin 15

IO_PE_0 

Port E, Pin 0

IO_PE_1 

Port E, Pin 1

IO_PE_2 

Port E, Pin 2

IO_PE_3 

Port E, Pin 3

IO_PE_4 

Port E, Pin 4

IO_PE_5 

Port E, Pin 5

IO_PE_6 

Port E, Pin 6

IO_PE_7 

Port E, Pin 7

IO_PE_8 

Port E, Pin 8

IO_PE_9 

Port E, Pin 9

IO_PE_10 

Port E, Pin 10

IO_PE_11 

Port E, Pin 11

IO_PE_12 

Port E, Pin 12

IO_PE_13 

Port E, Pin 13

IO_PE_14 

Port E, Pin 14

IO_PE_15 

Port E, Pin 15