-- eLua reference manual - platform data data_en = { -- Title title = "eLua reference manual - MBED pio module", -- Menu name menu_name = "pio", -- Overview overview = [[

This module provide a function for accessing pin configuration features on the LPC17xx family of CPUs, and provides provides a pin mapping which corresponds to the pins and LEDs on the MBED platform. The pin configuration function allows the user to reconfigure pin function (as decribed in section 8.5 of the @http://ics.nxp.com/support/documents/microcontrollers/pdf/user.manual.lpc17xx.pdf@lpc17xx user manual@, configure the pin as an open drain, and configure the pin as pullup, pulldown or tristate. Note that this module is a supplement of the platform independent @refman_gen_pio.html@pio@ module, not a replacement. Use this module only for setting up the MBED PIO pins, and the @refman_gen_pio.html@pio@ module for all the other PIO related operations. Below is a subset of available pin functions:

In addition, this module provides pin mapping as found on the mbed board so that $mbed.pio.p5$ through $mbed.pio.p30$ map onto the mbed pins as described in the @http://mbed.org/handbook/mbed-NXP-LPC1768@mbed handbook@. LED pins are also usable, for example LED1 would correspond to $mbed.pio.LED1$.

]], -- Functions funcs = { { sig = "#mbed.pio.configpin#( pin, function, mode, resistor)", desc = "Configure the pin.", args = { "$pin$ - the pin, as encoded in the @refman_gen_pio.html@pio@ or $mbed.pio$ module.", "$function$ - alternate pin function, Must be either $mbed.pio.FUNCTION_0 (default)$, $mbed.pio.FUNCTION_1$, $mbed.pio.FUNCTION_2$, or $mbed.pio.FUNCTION_3$", "$mode$ - open drain mode, can be either $mbed.pio.MODE_DEFAULT$ (no open drain) or $mbed.pio.MODE_OD$ (open drain).", "$resistor$ - alternate pin function. Must be either $mbed.pio.RES_PULLUP$ (default), $mbed.pio.RES_TRISTATE$, $mbed.pio.RES_PULLDOWN$." } }, }, } data_pt = data_en