Hardware Abstraction Layer (HAL)

On CAT1 devices, the KeyScan peripheral is clocked from the shared source CLK_MF.

If NULL is passed for the clk argument to cyhal_keyscan_init, the KeyScan HAL will automatically reserve and enable CLK_MF. If the KeyScan driver needs to be used in combination with another driver that also requires CLK_MF, use the Clock driver to initialize CLK_MF, then pass the resulting cyhal_clock_t value to cyhal_keyscan_init and any other HAL driver that needs to share this clock.