1
0
mirror of https://github.com/xtacocorex/CHIP_IO synced 2025-07-20 12:53:22 +00:00

finished overlaymanager api docs

This commit is contained in:
Robert Wolterman
2017-07-04 17:03:44 -05:00
parent 71923f5739
commit a6111d8245

View File

@ -5,6 +5,8 @@ Import the OverlayManager module as follows
import CHIP_IO.OverlayManager as OM import CHIP_IO.OverlayManager as OM
``` ```
This module requires NTC's [CHIP-dt-overlays](https://github.com/NextThingCo/CHIP-dt-overlays) to be loaded.
### toggle_debug() ### toggle_debug()
Enable/Disable the Debug Enable/Disable the Debug
@ -22,6 +24,45 @@ Enable/Disable the Debug
OM.toggle_debug() OM.toggle_debug()
``` ```
### load(overlay, path="")
Loads the overlay specified. PWM0 is not available on the CHIP Pro due to the base DTS supporting both PWM0 and PWM1
* Parameters
overlay - Overlay to be loaded: SPI2, PWM0, CUST
path (optional) - Path to the custom compiled overlay
* Returns
integer - 0: Success, 1: Fail, 2: Overlay already loaded
* Examples
```python
resp = OM.load("SPI2")
resp = OM.load("PWM0")
resp = OM.load("CUST","path/to/custom.dtbo")
```
### unload(overlay)
Unloads the overlay specified. PWM0 is not available on the CHIP Pro due to the base DTS supporting both PWM0 and PWM1
* Parameters
overlay - Overlay to be loaded: SPI2, PWM0, CUST
* Returns
None
* Examples
```python
resp = OM.unload("SPI2")
resp = OM.unload("PWM0")
resp = OM.unload("CUST")
```
### get_spi_loaded() ### get_spi_loaded()
Check to see if the SPI DTBO is loaded Check to see if the SPI DTBO is loaded