MBSP

Microcontroller Board Support Package

User Tools

Site Tools


digital_output_group

Table of Contents

digital_output group

This group contains all digital output signals.

Each signal is a sub group with the signal name as the group name.

    "digital_output": {
        "green_led": {
            "type": "push pull"
            "pad": "PA3"
        }
    }

type

defines what type of output mode should be used. Type can be:

  • push pull
  • open drain

type: enum

default: push pull

pad

defines the chip pad that the signal should be output on.

type: string

default: no default possible

invert

If this setting is set to “on” then turning this output “on” will generate a Low (Gnd) signal. Turning it “off” will generate a High (Vcc) level.

If this setting is set to “off” (=default) then turning this output “on” will generate a High (Vcc) signal. Turning it “off” will generate a Low (Gnd) level.

type: string

default: “off”

API

The part “signal_name” in the described functions will be replaced by the name of the signal. E.g. if your signal is called “debug_led” then the API function “signal_name_on” will become “debug_led_on”.

void signal_name_on(void)

Will set the output pin to output a high Signal. The pin will be at Vcc. If the signal has the “invert” property “on” then the Output will be Low (Gnd).

void signal_name_off(void)

Will set the output pin to output a low Signal. The pin will be at Gnd. If the signal has the “invert” property “on” then the Output will be High (Vcc).

digital_output_group.txt · Last modified: by lars