2.7V 4-Channel 12-Bit A/D Converters with SPI™ Serial Interface
Fork of MCP3204 by
Diff: MCP3204.h
- Revision:
- 1:cf7328552994
- Parent:
- 0:b5950cd5e330
diff -r b5950cd5e330 -r cf7328552994 MCP3204.h --- a/MCP3204.h Mon Mar 23 07:49:58 2015 +0000 +++ b/MCP3204.h Wed Jan 20 10:53:06 2016 +0000 @@ -1,4 +1,4 @@ -/* mbed MCP3204 Library, for driving the 2.7V 4-Channel/8-Channel 12-Bit A/D Converters with SPI™ Serial Interface +/* mbed MCP3204 Library, for driving the 2.7V 4-Channel 12-Bit A/D Converters with SPI™ Serial Interface * Copyright (c) 2015, Created by Steen Joergensen (stjo2809) * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -55,17 +55,7 @@ * @param spi The mbed SPI instance (make in main routine) * @param nCs The SPI chip select pin. */ - MCP3204(SPI& spi, PinName nCs); - - /** Create an instance of the MCP4261 connected with SPI pins. - * - * @param mosi The SPI Master Output, Slave Input pin. - * @param miso The SPI Master Input, Slave Output pin. - * @param sck The SPI Serial Clock pin. - * @param nCs The SPI chip select pin. - */ - MCP3204(PinName mosi, PinName miso,PinName sck, PinName nCs); - + MCP3204(SPI& spi, PinName nCs); /** Read from single channel. * @@ -86,7 +76,7 @@ SPI& _spi; DigitalOut _nCs; - int _make_value_from_responce(int responce_msb, int responce_lsb); + int _make_value_from_responce(int _msb, int _lsb); int _read(char sgl_or_diff, char channel); };