P2-6 - progress direction 3 Note that the top level should not change from the last version file

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Spring 2007 Embedded Systems Programming Project 2-6 Switching directions 1. For this section we will be working with the switches module. Using the code supplied for the redleds as a model, modify the switches modules to arbitrate access to the individual bits for the switches. You should designate one of the bits to represent the direction in which you wish your progress display to travel. Also provide an accessor function to provide the current state of the direction bit. 2. Now modify your progress module to change direction of the progress motion (left vs. right) depending on the position of your chosen switch to represent
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: progress direction. 3. Note that the top level should not change from the last version. /* file: p2_6.c */ #include <stdio.h> #include "sys_clock.h" #include "alive.h" #include "progress.h" int main ( void ) { printf( "\n\rStarting p2_6.c (ESP N2 V2)\n\r" ); if ( sys_clock_init() != 0 ) { printf ( "No system clock available\n" ); return 4; } while (1) { // this is where we will eventually do some real work show_progress(); // make it look like we are doing something alive(); // show that we are still alive } return 0; }...
View Full Document

This document was uploaded on 11/01/2011 for the course EE 492 at Boise State.

Ask a homework question - tutors are online