Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
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:
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;