Skip to content

Instantly share code, notes, and snippets.

@embeddist

embeddist/spi_SetSPIClock.cpp Secret

Last active Dec 20, 2015
Embed
What would you like to do?
#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
You can’t perform that action at this time.