name=GPIO Sensor Interface
category=HAL

# Any string is allowable here.  Generally though it is Production Ready, Test Tool, Extension Needed
qualityString=Production Ready
# This is one of the following:  productionReady, testTool, extensionNeeded
quality=production

providedApis=gpio-sensor
api.gpio-sensor.header=$PLUGIN/plugin-common/gpio-sensor/gpio-sensor.h

architecture=efr32,em341,em342,em346,em351,em355,em3555,em357,em3581,em3582,em3585,em3586,em3587,em3588,em3591,em3592,em3595,em3596,em3597,em3598,simulation

description=This is an interface for a generic binary GPIO sensor.  It provides very simple debouncing and a callback for when the state of the sensor changes.  For this plugin to function properly, the user must select a GPIO port and pin and define them in the applicaton's board.h via the GPIO_SENSOR_PORT and GPIO_SENSOR_PIN macros.  Additionally, for an em35x design, an IRQ number must be set with the GPIO_SENSOR_IRQ macro.  For EFR32, no IRQ needs to be selected, but the user can set the GPIO_SENSOR_EM4WUPIN macro to true or false to enable or disable EM4 wake up functionality for the pin.

$PLUGIN/plugin-common/gpio-sensor/gpio-sensor.c     (efr32,em341,em342,em346,em351,em355,em3555,em357,em3581,em3582,em3585,em3586,em3587,em3588,em3591,em3592,em3595,em3596,em3597,em3598)
$PLUGIN/plugin-common/gpio-sensor-stub/gpio-sensor-stub.c (simulation)

requiredPlugins=generic-interrupt-control

# Included by default because the HAL configuration tab enables the button handling by default.
includedByDefault=false

implementedCallbacks=emberAfPluginGpioSensorInitCallback

callbacks=$PLUGIN/plugin-common/gpio-sensor/callback.info

options=sensorPolarity, assertDebounce, deassertDebounce

sensorPolarity.name=Sensor Polarity
sensorPolarity.description=1 means the sensor input is active high.  0 means the sensor input is active low.
sensorPolarity.type=NUMBER:0,1
sensorPolarity.default=0

assertDebounce.name=Sensor Assert Debounce (Milliseconds)
assertDebounce.description=The length of time after the sensor asserts that the sensor will wait to report subsequent status changes.
assertDebounce.type=NUMBER:0,60000
assertDebounce.default=100

deassertDebounce.name=Sensor Dessert Debounce (Milliseconds)
deassertDebounce.description=The length of time after the sensor deasserts that the sensor will wait to report subsequent status changes.
deassertDebounce.type=NUMBER:0,60000
deassertDebounce.default=100

events=Debounce, Interrupt
