Merge pull request #17 from sweetlilmre/rec-led

Rec led
This commit is contained in:
sweetlilmre
2015-07-07 20:22:36 +02:00
3 changed files with 20 additions and 7 deletions
+6
View File
@@ -70,6 +70,12 @@
#define CONTROL_SET_BUS0() CONTROL_PORT &= ~(_BV(CONTROL_PIN0) | _BV(CONTROL_PIN1))
#define CONTROL_SET_BUS1() { CONTROL_PORT &= ~_BV(CONTROL_PIN1); CONTROL_PORT |= _BV(CONTROL_PIN0); }
#define REC_LED_PORT PORTD
#define REC_LED_DDR DDRD
#define REC_LED_PIN 2
#define REC_LED_OFF() REC_LED_PORT |= _BV(REC_LED_PIN)
#define REC_LED_ON() REC_LED_PORT &= ~_BV(REC_LED_PIN)
// comment this line if you are using HW1.0
#define KEYS_INPUT_PULLUP
#define KEYS_READ_PORT PORTC
+12 -5
View File
@@ -498,6 +498,9 @@ void record_file(char* pfile_name) {
lcd_busy_spinner();
return;
}
REC_LED_ON();
lcd_title_P(S_RECORDING);
lcd_status(pfile_name);
@@ -506,11 +509,11 @@ void record_file(char* pfile_name) {
uint32_t* buffer_magic = (uint32_t*) g_fat_buffer;
//set appropriate header informations for C64 or C16
if (g_machine_type == C16) {
buffer_magic[0] = TAP_MAGIC_C16;
g_fat_buffer[13] = C16;
buffer_magic[0] = TAP_MAGIC_C16;
g_fat_buffer[13] = C16;
} else {
buffer_magic[0] = TAP_MAGIC_C64;
g_fat_buffer[13] = C64;
buffer_magic[0] = TAP_MAGIC_C64;
g_fat_buffer[13] = C64;
}
buffer_magic[1] = TAP_MAGIC_POSTFIX1; // copy the magic to the buffer: "TAPE"
buffer_magic[2] = TAP_MAGIC_POSTFIX2; // copy the magic to the buffer: "-RAW"
@@ -590,7 +593,7 @@ void record_file(char* pfile_name) {
// end of load UI indicator
lcd_busy_spinner();
REC_LED_OFF();
}
/*
@@ -667,6 +670,10 @@ int tapuino_hardware_setup(void)
// default both LOW so BUS 0
CONTROL_SET_BUS0();
// recording led (Arduino: D2, Atmel: PD2)
REC_LED_DDR |= _BV(REC_LED_PIN);
REC_LED_OFF();
// keys are all inputs, activate pullups
KEYS_READ_DDR &= ~_BV(KEY_SELECT_PIN);
KEYS_READ_PORT |= _BV(KEY_SELECT_PIN);
+2 -2
View File
@@ -2,7 +2,7 @@
#define VERSION_H
#define TAPUINO_MAJOR_VERSION 2
#define TAPUINO_MINOR_VERSION 2
#define TAPUINO_BUILD_VERSION 1
#define TAPUINO_MINOR_VERSION 3
#define TAPUINO_BUILD_VERSION 0
#endif