9 years, 6 months ago.

Finding the port name for use in PortOut object for the FRDMKL25z board:

Hello

I am trying to find the name for the port to use. The example uses: PortOut ledport(Port1, LED_MASK) but this is for a different board.

These must be defined, possibly in a header file somewhere so there should I be looking?

I am using GPIO_PORTD and assume that mbed deals with the configuration so I need to use GPIO_PORTD_DATA_R register. I suppose I could use a pointer and define my own name but would like to use the name used by mbed.

Peter

Question relating to:

The FRDM-KL25Z is an ultra-low-cost development platform for Kinetis L Series KL1x (KL14/15) and KL2x (KL24/25) MCUs built on ARM® Cortex™-M0+ processor. Features include easy access to MCU I/O, battery-ready, …

1 Answer

9 years, 6 months ago.

Hi,

are you looking for PortName ? which is defined in the hal layer for each board. An example from KL25Z board:

typedef enum {
    PortA = 0,
    PortB = 1,
    PortC = 2,
    PortD = 3,
    PortE = 4
} PortName;