Hi
The KEA128 doesn't have an RTS line, which is used to control the RS485 direction, and it is therefore necessary to use a general purpose IO instead. Since there is no pre-defined output for such operation you need to add macros to suit the board in question.
You can use the FRDM_KL02Z configuration as reference, where the following set of macros is included in app_hw_kinetis.h:
// RTS control via GPIO output
//
#define RTS_0_LINE PORTB_BIT0
#define _CONFIGURE_RTS_0_HIGH() _CONFIG_DRIVE_PORT_OUTPUT_VALUE(B, (RTS_0_LINE), (RTS_0_LINE), (PORT_SRE_SLOW | PORT_DSE_HIGH))
#define _CONFIGURE_RTS_0_LOW() _CONFIG_DRIVE_PORT_OUTPUT_VALUE(B, (RTS_0_LINE), (0), (PORT_SRE_SLOW | PORT_DSE_HIGH))
#define _SET_RTS_0_HIGH() _SETBITS(B, RTS_0_LINE)
#define _SET_RTS_0_LOW() _CLEARBITS(B, RTS_0_LINE)
This can be performed for each available UART to allow each to control its own RTS output.
In case there is no need for an output on a particular UART, dummy macros can be added - for example
#define _CONFIGURE_RTS_1_HIGH()
#define _CONFIGURE_RTS_1_LOW()
#define _SET_RTS_1_HIGH()
#define _SET_RTS_1_LOW()
Regards
Mark