Using HAL in Your Libraries
This page describes the recommended way to implement libraries that utilize HAL functionality.
An example of the GPIO HAL being used by a driver for a UART bitbanger that programs the start bit, data bits, and stop bit can be seen in hw/drivers/uart/uart_bitbang/src/uart_bitbang.c
An example of the flash HAL being used by a file sytem can be seen in fs/nffs/src/nffs_flash.c.