Skip to content

Instantly share code, notes, and snippets.

@embeddist
Last active December 20, 2015 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save embeddist/cba29a85e3adcee7263d to your computer and use it in GitHub Desktop.
Save embeddist/cba29a85e3adcee7263d to your computer and use it in GitHub Desktop.
#include "pins_arduino.h"
#include "SPI.h"
SPIClass SPI;
void SPIClass::begin() {
...
SPI_SIRxx = 0x0007; // Clear Error Flag , エラ-フラグをクリ
SPI_SMRxx = 0x0020; // Config. SPI Mode , モ-ド設定
SPI_SCRx = 0xF007; // Config. Serial , シリアル通信動作設定
//SPI_SDRxx = SPI_CLOCK_DIV4 << 9; // Config. SPI Clock Diviver (@8MHz), 動作クロックの分周設定
SPI_SDRxx = SPI_CLOCK_DIV2 << 9; // Config. SPI Clock Diviver (@16MHz)動作クロックの分周設定
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment