Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:6c010acaae66, committed 2019-08-06
- Comitter:
- ritarosakai
- Date:
- Tue Aug 06 12:50:39 2019 +0000
- Parent:
- 0:2e338068a5a7
- Commit message:
- Changed no to use MISO pin
Changed in this revision
| MCP4922.cpp | Show annotated file Show diff for this revision Revisions of this file |
| MCP4922.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 2e338068a5a7 -r 6c010acaae66 MCP4922.cpp
--- a/MCP4922.cpp Mon Aug 05 03:53:01 2019 +0000
+++ b/MCP4922.cpp Tue Aug 06 12:50:39 2019 +0000
@@ -1,8 +1,8 @@
#include "MCP4922.h"
#include "mbed.h"
-MCP4922::MCP4922(PinName MOSI,PinName MISO,PinName SCK,PinName CS,PinName LDAC):
- dac_SPI(MOSI,MISO,SCK),dac_cs(CS),dac_l(LDAC)
+MCP4922::MCP4922(PinName MOSI,PinName SCK,PinName CS,PinName LDAC):
+ dac_SPI(MOSI,NC,SCK),dac_cs(CS),dac_l(LDAC)
{
dac_SPI.format(16,0);
dac_SPI.frequency(20000000);
diff -r 2e338068a5a7 -r 6c010acaae66 MCP4922.h
--- a/MCP4922.h Mon Aug 05 03:53:01 2019 +0000
+++ b/MCP4922.h Tue Aug 06 12:50:39 2019 +0000
@@ -3,7 +3,7 @@
class MCP4922
{
public:
- MCP4922(PinName MOSI,PinName MISO,PinName SCK,PinName CS,PinName LDAC);
+ MCP4922(PinName MOSI,PinName SCK,PinName CS,PinName LDAC);
void write(int ch,float value);
private:
SPI dac_SPI;