Simu for V4. First draft of rotary encoders use in menus
This commit is contained in:
+10
-5
@@ -26,11 +26,9 @@
|
||||
/* are platform dependent. */
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include <avr/io.h>
|
||||
#include "gruvin9x.h"
|
||||
#include "diskio.h"
|
||||
|
||||
|
||||
/* Definitions for MMC/SDC command */
|
||||
#define CMD0 (0) /* GO_IDLE_STATE */
|
||||
#define CMD1 (1) /* SEND_OP_COND (MMC) */
|
||||
@@ -59,8 +57,13 @@
|
||||
|
||||
/* Port Controls (Platform dependent) */
|
||||
// GCC optimisation should result in a single CBI/SBI instructions here
|
||||
#define CS_LOW() PORTB &= ~0x10 /* MMC CS = L */
|
||||
#define CS_HIGH() PORTB |= 0x10 /* MMC CS = H */
|
||||
#if defined (PCBV4)
|
||||
# define CS_LOW() PORTB &= ~0x01 /* MMC CS = L */
|
||||
# define CS_HIGH() PORTB |= 0x01 /* MMC CS = H */
|
||||
#else
|
||||
# define CS_LOW() PORTB &= ~0x10 /* MMC CS = L */
|
||||
# define CS_HIGH() PORTB |= 0x10 /* MMC CS = H */
|
||||
#endif
|
||||
|
||||
#define SOCKPORT PINB /* Socket contact port */
|
||||
#define SOCKWP 0x00 // not implemented /* Write protect switch */
|
||||
@@ -175,7 +178,9 @@ static
|
||||
void power_on (void)
|
||||
{
|
||||
// PORTE &= ~0x80; // Socket power on
|
||||
#ifndef SIMU
|
||||
for (Timer1 = 2; Timer1; ); // Wait for 20ms
|
||||
#endif
|
||||
//PORTB = 0b10110101; // Enable drivers
|
||||
//DDRB = 0b11000111;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user