Added one task

Dependencies:   mbed

mylib/src/spi.cpp

Committer:
PicYusuke
Date:
2017-05-26
Revision:
0:fb4269aa5fb4

File content as of revision 0:fb4269aa5fb4:

#include "spi.h"

uint8_t spi_tx[64];
uint8_t spi_rx[64];

SPI spi1(PA_7, PA_6, PA_5); // mosi, miso, sclk
/*-----CS pins for spi1-----*/
DigitalOut spi1_cs1(PC_7);   
DigitalOut spi1_cs2(PB_6);   
/*--------------------------*/

void SPI_Init()
{
    spi1.format(8, 3);   
    spi1.frequency(1000000);
}