From a6111d82452a074f48fa8d16e011afbf8a645387 Mon Sep 17 00:00:00 2001 From: Robert Wolterman Date: Tue, 4 Jul 2017 17:03:44 -0500 Subject: [PATCH] finished overlaymanager api docs --- docs/overlaymanager.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/docs/overlaymanager.md b/docs/overlaymanager.md index 0b6712e..a452971 100644 --- a/docs/overlaymanager.md +++ b/docs/overlaymanager.md @@ -5,6 +5,8 @@ Import the OverlayManager module as follows 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() Enable/Disable the Debug @@ -22,6 +24,45 @@ Enable/Disable the 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() Check to see if the SPI DTBO is loaded