Takanobu Muraguchi / IO3714
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers IO3714.cpp Source File

IO3714.cpp

00001 #include "IO3714.h"
00002 
00003 IO3714::IO3714(PinName mosi, PinName sclk, PinName clr_n, PinName stb_n)
00004         : _spi(mosi,NC,sclk), _clr_n(clr_n), _stb_n(stb_n) {
00005     _clr_n=0;
00006     _stb_n=0;
00007     _spi.format(12,0);
00008     _spi.frequency(48000000);
00009     _clr_n=1;
00010 }
00011 
00012 void IO3714::write(unsigned int data) {
00013 
00014 
00015     _spi.write((data>>12) & 0xFFF  );
00016     _spi.write(data & 0xFFF );
00017     _stb_n=0;
00018     _stb_n=1;
00019 
00020 }