Skip to content

Commit

Permalink
Added end() method
Browse files Browse the repository at this point in the history
  • Loading branch information
JChristensen committed Oct 24, 2013
1 parent 58dbbf9 commit b0ce07b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tinySPI KEYWORD1
begin KEYWORD2
transfer KEYWORD2
end KEYWORD2
5 changes: 5 additions & 0 deletions tinySPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,9 @@ uint8_t tinySPI::transfer(uint8_t spiData)
return USIDR;
}

void tinySPI::end(void)
{
USICR = 0;
}

tinySPI SPI = tinySPI(); //instantiate a tinySPI object
3 changes: 2 additions & 1 deletion tinySPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ class tinySPI
{
public:
tinySPI();
void begin();
void begin(void);
uint8_t transfer(uint8_t spiData);
void end(void);
};

extern tinySPI SPI;
Expand Down

0 comments on commit b0ce07b

Please sign in to comment.