Lab 6 code.

Dependencies:   mbed

Fork of WaG by GroupA

Committer:
spm71
Date:
Fri Mar 02 22:18:47 2018 +0000
Revision:
18:0e281922212c
Child:
19:ad514b1dd53f
More implementation on SPI and started stepper files.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
spm71 18:0e281922212c 1 /******************************************************************************
spm71 18:0e281922212c 2 * EECS 397
spm71 18:0e281922212c 3 *
spm71 18:0e281922212c 4 * Assignment Name: Lab 5: WaG
spm71 18:0e281922212c 5 *
spm71 18:0e281922212c 6 * Authors: Sam Morrison and Phong Nguyen
spm71 18:0e281922212c 7 * File name: stepper.h
spm71 18:0e281922212c 8 * Purpose: Header for stepper driver
spm71 18:0e281922212c 9 *
spm71 18:0e281922212c 10 * Created: 03/02/2018
spm71 18:0e281922212c 11 * Last Modified: 03/02/2018
spm71 18:0e281922212c 12 *
spm71 18:0e281922212c 13 ******************************************************************************/
spm71 18:0e281922212c 14
spm71 18:0e281922212c 15 #ifndef STEPPER_H
spm71 18:0e281922212c 16 #define STEPPER_H
spm71 18:0e281922212c 17
spm71 18:0e281922212c 18 #define DRV8806_SPI_NO_BITS 8
spm71 18:0e281922212c 19 #define DRV8806_SPI_MODE 0
spm71 18:0e281922212c 20 #define DRV8806_SPI_FREQ 1000000
spm71 18:0e281922212c 21 #define STP_CW 0
spm71 18:0e281922212c 22 #define STP_CW 1
spm71 18:0e281922212c 23 #define STP_POS_UNKN -5
spm71 18:0e281922212c 24 #define NUM_SENSORS 8
spm71 18:0e281922212c 25
spm71 18:0e281922212c 26
spm71 18:0e281922212c 27 #include "mbed.h"
spm71 18:0e281922212c 28 #include "io_pins.h"
spm71 18:0e281922212c 29
spm71 18:0e281922212c 30 void stp_init();
spm71 18:0e281922212c 31 void stp_step(int direction);
spm71 18:0e281922212c 32
spm71 18:0e281922212c 33
spm71 18:0e281922212c 34 #endif