mirror of
https://github.com/sascha-hemi/pycom-documentation.git
synced 2026-03-21 07:06:20 +01:00
included pygate reference api
This commit is contained in:
@@ -45,3 +45,5 @@ The Pygate features a single cell Li-Ion/Li-Po charger. When the board is being
|
||||
|
||||
* If PIC stays in bootloader mode, the [`dfu-util` update](/pytrackpysense/installation/firmware) should be performed
|
||||
|
||||
* If `machine.callback()` gives an error, update your -py device with the `pygate` firmware.
|
||||
|
||||
|
||||
39
content/firmwareapi/pycom/machine/pygate.md
Normal file
39
content/firmwareapi/pycom/machine/pygate.md
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: "Pygate"
|
||||
aliases:
|
||||
- firmwareapi/pycom/machine/pygate.html
|
||||
- firmwareapi/pycom/machine/pygate.md
|
||||
- chapter/firmwareapi/pycom/machine/pygate
|
||||
---
|
||||
|
||||
The Pygate is an 8-channel LoRaWAN gateway. Connect a WiPy, Gpy or LoPy4 board to the Pygate and flash the Pygate firmware. See the [Pygate tutorial](/tutorials/all/pygate) to get started.
|
||||
|
||||
## Methods
|
||||
|
||||
#### machine.pygate\_init(buff)
|
||||
|
||||
This function is used to initialize the Pygate
|
||||
|
||||
- `buff`: the data contents of the gateway global config json file
|
||||
|
||||
#### machine.pygate\_deinit()
|
||||
|
||||
This shuts down the concentrator.
|
||||
|
||||
#### machine.callback(trigger, handler=None, arg=None)
|
||||
|
||||
- `trigger`: A trigger event(s) for invoking the callback function `handler`, the triggers/events are:
|
||||
|
||||
`machine.PYGATE_START_EVT`
|
||||
|
||||
`machine.PYGATE_STOP_EVT`
|
||||
|
||||
`machine.MP_QSTR_PYGATE_ERROR_EVT`
|
||||
|
||||
- `handler`: The callback function to be called. When not passed to function, any pre-registered callback will be disabled/removed.
|
||||
|
||||
- `arg`: Optional argument to be passed to the callback function.
|
||||
|
||||
#### machine.events()
|
||||
|
||||
Get the Pygate events
|
||||
Reference in New Issue
Block a user