Merge branch 'master' of git@github.com:triffid/FiveD_on_Arduino
This commit is contained in:
commit
1ad0b2680e
8
Makefile
8
Makefile
|
|
@ -91,10 +91,10 @@ clean:
|
|||
rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex *.al *.i *.s *~
|
||||
|
||||
size: $(PROGRAM).elf
|
||||
@echo " SIZE Atmega168 Atmega328p"
|
||||
@$(OBJDUMP) -h $^ | perl -ne '/.(text)\s+([0-9a-f]+)/ && do { $$a += eval "0x$$2" }; END { printf " FLASH : %5d bytes (%2d%% of %2dkb) (%2d%% of %2dkb)\n", $$a, $$a * 100 / (14 * 1024), 14, $$a * 100 / (30 * 1024), 30 }'
|
||||
@$(OBJDUMP) -h $^ | perl -ne '/.(data|bss)\s+([0-9a-f]+)/ && do { $$a += eval "0x$$2" }; END { printf " RAM : %5d bytes (%2d%% of %2dkb) (%2d%% of %2dkb)\n", $$a, $$a * 100 / (1 * 1024), 1, $$a * 100 / (2 * 1024), 2 }'
|
||||
@$(OBJDUMP) -h $^ | perl -ne '/.(eeprom)\s+([0-9a-f]+)/ && do { $$a += eval "0x$$2" }; END { printf " EEPROM: %5d bytes (%2d%% of %2dkb) (%2d%% of %2dkb)\n", $$a, $$a * 100 / (1 * 1024), 1, $$a * 100 / (2 * 1024), 2 }'
|
||||
@echo " SIZE Atmega168 Atmega328p Atmega644"
|
||||
@$(OBJDUMP) -h $^ | perl -ne '/.(text)\s+([0-9a-f]+)/ && do { $$a += eval "0x$$2" }; END { printf " FLASH : %5d bytes (%2d%% of %2dkb) (%2d%% of %2dkb) (%2d%% of %2dkb)\n", $$a, $$a * 100 / (14 * 1024), 14, $$a * 100 / (30 * 1024), 30, $$a * 100 / (63 * 1024), 63 }'
|
||||
@$(OBJDUMP) -h $^ | perl -ne '/.(data|bss)\s+([0-9a-f]+)/ && do { $$a += eval "0x$$2" }; END { printf " RAM : %5d bytes (%2d%% of %2dkb) (%2d%% of %2dkb) (%2d%% of %2dkb)\n", $$a, $$a * 100 / (1 * 1024), 1, $$a * 100 / (2 * 1024), 2, $$a * 100 / (4 * 1024), 4 }'
|
||||
@$(OBJDUMP) -h $^ | perl -ne '/.(eeprom)\s+([0-9a-f]+)/ && do { $$a += eval "0x$$2" }; END { printf " EEPROM: %5d bytes (%2d%% of %2dkb) (%2d%% of %2dkb) (%2d%% of %2dkb)\n", $$a, $$a * 100 / (1 * 1024), 1, $$a * 100 / (2 * 1024), 2, $$a * 100 / (2 * 1024), 2 }'
|
||||
|
||||
config.h: config.h.dist
|
||||
@echo "Please review config.h, as config.h.dist is more recent."
|
||||
|
|
|
|||
22
arduino.h
22
arduino.h
|
|
@ -19,10 +19,10 @@
|
|||
|
||||
#define _READ(IO) (IO ## _RPORT & MASK(IO ## _PIN))
|
||||
#define _WRITE(IO, v) do { if (v) { IO ## _WPORT |= MASK(IO ## _PIN); } else { IO ## _WPORT &= ~MASK(IO ## _PIN); }; } while (0)
|
||||
#define _TOGGLE(IO) (IO ## _RPORT = MASK(IO ## _PIN))
|
||||
#define _TOGGLE(IO) do { IO ## _RPORT = MASK(IO ## _PIN) } while (0)
|
||||
|
||||
#define _SET_INPUT(IO) (IO ## _DDR &= ~MASK(IO ## _PIN))
|
||||
#define _SET_OUTPUT(IO) (IO ## _DDR |= MASK(IO ## _PIN))
|
||||
#define _SET_INPUT(IO) do { IO ## _DDR &= ~MASK(IO ## _PIN) } while (0)
|
||||
#define _SET_OUTPUT(IO) do { IO ## _DDR |= MASK(IO ## _PIN) } while (0)
|
||||
|
||||
#define _GET_INPUT(IO) ((IO ## _DDR & MASK(IO ## _PIN)) == 0)
|
||||
#define _GET_OUTPUT(IO) ((IO ## _DDR & MASK(IO ## _PIN)) != 0)
|
||||
|
|
@ -394,15 +394,15 @@
|
|||
#define AIO5_WPORT PORTA
|
||||
#define AIO5_DDR DDRA
|
||||
|
||||
#define AIO6_PIN PINA5
|
||||
#define AIO5_RPORT PINA
|
||||
#define AIO5_WPORT PORTA
|
||||
#define AIO5_DDR DDRA
|
||||
#define AIO6_PIN PINA6
|
||||
#define AIO6_RPORT PINA
|
||||
#define AIO6_WPORT PORTA
|
||||
#define AIO6_DDR DDRA
|
||||
|
||||
#define AIO7_PIN PINA5
|
||||
#define AIO5_RPORT PINA
|
||||
#define AIO5_WPORT PORTA
|
||||
#define AIO5_DDR DDRA
|
||||
#define AIO7_PIN PINA7
|
||||
#define AIO7_RPORT PINA
|
||||
#define AIO7_WPORT PORTA
|
||||
#define AIO7_DDR DDRA
|
||||
#endif
|
||||
|
||||
#if defined (__AVR_ATmega1280__)
|
||||
|
|
|
|||
5
serial.c
5
serial.c
|
|
@ -48,6 +48,7 @@ volatile uint8_t txbuf[BUFSIZE];
|
|||
*/
|
||||
|
||||
#ifdef XONXOFF
|
||||
#define FLOWFLAG_STATE_XOFF 0
|
||||
#define FLOWFLAG_SEND_XON 1
|
||||
#define FLOWFLAG_SEND_XOFF 2
|
||||
#define FLOWFLAG_STATE_XON 4
|
||||
|
|
@ -91,7 +92,7 @@ ISR(USART0_RX_vect)
|
|||
}
|
||||
|
||||
#ifdef XONXOFF
|
||||
if (flowflags & FLOWFLAG_STATE_XON && buf_canread(rx) >= BUFSIZE - 16) {
|
||||
if (flowflags & FLOWFLAG_STATE_XON && buf_canwrite(rx) <= 16) {
|
||||
// the buffer has only 16 free characters left, so send an XOFF
|
||||
// more characters might come in until the XOFF takes effect
|
||||
flowflags = FLOWFLAG_SEND_XOFF | FLOWFLAG_STATE_XON;
|
||||
|
|
@ -114,7 +115,7 @@ ISR(USART0_UDRE_vect)
|
|||
}
|
||||
else if (flowflags & FLOWFLAG_SEND_XOFF) {
|
||||
UDR0 = ASCII_XOFF;
|
||||
flowflags = 0;
|
||||
flowflags = FLOWFLAG_STATE_XOFF;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
|
|
|||
2
temp.c
2
temp.c
|
|
@ -191,7 +191,7 @@ void temp_print() {
|
|||
c = (current_temp & 3) * 25;
|
||||
t = (target_temp & 3) * 25;
|
||||
#ifdef REPRAP_HOST_COMPATIBILITY
|
||||
sersendf_P(PSTR("T: %u.%u\n"), current_temp >> 2, c);
|
||||
sersendf_P(PSTR(" T: %u.%u\n"), current_temp >> 2, c);
|
||||
#else
|
||||
sersendf_P(PSTR("T: %u.%u/%u.%u :%u\n"), current_temp >> 2, c, target_temp >> 2, t, temp_residency);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue