configuring and reading adc1299 using spi interface

Dependencies:   mbed

Committer:
eguliyev
Date:
Wed May 29 03:43:46 2019 +0000
Revision:
0:99e31762ab2f
how to read texas instrument adc1299 using nucleo f4

Who changed what in which revision?

UserRevisionLine numberNew contents of line
eguliyev 0:99e31762ab2f 1 #include "mbed.h"
eguliyev 0:99e31762ab2f 2 #include "spi_slave.h"
eguliyev 0:99e31762ab2f 3
eguliyev 0:99e31762ab2f 4 SPISlave slave(PC_1,PC_2,PB_10,PB_12);
eguliyev 0:99e31762ab2f 5
eguliyev 0:99e31762ab2f 6 void SLV_INIT(){
eguliyev 0:99e31762ab2f 7 slave.format(8,0);
eguliyev 0:99e31762ab2f 8 slave.frequency(1000000);
eguliyev 0:99e31762ab2f 9 }
eguliyev 0:99e31762ab2f 10
eguliyev 0:99e31762ab2f 11
eguliyev 0:99e31762ab2f 12 void SLV_SEND(char msb_data, char mib_data, char lsb_data){
eguliyev 0:99e31762ab2f 13
eguliyev 0:99e31762ab2f 14 if(slave.receive()){
eguliyev 0:99e31762ab2f 15 slave.reply(msb_data);
eguliyev 0:99e31762ab2f 16 slave.reply(mib_data);
eguliyev 0:99e31762ab2f 17 slave.reply(lsb_data);
eguliyev 0:99e31762ab2f 18 }
eguliyev 0:99e31762ab2f 19 }
eguliyev 0:99e31762ab2f 20
eguliyev 0:99e31762ab2f 21