This video presentation is the fifth installment of the Essentials of MQX RTOS Application Development training course. In this session, you will be introduced to MQX driver architecture, how drivers are initialized and used, and walk through two very popular drivers - serial, and light-weight GPIO.
This training was created by Embedded Access Inc., a Freescale sponsored training provider and proven partner.
|Session 5 Course Line||Lab Outline|
First, watch the video for Session 5: Introduction to Drivers.
Then, follow through with the interactive lab assignment below.
The lightweight GPIO (LWGPIO) driver is used for monitoring inputs and controlling inputs. Though the concept is quite straight forward there are a number of structures and functions you need to use with this driver. In part this is to keep your code easily portable should you change processors and in part because of the complexity of modern processors such as Kinetis.
The objective of this lab is to implement the switch and LED functionality.This objective will be accomplished by:
New functions/ structures you will use:
LWGPIO_STRUCT, LWGPIO_PIN_ID, lwgpio_init, lwgpio_set_functionality, lwgpio_set_attribute, lwgpio_get_value, lwgpio_set_value, lwgpio_toggle_value
Need more help? The full source code for this lab can be found in the 'Lab Source Code' folder here.