6 Host Interface Management
The PL360 Host Controller services are divided in two categories: synchronous and asynchronous services. Refer to PLC Event Handling.
Most of the services implemented by the PL360 Host Controller are asynchronous.
The synchronous service is only used in the get_config function in order to get specific internal parameters relative to the communication stack.
When a function from the API is called, a sequence of actions is activated to format the request and to arrange to transfer it to the PL360 device through the SPI protocol.
When an asynchronous event occurs, the PL360 Host Controller handles the PLC interrupt, checks the events reported by the PL360 device and extracts the information relative to the notified event.
The associated callback will be invoked in the next call to the atpl360_handle_events function.