Numato.Gpio (numato_gpio v0.1.1) View Source

Link to this section Summary

Functions

Reads the analog voltage present at the given ADC input. Responses are integeres in range 0 - 1023.

Sets the direction of all GPIOs in a single operation. A 0 in a bit position configures that GPIO as output and 1 configures it as input.

Sets mask for subsequent GPIO Numato.Gpio.gpio_writeall and Numato_Gpio.gpio_iodir commands. A 0 in a bit position mask the corresponding GPIO and any update to that GPIO is ignored during Numato.Gpio.gpio_iodir and Numato.Gpio.gpio_writeall operations.

Returns information whether notifications are enabled (true) or disabled ('false`).

Disables GPIOs input change notifications.

Enables GPIOs input change notifications. When notifications are enabled, this GenStage process will produce events that are tuples with three elemetns: {current_value, previous_value, iodir}.

Reads the digial input status for the given GPIO. Returns 0 for low and 1 for high state.

Reads the status of all GPIOs in a single operation.

Sets the GPIO output status to either low (value 0) or high (value 1).

Controls al GPIOs in a single operation.

Callback implementation for GenStage.handle_info/2.

Reads ID of the Numato module.

Writes ID of the Numato module. The ID must be a string with exactly 8 characters.

Callback implementation for GenStage.init/1.

Returns Numato firmware version.

Link to this section Functions

Reads the analog voltage present at the given ADC input. Responses are integeres in range 0 - 1023.

Sets the direction of all GPIOs in a single operation. A 0 in a bit position configures that GPIO as output and 1 configures it as input.

This operation respects the iomask, set using Numato.Gpio.gpio_iomask() function.

Link to this function

gpio_iomask(pid, iomask)

View Source

Sets mask for subsequent GPIO Numato.Gpio.gpio_writeall and Numato_Gpio.gpio_iodir commands. A 0 in a bit position mask the corresponding GPIO and any update to that GPIO is ignored during Numato.Gpio.gpio_iodir and Numato.Gpio.gpio_writeall operations.

Returns information whether notifications are enabled (true) or disabled ('false`).

Disables GPIOs input change notifications.

Enables GPIOs input change notifications. When notifications are enabled, this GenStage process will produce events that are tuples with three elemetns: {current_value, previous_value, iodir}.

Reads the digial input status for the given GPIO. Returns 0 for low and 1 for high state.

Reads the status of all GPIOs in a single operation.

Link to this function

gpio_write(pid, gpio, value)

View Source

Sets the GPIO output status to either low (value 0) or high (value 1).

Link to this function

gpio_writeall(pid, value)

View Source

Controls al GPIOs in a single operation.

This operation respects the iomask, set using Numato.Gpio.gpio_iomask() function.

Link to this function

handle_call(arg1, from, state)

View Source

Callback implementation for GenStage.handle_call/3.

Link to this function

handle_demand(demand, state)

View Source

Callback implementation for GenStage.handle_demand/2.

Callback implementation for GenStage.handle_info/2.

Reads ID of the Numato module.

Writes ID of the Numato module. The ID must be a string with exactly 8 characters.

Callback implementation for GenStage.init/1.

Returns Numato firmware version.