/*
 * My_spi.h
 *
 *  Created on: Nov 5, 2015
 *      Author: Jason
 */

#ifndef MY_SPI_H_
#define MY_SPI_H_

#include "LPC17xx.h"

namespace My_spi {
    void init_ssp1_spi( void );                   // Using SCK1, MISO1, MOSI1 (P0.7, P0.8, P0.9)
    void init_cs( uint8_t port, uint8_t pin );
    char spi_exchange_byte( char byte );
    void cs_select( uint8_t port, uint8_t pin );
    void cs_deselect( uint8_t port, uint8_t pin );
}

#endif /* MY_SPI_H_ */
