Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70b3a745ab | ||
|
|
9524fc0acd | ||
|
|
83c8651158 |
@@ -196,4 +196,4 @@ Additional suggestions and feedback from [progmem](https://github.com/progmem).
|
||||
|
||||
If you appreciate this library or the other projects I do, you can make a monetary donation below. Thanks!
|
||||
|
||||
[](https://www.paypal.com/donate/?business=6M7ENNVE2ZP5Q&no_recurring=1¤cy_code=USD)
|
||||
[](https://ko-fi.com/vxzk/tip)
|
||||
|
||||
+3
-2
@@ -30,7 +30,8 @@ void PSX_::init(int ackPin = 8, bool invACK = false, bool invCIPO = true) {
|
||||
#if (F_CPU == 16000000L)
|
||||
SPCR |= (1 << SPR1); // Fosc/64 @16MHz==250KHz
|
||||
#elif (F_CPU == 8000000L)
|
||||
SPCR |= (1 << SPR2) | (1 << SPR1); // Fosc/32 @8MHz==250KHz
|
||||
SPCR |= (1 << SPR1); // SPR1=1, SPR0=0 for Fosc/64 base
|
||||
SPSR |= (1 << SPI2X); // SPI2X=1 for double speed -> Fosc/32 @8MHz==250KHz
|
||||
#endif
|
||||
SPCR |= (1 << CPHA); // Setup @ leading edge, sample @ falling edge
|
||||
SPCR |= (1 << CPOL); // Leading edge is falling edge, trailing edge is rising edge
|
||||
@@ -110,4 +111,4 @@ void PSX_::isr() {
|
||||
}
|
||||
}
|
||||
|
||||
PSX_ PSX;
|
||||
PSX_ PSX;
|
||||
|
||||
Reference in New Issue
Block a user