Looking at the CMSIS driver API of UART(for example), the driver is defined using a struct that holds function pointers to functions that implement the driver functionality: