Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of Lab_6_WaG by
laser.cpp
00001 /****************************************************************************** 00002 * EECS 397 00003 * 00004 * Assignment Name: Lab 6: WaG 00005 * 00006 * Authors: Sam Morrison and Phong Nguyen 00007 * File name: laser.cpp 00008 * Purpose: Contains laser functions 00009 * 00010 * Created: 03/29/2018 00011 * Last Modified: 03/29/2018 00012 * 00013 ******************************************************************************/ 00014 #include "mbed.h" 00015 #include "io_pins.h" 00016 #include "spi.h" 00017 #include "laser.h" 00018 00019 extern DigitalOut laser; 00020 extern Serial pc; 00021 00022 /* 00023 * void lzr_off(); 00024 * Description: turns the laser off 00025 * 00026 * Inputs: 00027 * Parameters: 00028 * Globals: 00029 * 00030 * Outputs: 00031 * Returns: void 00032 */ 00033 void lzr_off() { 00034 laser = 0; 00035 } 00036 00037 /* 00038 * void lzr_off(); 00039 * Description: turns the laser on 00040 * 00041 * Inputs: 00042 * Parameters: 00043 * Globals: 00044 * 00045 * Outputs: 00046 * Returns: void 00047 */ 00048 void lzr_on() { 00049 laser = 1; 00050 } 00051 00052 /* 00053 * void lzr_init(); 00054 * Description: initializes the laser 00055 * 00056 * Inputs: 00057 * Parameters: 00058 * Globals: 00059 * 00060 * Outputs: 00061 * Returns: void 00062 */ 00063 void lzr_init() { 00064 lzr_off(); 00065 }
Generated on Mon Jul 18 2022 00:36:30 by
