├── .DS_Store ├── .gitattributes ├── Arduino ├── .DS_Store ├── ArduinoAddons │ ├── Arduino_0.xx │ │ ├── Gen6 │ │ │ ├── boards.txt │ │ │ ├── bootloaders │ │ │ │ └── atmega644p │ │ │ │ │ ├── ATmegaBOOT.c │ │ │ │ │ ├── ATmegaBOOT_324P.hex │ │ │ │ │ ├── ATmegaBOOT_644.hex │ │ │ │ │ ├── ATmegaBOOT_644P.hex │ │ │ │ │ ├── Makefile │ │ │ │ │ └── README.txt │ │ │ └── cores │ │ │ │ └── arduino │ │ │ │ ├── Arduino.h │ │ │ │ ├── HardwareSerial.cpp │ │ │ │ ├── HardwareSerial.h │ │ │ │ ├── Print.cpp │ │ │ │ ├── Print.h │ │ │ │ ├── Stream.h │ │ │ │ ├── Tone.cpp │ │ │ │ ├── WCharacter.h │ │ │ │ ├── WConstants.h │ │ │ │ ├── WInterrupts.c │ │ │ │ ├── WMath.cpp │ │ │ │ ├── WProgram.h │ │ │ │ ├── WString.cpp │ │ │ │ ├── WString.h │ │ │ │ ├── binary.h │ │ │ │ ├── main.cpp │ │ │ │ ├── pins_arduino.c │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── wiring.c │ │ │ │ ├── wiring.h │ │ │ │ ├── wiring_analog.c │ │ │ │ ├── wiring_digital.c │ │ │ │ ├── wiring_private.h │ │ │ │ ├── wiring_pulse.c │ │ │ │ └── wiring_shift.c │ │ ├── Gen7 │ │ │ ├── boards.txt │ │ │ ├── bootloaders │ │ │ │ └── Gen7 │ │ │ │ │ ├── bootloader-1284P-16MHz.hex │ │ │ │ │ ├── bootloader-644-16MHz.hex │ │ │ │ │ ├── bootloader-644-20MHz.hex │ │ │ │ │ ├── bootloader-644P-16MHz.hex │ │ │ │ │ └── bootloader-644P-20MHz.hex │ │ │ └── cores │ │ │ │ └── arduino │ │ │ │ ├── HardwareSerial.cpp │ │ │ │ ├── HardwareSerial.h │ │ │ │ ├── Makefile │ │ │ │ ├── Print.cpp │ │ │ │ ├── Print.h │ │ │ │ ├── Tone.cpp │ │ │ │ ├── WCharacter.h │ │ │ │ ├── WConstants.h │ │ │ │ ├── WInterrupts.c │ │ │ │ ├── WMath.cpp │ │ │ │ ├── WProgram.h │ │ │ │ ├── WString.cpp │ │ │ │ ├── WString.h │ │ │ │ ├── binary.h │ │ │ │ ├── main.cpp │ │ │ │ ├── main.cxx │ │ │ │ ├── pins_arduino.c │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── wiring.c │ │ │ │ ├── wiring.h │ │ │ │ ├── wiring_analog.c │ │ │ │ ├── wiring_digital.c │ │ │ │ ├── wiring_private.h │ │ │ │ ├── wiring_pulse.c │ │ │ │ ├── wiring_serial.c │ │ │ │ └── wiring_shift.c │ │ ├── Sanguino │ │ │ ├── boards.txt │ │ │ ├── bootloaders │ │ │ │ ├── atmega1284p │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── boot.h │ │ │ │ │ ├── optiboot.c │ │ │ │ │ ├── optiboot_1284P_20MHz_57k6_baud.hex │ │ │ │ │ ├── pin_defs.h │ │ │ │ │ └── stk500.h │ │ │ │ └── atmega644p │ │ │ │ │ ├── ATmegaBOOT.c │ │ │ │ │ ├── ATmegaBOOT_324P.hex │ │ │ │ │ ├── ATmegaBOOT_644.hex │ │ │ │ │ ├── ATmegaBOOT_644P.hex │ │ │ │ │ ├── Makefile │ │ │ │ │ └── README.txt │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ ├── HardwareSerial.cpp │ │ │ │ │ ├── HardwareSerial.h │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ ├── Stream.h │ │ │ │ │ ├── Tone.cpp │ │ │ │ │ ├── WCharacter.h │ │ │ │ │ ├── WConstants.h │ │ │ │ │ ├── WInterrupts.c │ │ │ │ │ ├── WMath.cpp │ │ │ │ │ ├── WProgram.h │ │ │ │ │ ├── WString.cpp │ │ │ │ │ ├── WString.h │ │ │ │ │ ├── binary.h │ │ │ │ │ ├── main.cpp │ │ │ │ │ ├── pins_arduino.c │ │ │ │ │ ├── pins_arduino.h │ │ │ │ │ ├── wiring.c │ │ │ │ │ ├── wiring.h │ │ │ │ │ ├── wiring_analog.c │ │ │ │ │ ├── wiring_digital.c │ │ │ │ │ ├── wiring_private.h │ │ │ │ │ ├── wiring_pulse.c │ │ │ │ │ └── wiring_shift.c │ │ │ └── programmers.txt │ │ ├── hardware │ │ │ └── tools │ │ │ │ └── avr │ │ │ │ └── etc │ │ │ │ └── avrdude.conf │ │ └── libraries │ │ │ ├── LiquidCrystal │ │ │ ├── LiquidCrystal.cpp │ │ │ ├── LiquidCrystal.h │ │ │ └── keywords.txt │ │ │ ├── SPI │ │ │ ├── SPI.cpp │ │ │ ├── SPI.h │ │ │ └── keywords.txt │ │ │ └── U8glib │ │ │ ├── ChangeLog │ │ │ ├── INSTALL.TXT │ │ │ ├── U8glib.cpp │ │ │ ├── U8glib.h │ │ │ ├── examples │ │ │ ├── Bitmap │ │ │ │ └── Bitmap.pde │ │ │ ├── Chess │ │ │ │ └── Chess.pde │ │ │ ├── Console │ │ │ │ └── Console.pde │ │ │ ├── F │ │ │ │ └── F.pde │ │ │ ├── GraphicsTest │ │ │ │ └── GraphicsTest.pde │ │ │ ├── HelloWorld │ │ │ │ └── HelloWorld.pde │ │ │ ├── Menu │ │ │ │ └── Menu.pde │ │ │ ├── PrintTest │ │ │ │ └── PrintTest.pde │ │ │ ├── Rotation │ │ │ │ └── Rotation.pde │ │ │ ├── Scale │ │ │ │ └── Scale.pde │ │ │ ├── TextRotX │ │ │ │ └── TextRotX.pde │ │ │ ├── U8gLogo │ │ │ │ └── U8gLogo.pde │ │ │ └── XBM │ │ │ │ └── XBM.pde │ │ │ ├── license.txt │ │ │ └── utility │ │ │ ├── chessengine.c │ │ │ ├── u8g.h │ │ │ ├── u8g_bitmap.c │ │ │ ├── u8g_circle.c │ │ │ ├── u8g_clip.c │ │ │ ├── u8g_com_api.c │ │ │ ├── u8g_com_api_16gr.c │ │ │ ├── u8g_com_arduino_common.c │ │ │ ├── u8g_com_arduino_fast_parallel.c │ │ │ ├── u8g_com_arduino_hw_spi.c │ │ │ ├── u8g_com_arduino_no_en_parallel.c │ │ │ ├── u8g_com_arduino_parallel.c │ │ │ ├── u8g_com_arduino_port_d_wr.c │ │ │ ├── u8g_com_arduino_ssd_i2c.c │ │ │ ├── u8g_com_arduino_st7920_hw_spi.c │ │ │ ├── u8g_com_arduino_st7920_spi.c │ │ │ ├── u8g_com_arduino_std_sw_spi.c │ │ │ ├── u8g_com_arduino_sw_spi.c │ │ │ ├── u8g_com_arduino_t6963.c │ │ │ ├── u8g_com_atmega_hw_spi.c │ │ │ ├── u8g_com_atmega_parallel.c │ │ │ ├── u8g_com_atmega_st7920_hw_spi.c │ │ │ ├── u8g_com_atmega_st7920_spi.c │ │ │ ├── u8g_com_atmega_sw_spi.c │ │ │ ├── u8g_com_i2c.c │ │ │ ├── u8g_com_io.c │ │ │ ├── u8g_com_null.c │ │ │ ├── u8g_cursor.c │ │ │ ├── u8g_delay.c │ │ │ ├── u8g_dev_flipdisc_2x7.c │ │ │ ├── u8g_dev_gprof.c │ │ │ ├── u8g_dev_ili9325d_320x240.c │ │ │ ├── u8g_dev_ks0108_128x64.c │ │ │ ├── u8g_dev_lc7981_160x80.c │ │ │ ├── u8g_dev_lc7981_240x128.c │ │ │ ├── u8g_dev_lc7981_240x64.c │ │ │ ├── u8g_dev_lc7981_320x64.c │ │ │ ├── u8g_dev_null.c │ │ │ ├── u8g_dev_pcd8544_84x48.c │ │ │ ├── u8g_dev_pcf8812_96x65.c │ │ │ ├── u8g_dev_sbn1661_122x32.c │ │ │ ├── u8g_dev_ssd1306_128x32.c │ │ │ ├── u8g_dev_ssd1306_128x64.c │ │ │ ├── u8g_dev_ssd1309_128x64.c │ │ │ ├── u8g_dev_ssd1322_nhd31oled_bw.c │ │ │ ├── u8g_dev_ssd1322_nhd31oled_gr.c │ │ │ ├── u8g_dev_ssd1325_nhd27oled_bw.c │ │ │ ├── u8g_dev_ssd1325_nhd27oled_bw_new.c │ │ │ ├── u8g_dev_ssd1325_nhd27oled_gr.c │ │ │ ├── u8g_dev_ssd1325_nhd27oled_gr_new.c │ │ │ ├── u8g_dev_ssd1327_96x96_gr.c │ │ │ ├── u8g_dev_st7565_64128n.c │ │ │ ├── u8g_dev_st7565_dogm128.c │ │ │ ├── u8g_dev_st7565_dogm132.c │ │ │ ├── u8g_dev_st7565_lm6059.c │ │ │ ├── u8g_dev_st7565_lm6063.c │ │ │ ├── u8g_dev_st7565_nhd_c12832.c │ │ │ ├── u8g_dev_st7565_nhd_c12864.c │ │ │ ├── u8g_dev_st7687_c144mvgd.c │ │ │ ├── u8g_dev_st7920_128x64.c │ │ │ ├── u8g_dev_st7920_192x32.c │ │ │ ├── u8g_dev_st7920_202x32.c │ │ │ ├── u8g_dev_t6963_128x64.c │ │ │ ├── u8g_dev_t6963_240x128.c │ │ │ ├── u8g_dev_t6963_240x64.c │ │ │ ├── u8g_dev_tls8204_84x48.c │ │ │ ├── u8g_dev_uc1610_dogxl160.c │ │ │ ├── u8g_dev_uc1701_dogs102.c │ │ │ ├── u8g_dev_uc1701_mini12864.c │ │ │ ├── u8g_ellipse.c │ │ │ ├── u8g_font.c │ │ │ ├── u8g_font_data.c │ │ │ ├── u8g_line.c │ │ │ ├── u8g_ll_api.c │ │ │ ├── u8g_page.c │ │ │ ├── u8g_pb.c │ │ │ ├── u8g_pb14v1.c │ │ │ ├── u8g_pb16h1.c │ │ │ ├── u8g_pb16h2.c │ │ │ ├── u8g_pb16v1.c │ │ │ ├── u8g_pb16v2.c │ │ │ ├── u8g_pb32h1.c │ │ │ ├── u8g_pb8h1.c │ │ │ ├── u8g_pb8h1f.c │ │ │ ├── u8g_pb8h2.c │ │ │ ├── u8g_pb8h8.c │ │ │ ├── u8g_pb8v1.c │ │ │ ├── u8g_pb8v2.c │ │ │ ├── u8g_rect.c │ │ │ ├── u8g_rot.c │ │ │ ├── u8g_scale.c │ │ │ ├── u8g_state.c │ │ │ ├── u8g_u16toa.c │ │ │ ├── u8g_u8toa.c │ │ │ └── u8g_virtual_screen.c │ ├── Arduino_1.0.x │ │ ├── hardware │ │ │ ├── OMC_tkj │ │ │ │ ├── boards.txt │ │ │ │ ├── bootloaders │ │ │ │ │ ├── OMC │ │ │ │ │ │ └── bootloader-644-20MHz.hex │ │ │ │ │ └── atmega644p │ │ │ │ │ │ ├── ATmegaBOOT.c │ │ │ │ │ │ ├── ATmegaBOOT_324P.hex │ │ │ │ │ │ ├── ATmegaBOOT_644.hex │ │ │ │ │ │ ├── ATmegaBOOT_644P.hex │ │ │ │ │ │ ├── Makefile │ │ │ │ │ │ └── README.txt │ │ │ │ └── variants │ │ │ │ │ └── sanguino │ │ │ │ │ └── pins_arduino.h │ │ │ ├── Sanguino │ │ │ │ ├── boards.txt │ │ │ │ ├── bootloaders │ │ │ │ │ ├── atmega │ │ │ │ │ │ ├── ATmegaBOOT_168.c │ │ │ │ │ │ ├── ATmegaBOOT_168_atmega1284p.hex │ │ │ │ │ │ ├── ATmegaBOOT_168_atmega1284p_8m.hex │ │ │ │ │ │ ├── ATmegaBOOT_168_atmega644p.hex │ │ │ │ │ │ └── Makefile │ │ │ │ │ └── atmega644p │ │ │ │ │ │ ├── ATmegaBOOT.c │ │ │ │ │ │ ├── ATmegaBOOT.c.tst │ │ │ │ │ │ ├── ATmegaBOOT_644P.elf │ │ │ │ │ │ ├── ATmegaBOOT_644P.hex │ │ │ │ │ │ ├── Makefile │ │ │ │ │ │ └── README.txt │ │ │ │ ├── cores │ │ │ │ │ └── arduino │ │ │ │ │ │ ├── Arduino.h │ │ │ │ │ │ ├── CDC.cpp │ │ │ │ │ │ ├── Client.h │ │ │ │ │ │ ├── HID.cpp │ │ │ │ │ │ ├── HardwareSerial.cpp │ │ │ │ │ │ ├── HardwareSerial.h │ │ │ │ │ │ ├── IPAddress.cpp │ │ │ │ │ │ ├── IPAddress.h │ │ │ │ │ │ ├── Platform.h │ │ │ │ │ │ ├── Print.cpp │ │ │ │ │ │ ├── Print.h │ │ │ │ │ │ ├── Printable.h │ │ │ │ │ │ ├── Server.h │ │ │ │ │ │ ├── Stream.cpp │ │ │ │ │ │ ├── Stream.h │ │ │ │ │ │ ├── Tone.cpp │ │ │ │ │ │ ├── USBAPI.h │ │ │ │ │ │ ├── USBCore.cpp │ │ │ │ │ │ ├── USBCore.h │ │ │ │ │ │ ├── USBDesc.h │ │ │ │ │ │ ├── Udp.h │ │ │ │ │ │ ├── WCharacter.h │ │ │ │ │ │ ├── WInterrupts.c │ │ │ │ │ │ ├── WMath.cpp │ │ │ │ │ │ ├── WString.cpp │ │ │ │ │ │ ├── WString.h │ │ │ │ │ │ ├── binary.h │ │ │ │ │ │ ├── main.cpp │ │ │ │ │ │ ├── new.cpp │ │ │ │ │ │ ├── new.h │ │ │ │ │ │ ├── wiring.c │ │ │ │ │ │ ├── wiring_analog.c │ │ │ │ │ │ ├── wiring_digital.c │ │ │ │ │ │ ├── wiring_private.h │ │ │ │ │ │ ├── wiring_pulse.c │ │ │ │ │ │ └── wiring_shift.c │ │ │ │ └── variants │ │ │ │ │ └── standard │ │ │ │ │ └── pins_arduino.h │ │ │ └── rambo │ │ │ │ ├── boards.txt │ │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ ├── Arduino.h │ │ │ │ │ ├── CDC.cpp │ │ │ │ │ ├── Client.h │ │ │ │ │ ├── HID.cpp │ │ │ │ │ ├── HardwareSerial.cpp │ │ │ │ │ ├── HardwareSerial.h │ │ │ │ │ ├── IPAddress.cpp │ │ │ │ │ ├── IPAddress.h │ │ │ │ │ ├── Platform.h │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ ├── Printable.h │ │ │ │ │ ├── Server.h │ │ │ │ │ ├── Stream.cpp │ │ │ │ │ ├── Stream.h │ │ │ │ │ ├── Tone.cpp │ │ │ │ │ ├── USBAPI.h │ │ │ │ │ ├── USBCore.cpp │ │ │ │ │ ├── USBCore.h │ │ │ │ │ ├── USBDesc.h │ │ │ │ │ ├── Udp.h │ │ │ │ │ ├── WCharacter.h │ │ │ │ │ ├── WInterrupts.c │ │ │ │ │ ├── WMath.cpp │ │ │ │ │ ├── WString.cpp │ │ │ │ │ ├── WString.h │ │ │ │ │ ├── binary.h │ │ │ │ │ ├── main.cpp │ │ │ │ │ ├── new.cpp │ │ │ │ │ ├── new.h │ │ │ │ │ ├── wiring.c │ │ │ │ │ ├── wiring_analog.c │ │ │ │ │ ├── wiring_digital.c │ │ │ │ │ ├── wiring_private.h │ │ │ │ │ ├── wiring_pulse.c │ │ │ │ │ └── wiring_shift.c │ │ │ │ └── variants │ │ │ │ └── standard │ │ │ │ └── pins_arduino.h │ │ └── libraries │ │ │ ├── LiquidCrystal │ │ │ ├── LiquidCrystal.cpp │ │ │ ├── LiquidCrystal.h │ │ │ └── keywords.txt │ │ │ ├── SPI │ │ │ ├── SPI.cpp │ │ │ ├── SPI.h │ │ │ └── keywords.txt │ │ │ └── U8glib │ │ │ ├── ChangeLog │ │ │ ├── INSTALL.TXT │ │ │ ├── U8glib.cpp │ │ │ ├── U8glib.h │ │ │ ├── examples │ │ │ ├── Bitmap │ │ │ │ └── Bitmap.pde │ │ │ ├── Chess │ │ │ │ └── Chess.pde │ │ │ ├── Console │ │ │ │ └── Console.pde │ │ │ ├── F │ │ │ │ └── F.pde │ │ │ ├── GraphicsTest │ │ │ │ └── GraphicsTest.pde │ │ │ ├── HelloWorld │ │ │ │ └── HelloWorld.pde │ │ │ ├── Menu │ │ │ │ └── Menu.pde │ │ │ ├── PrintTest │ │ │ │ └── PrintTest.pde │ │ │ ├── Rotation │ │ │ │ └── Rotation.pde │ │ │ ├── Scale │ │ │ │ └── Scale.pde │ │ │ ├── TextRotX │ │ │ │ └── TextRotX.pde │ │ │ ├── U8gLogo │ │ │ │ └── U8gLogo.pde │ │ │ └── XBM │ │ │ │ └── XBM.pde │ │ │ ├── license.txt │ │ │ └── utility │ │ │ ├── chessengine.c │ │ │ ├── u8g.h │ │ │ ├── u8g_bitmap.c │ │ │ ├── u8g_circle.c │ │ │ ├── u8g_clip.c │ │ │ ├── u8g_com_api.c │ │ │ ├── u8g_com_api_16gr.c │ │ │ ├── u8g_com_arduino_common.c │ │ │ ├── u8g_com_arduino_fast_parallel.c │ │ │ ├── u8g_com_arduino_hw_spi.c │ │ │ ├── u8g_com_arduino_no_en_parallel.c │ │ │ ├── u8g_com_arduino_parallel.c │ │ │ ├── u8g_com_arduino_port_d_wr.c │ │ │ ├── u8g_com_arduino_ssd_i2c.c │ │ │ ├── u8g_com_arduino_st7920_hw_spi.c │ │ │ ├── u8g_com_arduino_st7920_spi.c │ │ │ ├── u8g_com_arduino_std_sw_spi.c │ │ │ ├── u8g_com_arduino_sw_spi.c │ │ │ ├── u8g_com_arduino_t6963.c │ │ │ ├── u8g_com_atmega_hw_spi.c │ │ │ ├── u8g_com_atmega_parallel.c │ │ │ ├── u8g_com_atmega_st7920_hw_spi.c │ │ │ ├── u8g_com_atmega_st7920_spi.c │ │ │ ├── u8g_com_atmega_sw_spi.c │ │ │ ├── u8g_com_i2c.c │ │ │ ├── u8g_com_io.c │ │ │ ├── u8g_com_null.c │ │ │ ├── u8g_cursor.c │ │ │ ├── u8g_delay.c │ │ │ ├── u8g_dev_flipdisc_2x7.c │ │ │ ├── u8g_dev_gprof.c │ │ │ ├── u8g_dev_ili9325d_320x240.c │ │ │ ├── u8g_dev_ks0108_128x64.c │ │ │ ├── u8g_dev_lc7981_160x80.c │ │ │ ├── u8g_dev_lc7981_240x128.c │ │ │ ├── u8g_dev_lc7981_240x64.c │ │ │ ├── u8g_dev_lc7981_320x64.c │ │ │ ├── u8g_dev_null.c │ │ │ ├── u8g_dev_pcd8544_84x48.c │ │ │ ├── u8g_dev_pcf8812_96x65.c │ │ │ ├── u8g_dev_sbn1661_122x32.c │ │ │ ├── u8g_dev_ssd1306_128x32.c │ │ │ ├── u8g_dev_ssd1306_128x64.c │ │ │ ├── u8g_dev_ssd1309_128x64.c │ │ │ ├── u8g_dev_ssd1322_nhd31oled_bw.c │ │ │ ├── u8g_dev_ssd1322_nhd31oled_gr.c │ │ │ ├── u8g_dev_ssd1325_nhd27oled_bw.c │ │ │ ├── u8g_dev_ssd1325_nhd27oled_bw_new.c │ │ │ ├── u8g_dev_ssd1325_nhd27oled_gr.c │ │ │ ├── u8g_dev_ssd1325_nhd27oled_gr_new.c │ │ │ ├── u8g_dev_ssd1327_96x96_gr.c │ │ │ ├── u8g_dev_st7565_64128n.c │ │ │ ├── u8g_dev_st7565_dogm128.c │ │ │ ├── u8g_dev_st7565_dogm132.c │ │ │ ├── u8g_dev_st7565_lm6059.c │ │ │ ├── u8g_dev_st7565_lm6063.c │ │ │ ├── u8g_dev_st7565_nhd_c12832.c │ │ │ ├── u8g_dev_st7565_nhd_c12864.c │ │ │ ├── u8g_dev_st7687_c144mvgd.c │ │ │ ├── u8g_dev_st7920_128x64.c │ │ │ ├── u8g_dev_st7920_192x32.c │ │ │ ├── u8g_dev_st7920_202x32.c │ │ │ ├── u8g_dev_t6963_128x64.c │ │ │ ├── u8g_dev_t6963_240x128.c │ │ │ ├── u8g_dev_t6963_240x64.c │ │ │ ├── u8g_dev_tls8204_84x48.c │ │ │ ├── u8g_dev_uc1610_dogxl160.c │ │ │ ├── u8g_dev_uc1701_dogs102.c │ │ │ ├── u8g_dev_uc1701_mini12864.c │ │ │ ├── u8g_ellipse.c │ │ │ ├── u8g_font.c │ │ │ ├── u8g_font_data.c │ │ │ ├── u8g_line.c │ │ │ ├── u8g_ll_api.c │ │ │ ├── u8g_page.c │ │ │ ├── u8g_pb.c │ │ │ ├── u8g_pb14v1.c │ │ │ ├── u8g_pb16h1.c │ │ │ ├── u8g_pb16h2.c │ │ │ ├── u8g_pb16v1.c │ │ │ ├── u8g_pb16v2.c │ │ │ ├── u8g_pb32h1.c │ │ │ ├── u8g_pb8h1.c │ │ │ ├── u8g_pb8h1f.c │ │ │ ├── u8g_pb8h2.c │ │ │ ├── u8g_pb8h8.c │ │ │ ├── u8g_pb8v1.c │ │ │ ├── u8g_pb8v2.c │ │ │ ├── u8g_rect.c │ │ │ ├── u8g_rot.c │ │ │ ├── u8g_scale.c │ │ │ ├── u8g_state.c │ │ │ ├── u8g_u16toa.c │ │ │ ├── u8g_u8toa.c │ │ │ └── u8g_virtual_screen.c │ ├── Arduino_1.5.x │ │ └── hardware │ │ │ └── marlin │ │ │ └── avr │ │ │ ├── boards.txt │ │ │ ├── bootloaders │ │ │ └── atmega │ │ │ │ ├── ATmegaBOOT_168.c │ │ │ │ ├── ATmegaBOOT_168_atmega1284p.hex │ │ │ │ ├── ATmegaBOOT_168_atmega1284p_8m.hex │ │ │ │ ├── ATmegaBOOT_168_atmega644p.hex │ │ │ │ └── Makefile │ │ │ ├── libraries │ │ │ └── U8glib │ │ │ │ ├── ChangeLog │ │ │ │ ├── INSTALL.TXT │ │ │ │ ├── U8glib.cpp │ │ │ │ ├── U8glib.h │ │ │ │ ├── examples │ │ │ │ ├── Bitmap │ │ │ │ │ └── Bitmap.pde │ │ │ │ ├── Chess │ │ │ │ │ └── Chess.pde │ │ │ │ ├── Console │ │ │ │ │ └── Console.pde │ │ │ │ ├── F │ │ │ │ │ └── F.pde │ │ │ │ ├── GraphicsTest │ │ │ │ │ └── GraphicsTest.pde │ │ │ │ ├── HelloWorld │ │ │ │ │ └── HelloWorld.pde │ │ │ │ ├── Menu │ │ │ │ │ └── Menu.pde │ │ │ │ ├── PrintTest │ │ │ │ │ └── PrintTest.pde │ │ │ │ ├── Rotation │ │ │ │ │ └── Rotation.pde │ │ │ │ ├── Scale │ │ │ │ │ └── Scale.pde │ │ │ │ ├── TextRotX │ │ │ │ │ └── TextRotX.pde │ │ │ │ ├── U8gLogo │ │ │ │ │ └── U8gLogo.pde │ │ │ │ └── XBM │ │ │ │ │ └── XBM.pde │ │ │ │ ├── license.txt │ │ │ │ └── utility │ │ │ │ ├── chessengine.c │ │ │ │ ├── u8g.h │ │ │ │ ├── u8g_bitmap.c │ │ │ │ ├── u8g_circle.c │ │ │ │ ├── u8g_clip.c │ │ │ │ ├── u8g_com_api.c │ │ │ │ ├── u8g_com_api_16gr.c │ │ │ │ ├── u8g_com_arduino_common.c │ │ │ │ ├── u8g_com_arduino_fast_parallel.c │ │ │ │ ├── u8g_com_arduino_hw_spi.c │ │ │ │ ├── u8g_com_arduino_no_en_parallel.c │ │ │ │ ├── u8g_com_arduino_parallel.c │ │ │ │ ├── u8g_com_arduino_port_d_wr.c │ │ │ │ ├── u8g_com_arduino_ssd_i2c.c │ │ │ │ ├── u8g_com_arduino_st7920_hw_spi.c │ │ │ │ ├── u8g_com_arduino_st7920_spi.c │ │ │ │ ├── u8g_com_arduino_std_sw_spi.c │ │ │ │ ├── u8g_com_arduino_sw_spi.c │ │ │ │ ├── u8g_com_arduino_t6963.c │ │ │ │ ├── u8g_com_atmega_hw_spi.c │ │ │ │ ├── u8g_com_atmega_parallel.c │ │ │ │ ├── u8g_com_atmega_st7920_hw_spi.c │ │ │ │ ├── u8g_com_atmega_st7920_spi.c │ │ │ │ ├── u8g_com_atmega_sw_spi.c │ │ │ │ ├── u8g_com_i2c.c │ │ │ │ ├── u8g_com_io.c │ │ │ │ ├── u8g_com_null.c │ │ │ │ ├── u8g_cursor.c │ │ │ │ ├── u8g_delay.c │ │ │ │ ├── u8g_dev_flipdisc_2x7.c │ │ │ │ ├── u8g_dev_gprof.c │ │ │ │ ├── u8g_dev_ili9325d_320x240.c │ │ │ │ ├── u8g_dev_ks0108_128x64.c │ │ │ │ ├── u8g_dev_lc7981_160x80.c │ │ │ │ ├── u8g_dev_lc7981_240x128.c │ │ │ │ ├── u8g_dev_lc7981_240x64.c │ │ │ │ ├── u8g_dev_lc7981_320x64.c │ │ │ │ ├── u8g_dev_null.c │ │ │ │ ├── u8g_dev_pcd8544_84x48.c │ │ │ │ ├── u8g_dev_pcf8812_96x65.c │ │ │ │ ├── u8g_dev_sbn1661_122x32.c │ │ │ │ ├── u8g_dev_ssd1306_128x32.c │ │ │ │ ├── u8g_dev_ssd1306_128x64.c │ │ │ │ ├── u8g_dev_ssd1309_128x64.c │ │ │ │ ├── u8g_dev_ssd1322_nhd31oled_bw.c │ │ │ │ ├── u8g_dev_ssd1322_nhd31oled_gr.c │ │ │ │ ├── u8g_dev_ssd1325_nhd27oled_bw.c │ │ │ │ ├── u8g_dev_ssd1325_nhd27oled_bw_new.c │ │ │ │ ├── u8g_dev_ssd1325_nhd27oled_gr.c │ │ │ │ ├── u8g_dev_ssd1325_nhd27oled_gr_new.c │ │ │ │ ├── u8g_dev_ssd1327_96x96_gr.c │ │ │ │ ├── u8g_dev_st7565_64128n.c │ │ │ │ ├── u8g_dev_st7565_dogm128.c │ │ │ │ ├── u8g_dev_st7565_dogm132.c │ │ │ │ ├── u8g_dev_st7565_lm6059.c │ │ │ │ ├── u8g_dev_st7565_lm6063.c │ │ │ │ ├── u8g_dev_st7565_nhd_c12832.c │ │ │ │ ├── u8g_dev_st7565_nhd_c12864.c │ │ │ │ ├── u8g_dev_st7687_c144mvgd.c │ │ │ │ ├── u8g_dev_st7920_128x64.c │ │ │ │ ├── u8g_dev_st7920_192x32.c │ │ │ │ ├── u8g_dev_st7920_202x32.c │ │ │ │ ├── u8g_dev_t6963_128x64.c │ │ │ │ ├── u8g_dev_t6963_240x128.c │ │ │ │ ├── u8g_dev_t6963_240x64.c │ │ │ │ ├── u8g_dev_tls8204_84x48.c │ │ │ │ ├── u8g_dev_uc1610_dogxl160.c │ │ │ │ ├── u8g_dev_uc1701_dogs102.c │ │ │ │ ├── u8g_dev_uc1701_mini12864.c │ │ │ │ ├── u8g_ellipse.c │ │ │ │ ├── u8g_font.c │ │ │ │ ├── u8g_font_data.c │ │ │ │ ├── u8g_line.c │ │ │ │ ├── u8g_ll_api.c │ │ │ │ ├── u8g_page.c │ │ │ │ ├── u8g_pb.c │ │ │ │ ├── u8g_pb14v1.c │ │ │ │ ├── u8g_pb16h1.c │ │ │ │ ├── u8g_pb16h2.c │ │ │ │ ├── u8g_pb16v1.c │ │ │ │ ├── u8g_pb16v2.c │ │ │ │ ├── u8g_pb32h1.c │ │ │ │ ├── u8g_pb8h1.c │ │ │ │ ├── u8g_pb8h1f.c │ │ │ │ ├── u8g_pb8h2.c │ │ │ │ ├── u8g_pb8h8.c │ │ │ │ ├── u8g_pb8v1.c │ │ │ │ ├── u8g_pb8v2.c │ │ │ │ ├── u8g_rect.c │ │ │ │ ├── u8g_rot.c │ │ │ │ ├── u8g_scale.c │ │ │ │ ├── u8g_state.c │ │ │ │ ├── u8g_u16toa.c │ │ │ │ ├── u8g_u8toa.c │ │ │ │ └── u8g_virtual_screen.c │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ ├── rambo │ │ │ └── pins_arduino.h │ │ │ └── sanguino │ │ │ └── pins_arduino.h │ └── Arduino_1.x.x │ │ └── hardware │ │ ├── Gen7-dist │ │ ├── boards.txt │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Arduino.h │ │ │ │ ├── CDC.cpp │ │ │ │ ├── Client.h │ │ │ │ ├── HID.cpp │ │ │ │ ├── HardwareSerial.cpp │ │ │ │ ├── HardwareSerial.h │ │ │ │ ├── IPAddress.cpp │ │ │ │ ├── IPAddress.h │ │ │ │ ├── Platform.h │ │ │ │ ├── Print.cpp │ │ │ │ ├── Print.h │ │ │ │ ├── Printable.h │ │ │ │ ├── Server.h │ │ │ │ ├── Stream.cpp │ │ │ │ ├── Stream.h │ │ │ │ ├── Tone.cpp │ │ │ │ ├── USBAPI.h │ │ │ │ ├── USBCore.cpp │ │ │ │ ├── USBCore.h │ │ │ │ ├── USBDesc.h │ │ │ │ ├── Udp.h │ │ │ │ ├── WCharacter.h │ │ │ │ ├── WInterrupts.c │ │ │ │ ├── WMath.cpp │ │ │ │ ├── WString.cpp │ │ │ │ ├── WString.h │ │ │ │ ├── binary.h │ │ │ │ ├── main.cpp │ │ │ │ ├── new.cpp │ │ │ │ ├── new.h │ │ │ │ ├── wiring.c │ │ │ │ ├── wiring_analog.c │ │ │ │ ├── wiring_digital.c │ │ │ │ ├── wiring_private.h │ │ │ │ ├── wiring_pulse.c │ │ │ │ └── wiring_shift.c │ │ └── variants │ │ │ └── gen7 │ │ │ └── pins_arduino.h │ │ └── Melzi │ │ ├── boards.txt │ │ ├── bootloaders │ │ └── atmega644p │ │ │ ├── ATmegaBOOT.c │ │ │ ├── ATmegaBOOT_1284P.hex │ │ │ └── Makefile │ │ ├── cores │ │ └── arduino │ │ │ ├── Arduino.h │ │ │ ├── CDC.cpp │ │ │ ├── Client.h │ │ │ ├── HID.cpp │ │ │ ├── HardwareSerial.cpp │ │ │ ├── HardwareSerial.h │ │ │ ├── IPAddress.cpp │ │ │ ├── IPAddress.h │ │ │ ├── Platform.h │ │ │ ├── Print.cpp │ │ │ ├── Print.h │ │ │ ├── Printable.h │ │ │ ├── Server.h │ │ │ ├── Stream.cpp │ │ │ ├── Stream.h │ │ │ ├── Tone.cpp │ │ │ ├── USBAPI.h │ │ │ ├── USBCore.cpp │ │ │ ├── USBCore.h │ │ │ ├── USBDesc.h │ │ │ ├── Udp.h │ │ │ ├── WCharacter.h │ │ │ ├── WInterrupts.c │ │ │ ├── WMath.cpp │ │ │ ├── WString.cpp │ │ │ ├── WString.h │ │ │ ├── binary.h │ │ │ ├── main.cpp │ │ │ ├── new.cpp │ │ │ ├── new.h │ │ │ ├── wiring.c │ │ │ ├── wiring_analog.c │ │ │ ├── wiring_digital.c │ │ │ ├── wiring_private.h │ │ │ ├── wiring_pulse.c │ │ │ └── wiring_shift.c │ │ └── variants │ │ └── standard │ │ └── pins_arduino.h └── Marlin │ ├── BlinkM.cpp │ ├── BlinkM.h │ ├── Configuration.h │ ├── ConfigurationStore.cpp │ ├── ConfigurationStore.h │ ├── Configuration_adv.h │ ├── DOGMbitmaps.h │ ├── LiquidCrystalRus.cpp │ ├── LiquidCrystalRus.h │ ├── Makefile │ ├── Marlin.h │ ├── Marlin.ino │ ├── Marlin.pde │ ├── MarlinSerial.cpp │ ├── MarlinSerial.h │ ├── Marlin_main.cpp │ ├── Sd2Card.cpp │ ├── Sd2Card.h │ ├── Sd2PinMap.h │ ├── SdBaseFile.cpp │ ├── SdBaseFile.h │ ├── SdFatConfig.h │ ├── SdFatStructs.h │ ├── SdFatUtil.cpp │ ├── SdFatUtil.h │ ├── SdFile.cpp │ ├── SdFile.h │ ├── SdInfo.h │ ├── SdVolume.cpp │ ├── SdVolume.h │ ├── Servo.cpp │ ├── Servo.h │ ├── boards.h │ ├── cardreader.cpp │ ├── cardreader.h │ ├── digipot_mcp4451.cpp │ ├── dogm_font_data_marlin.h │ ├── dogm_lcd_implementation.h │ ├── example_configurations │ ├── SCARA │ │ ├── Configuration.h │ │ └── Configuration_adv.h │ ├── delta │ │ ├── Configuration.h │ │ └── Configuration_adv.h │ ├── makibox │ │ ├── Configuration.h │ │ └── Configuration_adv.h │ └── tvrrug │ │ └── Round2 │ │ ├── Configuration.h │ │ └── Configuration_adv.h │ ├── fastio.h │ ├── language.h │ ├── language_an.h │ ├── language_ca.h │ ├── language_de.h │ ├── language_en.h │ ├── language_es.h │ ├── language_eu.h │ ├── language_fi.h │ ├── language_fr.h │ ├── language_it.h │ ├── language_nl.h │ ├── language_pl.h │ ├── language_pt.h │ ├── language_ru.h │ ├── motion_control.cpp │ ├── motion_control.h │ ├── pins.h │ ├── planner.cpp │ ├── planner.h │ ├── qr_solve.cpp │ ├── qr_solve.h │ ├── scripts │ ├── createSpeedLookupTable.py │ └── createTemperatureLookupMarlin.py │ ├── speed_lookuptable.h │ ├── stepper.cpp │ ├── stepper.h │ ├── temperature.cpp │ ├── temperature.h │ ├── thermistortables.h │ ├── ultralcd.cpp │ ├── ultralcd.h │ ├── ultralcd_implementation_hitachi_HD44780.h │ ├── ultralcd_st7920_u8glib_rrd.h │ ├── vector_3.cpp │ ├── vector_3.h │ ├── watchdog.cpp │ └── watchdog.h ├── LICENSE ├── README.md └── SolidWorks ├── 1065_connect.SLDPRT ├── 1235_MainCennect.SLDPRT ├── 15mm_bracket.SLDPRT ├── 15mm_bracket_1.SLDPRT ├── 15mm_bracket_2.SLDPRT ├── 169_15mm.SLDPRT ├── 189 15mm.SLDPRT ├── 190_6mm.SLDPRT ├── 19155 15mm.SLDPRT ├── 2047_6mm.SLDPRT ├── 2523_15mm.SLDPRT ├── 2GT 16TOOCH.SLDPRT ├── 675_cennect.SLDPRT ├── 6807zz.SLDPRT ├── 690_connect.SLDPRT ├── 8MMLock.SLDPRT ├── DARM.SLDASM ├── E3D V1.6 固定上.SLDPRT ├── E3D V1.6 固定下.SLDPRT ├── E3D V1.6 风扇罩.SLDPRT ├── GT2 16Tooth.SLDPRT ├── GT2 18Tooth.SLDPRT ├── Gears_bottom.SLDPRT ├── SS-5GL.SLDPRT ├── arm2_corner1.SLDPRT ├── arm2_corner2.SLDPRT ├── arm2_end.SLDPRT ├── bottom.SLDPRT ├── bottomPlate1.SLDPRT ├── bottomPlate2.SLDPRT ├── bottomPlate3.SLDPRT ├── end1.SLDPRT ├── mainArmGear.SLDPRT ├── mainBracket.SLDPRT ├── mainEndstop.SLDPRT ├── newtriangle.SLDPRT ├── rod_ends.SLDPRT ├── secondArmGear685.SLDPRT ├── secondEndstop.SLDPRT ├── 激光座.SLDPRT └── 笔夹.SLDPRT /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/.DS_Store -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.* linguist-language=c++ 2 | 3 | -------------------------------------------------------------------------------- /Arduino/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/Arduino/.DS_Store -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen6/boards.txt: -------------------------------------------------------------------------------- 1 | ############################################################## 2 | 3 | Generation_Series.name=Gen6 & Gen6 Deluxe 4 | Generation_Series.upload.protocol=stk500 5 | Generation_Series.upload.maximum_size=63488 6 | Generation_Series.upload.speed=38400 7 | Generation_Series.bootloader.low_fuses=0xFF 8 | Generation_Series.bootloader.high_fuses=0xDC 9 | Generation_Series.bootloader.extended_fuses=0xFD 10 | Generation_Series.bootloader.path=atmega644p 11 | Generation_Series.bootloader.file=ATmegaBOOT_644P.hex 12 | Generation_Series.bootloader.unlock_bits=0x3F 13 | Generation_Series.bootloader.lock_bits=0x0F 14 | Generation_Series.build.mcu=atmega644p 15 | Generation_Series.build.f_cpu=16000000L 16 | Generation_Series.build.core=arduino 17 | 18 | 19 | ############################################################## 20 | 21 | 22 | Sanguinololu.name=Sanguinololu 1.2 and above 23 | Sanguinololu.upload.protocol=stk500 24 | Sanguinololu.upload.maximum_size=63488 25 | Sanguinololu.upload.speed=38400 26 | Sanguinololu.bootloader.low_fuses=0xFF 27 | Sanguinololu.bootloader.high_fuses=0xDC 28 | Sanguinololu.bootloader.extended_fuses=0xFD 29 | Sanguinololu.bootloader.path=atmega644p 30 | Sanguinololu.bootloader.file=ATmegaBOOT_644P.hex 31 | Sanguinololu.bootloader.unlock_bits=0x3F 32 | Sanguinololu.bootloader.lock_bits=0x0F 33 | Sanguinololu.build.mcu=atmega644p 34 | Sanguinololu.build.f_cpu=16000000L 35 | Sanguinololu.build.core=arduino 36 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen6/bootloaders/atmega644p/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for ATmegaBOOT 2 | # E.Lins, 18.7.2005 3 | # $Id$ 4 | 5 | 6 | # program name should not be changed... 7 | PROGRAM = ATmegaBOOT_644P 8 | 9 | # enter the target CPU frequency 10 | AVR_FREQ = 16000000L 11 | 12 | MCU_TARGET = atmega644p 13 | LDSECTION = --section-start=.text=0xF800 14 | 15 | OBJ = $(PROGRAM).o 16 | OPTIMIZE = -O2 17 | 18 | DEFS = 19 | LIBS = 20 | 21 | CC = avr-gcc 22 | 23 | 24 | # Override is only needed by avr-lib build system. 25 | 26 | override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS) 27 | override LDFLAGS = -Wl,$(LDSECTION) 28 | #override LDFLAGS = -Wl,-Map,$(PROGRAM).map,$(LDSECTION) 29 | 30 | OBJCOPY = avr-objcopy 31 | OBJDUMP = avr-objdump 32 | 33 | all: CFLAGS += '-DMAX_TIME_COUNT=8000000L>>1' -DADABOOT 34 | all: $(PROGRAM).hex 35 | 36 | $(PROGRAM).hex: $(PROGRAM).elf 37 | $(OBJCOPY) -j .text -j .data -O ihex $< $@ 38 | 39 | $(PROGRAM).elf: $(OBJ) 40 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) 41 | 42 | $(OBJ): ATmegaBOOT.c 43 | avr-gcc $(CFLAGS) $(LDFLAGS) -c -g -O2 -Wall -mmcu=$(MCU_TARGET) ATmegaBOOT.c -o $(PROGRAM).o 44 | 45 | %.lst: %.elf 46 | $(OBJDUMP) -h -S $< > $@ 47 | 48 | %.srec: %.elf 49 | $(OBJCOPY) -j .text -j .data -O srec $< $@ 50 | 51 | %.bin: %.elf 52 | $(OBJCOPY) -j .text -j .data -O binary $< $@ 53 | 54 | clean: 55 | rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex 56 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen6/bootloaders/atmega644p/README.txt: -------------------------------------------------------------------------------- 1 | Note: This bootloader support ATmega644, ATmega644P and ATmega324P. 2 | To build, set PROGRAM and MCU_TARGET in the Makefile according to your target device. 3 | 4 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen6/cores/arduino/Arduino.h: -------------------------------------------------------------------------------- 1 | #include "WProgram.h" 2 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen6/cores/arduino/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Print.h - Base class that provides print() and println() 3 | Copyright (c) 2008 David A. Mellis. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef Print_h 21 | #define Print_h 22 | 23 | #include 24 | #include // for size_t 25 | 26 | #include "WString.h" 27 | 28 | #define DEC 10 29 | #define HEX 16 30 | #define OCT 8 31 | #define BIN 2 32 | #define BYTE 0 33 | 34 | class Print 35 | { 36 | private: 37 | void printNumber(unsigned long, uint8_t); 38 | void printFloat(double, uint8_t); 39 | public: 40 | 41 | // 42 | // Drakelive 2012-09-04 43 | // 44 | #if ARDUINO >= 100 45 | virtual size_t write(uint8_t) = 0; 46 | #else 47 | virtual void write(uint8_t) = 0; 48 | #endif 49 | 50 | // Drakelive 2012-09-04 51 | 52 | virtual void write(const char *str); 53 | virtual void write(const uint8_t *buffer, size_t size); 54 | 55 | void print(const String &); 56 | void print(const char[]); 57 | void print(char, int = BYTE); 58 | void print(unsigned char, int = BYTE); 59 | void print(int, int = DEC); 60 | void print(unsigned int, int = DEC); 61 | void print(long, int = DEC); 62 | void print(unsigned long, int = DEC); 63 | void print(double, int = 2); 64 | 65 | void println(const String &s); 66 | void println(const char[]); 67 | void println(char, int = BYTE); 68 | void println(unsigned char, int = BYTE); 69 | void println(int, int = DEC); 70 | void println(unsigned int, int = DEC); 71 | void println(long, int = DEC); 72 | void println(unsigned long, int = DEC); 73 | void println(double, int = 2); 74 | void println(void); 75 | }; 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen6/cores/arduino/Stream.h: -------------------------------------------------------------------------------- 1 | /* 2 | Stream.h - base class for character-based streams. 3 | Copyright (c) 2010 David A. Mellis. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef Stream_h 21 | #define Stream_h 22 | 23 | #include 24 | #include "Print.h" 25 | 26 | class Stream : public Print 27 | { 28 | public: 29 | virtual int available() = 0; 30 | virtual int read() = 0; 31 | virtual int peek() = 0; 32 | virtual void flush() = 0; 33 | }; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen6/cores/arduino/WConstants.h: -------------------------------------------------------------------------------- 1 | #include "wiring.h" 2 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen6/cores/arduino/WMath.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | 3 | /* 4 | Part of the Wiring project - http://wiring.org.co 5 | Copyright (c) 2004-06 Hernando Barragan 6 | Modified 13 August 2006, David A. Mellis for Arduino - http://www.arduino.cc/ 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id$ 24 | */ 25 | 26 | extern "C" { 27 | #include "stdlib.h" 28 | } 29 | 30 | void randomSeed(unsigned int seed) 31 | { 32 | if (seed != 0) { 33 | srandom(seed); 34 | } 35 | } 36 | 37 | long random(long howbig) 38 | { 39 | if (howbig == 0) { 40 | return 0; 41 | } 42 | return random() % howbig; 43 | } 44 | 45 | long random(long howsmall, long howbig) 46 | { 47 | if (howsmall >= howbig) { 48 | return howsmall; 49 | } 50 | long diff = howbig - howsmall; 51 | return random(diff) + howsmall; 52 | } 53 | 54 | long map(long x, long in_min, long in_max, long out_min, long out_max) 55 | { 56 | return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; 57 | } 58 | 59 | unsigned int makeWord(unsigned int w) { return w; } 60 | unsigned int makeWord(unsigned char h, unsigned char l) { return (h << 8) | l; } -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen6/cores/arduino/WProgram.h: -------------------------------------------------------------------------------- 1 | #ifndef WProgram_h 2 | #define WProgram_h 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | #include "wiring.h" 11 | 12 | #ifdef __cplusplus 13 | #include "WCharacter.h" 14 | #include "WString.h" 15 | #include "HardwareSerial.h" 16 | 17 | uint16_t makeWord(uint16_t w); 18 | uint16_t makeWord(byte h, byte l); 19 | 20 | #define word(...) makeWord(__VA_ARGS__) 21 | 22 | unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L); 23 | 24 | void tone(uint8_t _pin, unsigned int frequency, unsigned long duration = 0); 25 | void noTone(uint8_t _pin); 26 | 27 | // WMath prototypes 28 | long random(long); 29 | long random(long, long); 30 | void randomSeed(unsigned int); 31 | long map(long, long, long, long, long); 32 | 33 | #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) 34 | const static uint8_t A0 = 54; 35 | const static uint8_t A1 = 55; 36 | const static uint8_t A2 = 56; 37 | const static uint8_t A3 = 57; 38 | const static uint8_t A4 = 58; 39 | const static uint8_t A5 = 59; 40 | const static uint8_t A6 = 60; 41 | const static uint8_t A7 = 61; 42 | const static uint8_t A8 = 62; 43 | const static uint8_t A9 = 63; 44 | const static uint8_t A10 = 64; 45 | const static uint8_t A11 = 65; 46 | const static uint8_t A12 = 66; 47 | const static uint8_t A13 = 67; 48 | const static uint8_t A14 = 68; 49 | const static uint8_t A15 = 69; 50 | #else 51 | const static uint8_t A0 = 14; 52 | const static uint8_t A1 = 15; 53 | const static uint8_t A2 = 16; 54 | const static uint8_t A3 = 17; 55 | const static uint8_t A4 = 18; 56 | const static uint8_t A5 = 19; 57 | const static uint8_t A6 = 20; 58 | const static uint8_t A7 = 21; 59 | #endif 60 | 61 | #endif 62 | 63 | #endif -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen6/cores/arduino/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | init(); 6 | 7 | setup(); 8 | 9 | for (;;) 10 | loop(); 11 | 12 | return 0; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen6/cores/arduino/wiring_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | wiring_private.h - Internal header file. 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2005-2006 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | $Id: wiring.h 239 2007-01-12 17:58:39Z mellis $ 23 | */ 24 | 25 | #ifndef WiringPrivate_h 26 | #define WiringPrivate_h 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | #include "wiring.h" 35 | 36 | #ifdef __cplusplus 37 | extern "C"{ 38 | #endif 39 | 40 | #ifndef cbi 41 | #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) 42 | #endif 43 | #ifndef sbi 44 | #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) 45 | #endif 46 | 47 | #define EXTERNAL_INT_0 0 48 | #define EXTERNAL_INT_1 1 49 | #define EXTERNAL_INT_2 2 50 | #define EXTERNAL_INT_3 3 51 | #define EXTERNAL_INT_4 4 52 | #define EXTERNAL_INT_5 5 53 | #define EXTERNAL_INT_6 6 54 | #define EXTERNAL_INT_7 7 55 | 56 | #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) 57 | #define EXTERNAL_NUM_INTERRUPTS 8 58 | #else 59 | #define EXTERNAL_NUM_INTERRUPTS 2 60 | #endif 61 | 62 | typedef void (*voidFuncPtr)(void); 63 | 64 | #ifdef __cplusplus 65 | } // extern "C" 66 | #endif 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen6/cores/arduino/wiring_shift.c: -------------------------------------------------------------------------------- 1 | /* 2 | wiring_shift.c - shiftOut() function 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2005-2006 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | $Id: wiring.c 248 2007-02-03 15:36:30Z mellis $ 23 | */ 24 | 25 | #include "wiring_private.h" 26 | 27 | uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder) { 28 | uint8_t value = 0; 29 | uint8_t i; 30 | 31 | for (i = 0; i < 8; ++i) { 32 | digitalWrite(clockPin, HIGH); 33 | if (bitOrder == LSBFIRST) 34 | value |= digitalRead(dataPin) << i; 35 | else 36 | value |= digitalRead(dataPin) << (7 - i); 37 | digitalWrite(clockPin, LOW); 38 | } 39 | return value; 40 | } 41 | 42 | void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val) 43 | { 44 | uint8_t i; 45 | 46 | for (i = 0; i < 8; i++) { 47 | if (bitOrder == LSBFIRST) 48 | digitalWrite(dataPin, !!(val & (1 << i))); 49 | else 50 | digitalWrite(dataPin, !!(val & (1 << (7 - i)))); 51 | 52 | digitalWrite(clockPin, HIGH); 53 | digitalWrite(clockPin, LOW); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen7/cores/arduino/HardwareSerial.h: -------------------------------------------------------------------------------- 1 | /* 2 | HardwareSerial.h - Hardware serial library for Wiring 3 | Copyright (c) 2006 Nicholas Zambetti. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef HardwareSerial_h 21 | #define HardwareSerial_h 22 | 23 | #include 24 | 25 | #include "Print.h" 26 | 27 | struct ring_buffer; 28 | 29 | class HardwareSerial : public Print 30 | { 31 | private: 32 | ring_buffer *_rx_buffer; 33 | volatile uint8_t *_ubrrh; 34 | volatile uint8_t *_ubrrl; 35 | volatile uint8_t *_ucsra; 36 | volatile uint8_t *_ucsrb; 37 | volatile uint8_t *_udr; 38 | uint8_t _rxen; 39 | uint8_t _txen; 40 | uint8_t _rxcie; 41 | uint8_t _udre; 42 | uint8_t _u2x; 43 | public: 44 | HardwareSerial(ring_buffer *rx_buffer, 45 | volatile uint8_t *ubrrh, volatile uint8_t *ubrrl, 46 | volatile uint8_t *ucsra, volatile uint8_t *ucsrb, 47 | volatile uint8_t *udr, 48 | uint8_t rxen, uint8_t txen, uint8_t rxcie, uint8_t udre, uint8_t u2x); 49 | void begin(long); 50 | void end(); 51 | uint8_t available(void); 52 | int read(void); 53 | void flush(void); 54 | virtual void write(uint8_t); 55 | using Print::write; // pull in write(str) and write(buf, size) from Print 56 | }; 57 | 58 | extern HardwareSerial Serial; 59 | 60 | #if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1280__) 61 | extern HardwareSerial Serial1; 62 | #endif 63 | 64 | #if defined(__AVR_ATmega1280__) 65 | extern HardwareSerial Serial2; 66 | extern HardwareSerial Serial3; 67 | #endif 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen7/cores/arduino/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Print.h - Base class that provides print() and println() 3 | Copyright (c) 2008 David A. Mellis. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef Print_h 21 | #define Print_h 22 | 23 | #include 24 | 25 | #define DEC 10 26 | #define HEX 16 27 | #define OCT 8 28 | #define BIN 2 29 | #define BYTE 0 30 | 31 | class Print 32 | { 33 | private: 34 | void printNumber(unsigned long, uint8_t); 35 | void printFloat(double, uint8_t); 36 | public: 37 | virtual void write(uint8_t); 38 | void print(char); 39 | void print(const char[]); 40 | void print(uint8_t); 41 | void print(int); 42 | void print(unsigned int); 43 | void print(long); 44 | void print(unsigned long); 45 | void print(long, int); 46 | void print(double); 47 | void println(void); 48 | void println(char); 49 | void println(const char[]); 50 | void println(uint8_t); 51 | void println(int); 52 | void println(unsigned int); 53 | void println(long); 54 | void println(unsigned long); 55 | void println(long, int); 56 | void println(double); 57 | }; 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen7/cores/arduino/WConstants.h: -------------------------------------------------------------------------------- 1 | #include "wiring.h" 2 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen7/cores/arduino/WInterrupts.c: -------------------------------------------------------------------------------- 1 | /* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | 3 | /* 4 | Part of the Wiring project - http://wiring.uniandes.edu.co 5 | 6 | Copyright (c) 2004-05 Hernando Barragan 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | Modified 24 November 2006 by David A. Mellis 24 | */ 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | #include "WConstants.h" 33 | #include "wiring_private.h" 34 | 35 | volatile static voidFuncPtr intFunc[EXTERNAL_NUM_INTERRUPTS]; 36 | // volatile static voidFuncPtr twiIntFunc; 37 | 38 | void attachInterrupt(uint8_t interruptNum, void (*userFunc)(void), int mode) 39 | { 40 | if(interruptNum < EXTERNAL_NUM_INTERRUPTS) 41 | { 42 | intFunc[interruptNum] = userFunc; 43 | 44 | //clear the config for the change settings 45 | EICRA &= ~(B00000011 << (interruptNum * 2)); 46 | 47 | //set our mode. 48 | EICRA |= (mode << (interruptNum * 2)); 49 | 50 | // Enable the interrupt. 51 | EIMSK |= (1 << interruptNum); 52 | } 53 | } 54 | 55 | void detachInterrupt(uint8_t interruptNum) 56 | { 57 | if(interruptNum < EXTERNAL_NUM_INTERRUPTS) 58 | { 59 | // Disable the interrupt. 60 | EIMSK &= ~(1 << interruptNum); 61 | 62 | intFunc[interruptNum] = 0; 63 | } 64 | } 65 | 66 | ISR(INT0_vect) { 67 | if(intFunc[EXTERNAL_INT_0]) 68 | intFunc[EXTERNAL_INT_0](); 69 | } 70 | 71 | ISR(INT1_vect) { 72 | if(intFunc[EXTERNAL_INT_1]) 73 | intFunc[EXTERNAL_INT_1](); 74 | } 75 | 76 | ISR(INT2_vect) { 77 | if(intFunc[EXTERNAL_INT_2]) 78 | intFunc[EXTERNAL_INT_2](); 79 | } 80 | 81 | /* 82 | SIGNAL(SIG_2WIRE_SERIAL) { 83 | if(twiIntFunc) 84 | twiIntFunc(); 85 | } 86 | */ 87 | 88 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen7/cores/arduino/WMath.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | 3 | /* 4 | Part of the Wiring project - http://wiring.org.co 5 | Copyright (c) 2004-06 Hernando Barragan 6 | Modified 13 August 2006, David A. Mellis for Arduino - http://www.arduino.cc/ 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id$ 24 | */ 25 | 26 | extern "C" { 27 | #include "stdlib.h" 28 | } 29 | 30 | void randomSeed(unsigned int seed) 31 | { 32 | if (seed != 0){ 33 | srandom(seed); 34 | } 35 | } 36 | 37 | long random(long howbig) 38 | { 39 | if (howbig == 0) { 40 | return 0; 41 | } 42 | return random() % howbig; 43 | } 44 | 45 | long random(long howsmall, long howbig) 46 | { 47 | if (howsmall >= howbig) { 48 | return howsmall; 49 | } 50 | long diff = howbig - howsmall; 51 | return random(diff) + howsmall; 52 | } 53 | 54 | long map(long x, long in_min, long in_max, long out_min, long out_max) 55 | { 56 | return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; 57 | } 58 | 59 | unsigned int makeWord(unsigned int w) { return w; } 60 | unsigned int makeWord(unsigned char h, unsigned char l) { return (h << 8) | l; } 61 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen7/cores/arduino/WProgram.h: -------------------------------------------------------------------------------- 1 | #ifndef WProgram_h 2 | #define WProgram_h 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | #include "wiring.h" 11 | 12 | #ifdef __cplusplus 13 | #include "WCharacter.h" 14 | #include "WString.h" 15 | #include "HardwareSerial.h" 16 | 17 | uint16_t makeWord(uint16_t w); 18 | uint16_t makeWord(byte h, byte l); 19 | 20 | #define word(...) makeWord(__VA_ARGS__) 21 | 22 | unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L); 23 | 24 | void tone(uint8_t _pin, unsigned int frequency, unsigned long duration = 0); 25 | void noTone(uint8_t _pin); 26 | 27 | // WMath prototypes 28 | long random(long); 29 | long random(long, long); 30 | void randomSeed(unsigned int); 31 | long map(long, long, long, long, long); 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen7/cores/arduino/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | init(); 6 | 7 | setup(); 8 | 9 | for (;;) 10 | loop(); 11 | 12 | return 0; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen7/cores/arduino/main.cxx: -------------------------------------------------------------------------------- 1 | int main(void) 2 | { 3 | init(); 4 | 5 | setup(); 6 | 7 | for (;;) 8 | loop(); 9 | 10 | return 0; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen7/cores/arduino/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | pins_arduino.h - Pin definition functions for Arduino 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2007 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ 23 | */ 24 | 25 | #ifndef Pins_Arduino_h 26 | #define Pins_Arduino_h 27 | 28 | #include 29 | 30 | #define NOT_A_PIN 0 31 | #define NOT_A_PORT 0 32 | 33 | #define NOT_ON_TIMER 0 34 | #define TIMER0A 1 35 | #define TIMER0B 2 36 | #define TIMER1A 3 37 | #define TIMER1B 4 38 | #define TIMER2 5 39 | #define TIMER2A 6 40 | #define TIMER2B 7 41 | 42 | extern const uint8_t PROGMEM port_to_mode_PGM[]; 43 | extern const uint8_t PROGMEM port_to_input_PGM[]; 44 | extern const uint8_t PROGMEM port_to_output_PGM[]; 45 | 46 | extern const uint8_t PROGMEM digital_pin_to_port_PGM[]; 47 | extern const uint8_t PROGMEM digital_pin_to_bit_PGM[]; 48 | extern const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[]; 49 | 50 | extern const uint8_t PROGMEM digital_pin_to_timer_PGM[]; 51 | 52 | // Get the bit location within the hardware port of the given virtual pin. 53 | // This comes from the pins_*.c file for the active board configuration. 54 | // 55 | // These perform slightly better as macros compared to inline functions 56 | // 57 | #define digitalPinToPort(P) ( pgm_read_byte( digital_pin_to_port_PGM + (P) ) ) 58 | #define digitalPinToBitMask(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM + (P) ) ) 59 | #define digitalPinToTimer(P) ( pgm_read_byte( digital_pin_to_timer_PGM + (P) ) ) 60 | #define analogInPinToBit(P) (P) 61 | #define portOutputRegister(P) ( (volatile uint8_t *)( pgm_read_byte( port_to_output_PGM + (P))) ) 62 | #define portInputRegister(P) ( (volatile uint8_t *)( pgm_read_byte( port_to_input_PGM + (P))) ) 63 | #define portModeRegister(P) ( (volatile uint8_t *)( pgm_read_byte( port_to_mode_PGM + (P))) ) 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen7/cores/arduino/wiring_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | wiring_private.h - Internal header file. 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2005-2006 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | $Id: wiring.h 239 2007-01-12 17:58:39Z mellis $ 23 | */ 24 | 25 | #ifndef WiringPrivate_h 26 | #define WiringPrivate_h 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | #include "wiring.h" 36 | 37 | #ifdef __cplusplus 38 | extern "C"{ 39 | #endif 40 | 41 | #ifndef cbi 42 | #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) 43 | #endif 44 | #ifndef sbi 45 | #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) 46 | #endif 47 | 48 | #define EXTERNAL_INT_0 0 49 | #define EXTERNAL_INT_1 1 50 | #define EXTERNAL_INT_2 2 51 | 52 | #define EXTERNAL_NUM_INTERRUPTS 3 53 | 54 | typedef void (*voidFuncPtr)(void); 55 | 56 | #ifdef __cplusplus 57 | } // extern "C" 58 | #endif 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Gen7/cores/arduino/wiring_shift.c: -------------------------------------------------------------------------------- 1 | /* 2 | wiring_shift.c - shiftOut() function 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2005-2006 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | $Id: wiring.c 248 2007-02-03 15:36:30Z mellis $ 23 | */ 24 | 25 | #include "wiring_private.h" 26 | 27 | void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, byte val) 28 | { 29 | int i; 30 | 31 | for (i = 0; i < 8; i++) { 32 | if (bitOrder == LSBFIRST) 33 | digitalWrite(dataPin, !!(val & (1 << i))); 34 | else 35 | digitalWrite(dataPin, !!(val & (1 << (7 - i)))); 36 | 37 | digitalWrite(clockPin, HIGH); 38 | digitalWrite(clockPin, LOW); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Sanguino/bootloaders/atmega1284p/optiboot_1284P_20MHz_57k6_baud.hex: -------------------------------------------------------------------------------- 1 | :020000021000EC 2 | :10FE00000F92CDB7DEB7112484B714BE81FFDFD0C7 3 | :10FE100082E08093C00088E18093C10086E08093F7 4 | :10FE2000C2008AE28093C4008EE0BBD0209A00E03A 5 | :10FE300010E0EE24E394E1E1DE2EF3E0FF2EA5D006 6 | :10FE4000813471F4A2D08983B2D08981823809F4D7 7 | :10FE50008BC0813811F484E001C083E08FD08BC067 8 | :10FE6000823411F484E103C0853419F485E0A7D00D 9 | :10FE700082C0853591F489D0A82EBB2486D0082F66 10 | :10FE800010E0102F00270A291B29812F881F88279F 11 | :10FE9000881F8BBF000F111F6DC0863521F484E0D1 12 | :10FEA0008ED080E0DBCF843609F040C06ED06DD0BC 13 | :10FEB000C82E6BD080EE0030180718F4F801F7BE9A 14 | :10FEC000E895A12C51E0B52E60D0F50181935F013A 15 | :10FED000CE16D1F7F0EE00301F0718F0F801F7BE8C 16 | :10FEE000E89565D007B600FCFDCFF801A0E0B1E0D1 17 | :10FEF0002C9130E011968C91119790E0982F8827E3 18 | :10FF0000822B932B12960C01E7BEE89511243296B2 19 | :10FF100082E0A030B80761F785E0F80187BFE89577 20 | :10FF200007B600FCFDCFD7BEE89525C08437A9F4FD 21 | :10FF30002CD02BD0B82E29D03AD0CB2C4801F401AC 22 | :10FF400086911CD00894811C911CCA94C1F70F5F44 23 | :10FF50001F4FBA940B0D111D0EC0853739F427D0F1 24 | :10FF60008EE10CD087E90AD085E078CF813511F495 25 | :10FF700088E017D01CD080E101D061CF9091C00003 26 | :10FF800095FFFCCF8093C60008958091C00087FF45 27 | :10FF9000FCCF8091C00084FD01C0A8958091C6006F 28 | :10FFA0000895E0E6F0E098E1908380830895EDDF26 29 | :10FFB000803219F088E0F5DFFFCF84E1DFCFCF9307 30 | :10FFC000C82FE3DFC150E9F7F2DFCF91089580E059 31 | :08FFD000E8DFEE27FF2709948A 32 | :040000031000FE00EB 33 | :00000001FF 34 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Sanguino/bootloaders/atmega1284p/pin_defs.h: -------------------------------------------------------------------------------- 1 | #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega88) || defined(__AVR_ATmega8__) || defined(__AVR_ATmega88__) 2 | /* Onboard LED is connected to pin PB5 in Arduino NG, Diecimila, and Duemilanove */ 3 | #define LED_DDR DDRB 4 | #define LED_PORT PORTB 5 | #define LED_PIN PINB 6 | #define LED PINB5 7 | 8 | /* Ports for soft UART */ 9 | #ifdef SOFT_UART 10 | #define UART_PORT PORTD 11 | #define UART_PIN PIND 12 | #define UART_DDR DDRD 13 | #define UART_TX_BIT 1 14 | #define UART_RX_BIT 0 15 | #endif 16 | #endif 17 | 18 | #if defined(__AVR_ATmega8__) 19 | //Name conversion R.Wiersma 20 | #define UCSR0A UCSRA 21 | #define UDR0 UDR 22 | #define UDRE0 UDRE 23 | #define RXC0 RXC 24 | #define FE0 FE 25 | #define TIFR1 TIFR 26 | #define WDTCSR WDTCR 27 | #endif 28 | 29 | /* Luminet support */ 30 | #if defined(__AVR_ATtiny84__) 31 | /* Red LED is connected to pin PA4 */ 32 | #define LED_DDR DDRA 33 | #define LED_PORT PORTA 34 | #define LED_PIN PINA 35 | #define LED PINA4 36 | /* Ports for soft UART - left port only for now. TX/RX on PA2/PA3 */ 37 | #ifdef SOFT_UART 38 | #define UART_PORT PORTA 39 | #define UART_PIN PINA 40 | #define UART_DDR DDRA 41 | #define UART_TX_BIT 2 42 | #define UART_RX_BIT 3 43 | #endif 44 | #endif 45 | 46 | /* Sanguino support */ 47 | #if defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__) 48 | /* Onboard LED is connected to pin PB0 on Sanguino */ 49 | #define LED_DDR DDRB 50 | #define LED_PORT PORTB 51 | #define LED_PIN PINB 52 | #define LED PINB0 53 | 54 | /* Ports for soft UART */ 55 | #ifdef SOFT_UART 56 | #define UART_PORT PORTD 57 | #define UART_PIN PIND 58 | #define UART_DDR DDRD 59 | #define UART_TX_BIT 1 60 | #define UART_RX_BIT 0 61 | #endif 62 | #endif 63 | 64 | /* Mega support */ 65 | #if defined(__AVR_ATmega1280__) 66 | /* Onboard LED is connected to pin PB7 on Arduino Mega */ 67 | #define LED_DDR DDRB 68 | #define LED_PORT PORTB 69 | #define LED_PIN PINB 70 | #define LED PINB7 71 | 72 | /* Ports for soft UART */ 73 | #ifdef SOFT_UART 74 | #define UART_PORT PORTE 75 | #define UART_PIN PINE 76 | #define UART_DDR DDRE 77 | #define UART_TX_BIT 1 78 | #define UART_RX_BIT 0 79 | #endif 80 | #endif 81 | 82 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Sanguino/bootloaders/atmega1284p/stk500.h: -------------------------------------------------------------------------------- 1 | /* STK500 constants list, from AVRDUDE */ 2 | #define STK_OK 0x10 3 | #define STK_FAILED 0x11 // Not used 4 | #define STK_UNKNOWN 0x12 // Not used 5 | #define STK_NODEVICE 0x13 // Not used 6 | #define STK_INSYNC 0x14 // ' ' 7 | #define STK_NOSYNC 0x15 // Not used 8 | #define ADC_CHANNEL_ERROR 0x16 // Not used 9 | #define ADC_MEASURE_OK 0x17 // Not used 10 | #define PWM_CHANNEL_ERROR 0x18 // Not used 11 | #define PWM_ADJUST_OK 0x19 // Not used 12 | #define CRC_EOP 0x20 // 'SPACE' 13 | #define STK_GET_SYNC 0x30 // '0' 14 | #define STK_GET_SIGN_ON 0x31 // '1' 15 | #define STK_SET_PARAMETER 0x40 // '@' 16 | #define STK_GET_PARAMETER 0x41 // 'A' 17 | #define STK_SET_DEVICE 0x42 // 'B' 18 | #define STK_SET_DEVICE_EXT 0x45 // 'E' 19 | #define STK_ENTER_PROGMODE 0x50 // 'P' 20 | #define STK_LEAVE_PROGMODE 0x51 // 'Q' 21 | #define STK_CHIP_ERASE 0x52 // 'R' 22 | #define STK_CHECK_AUTOINC 0x53 // 'S' 23 | #define STK_LOAD_ADDRESS 0x55 // 'U' 24 | #define STK_UNIVERSAL 0x56 // 'V' 25 | #define STK_PROG_FLASH 0x60 // '`' 26 | #define STK_PROG_DATA 0x61 // 'a' 27 | #define STK_PROG_FUSE 0x62 // 'b' 28 | #define STK_PROG_LOCK 0x63 // 'c' 29 | #define STK_PROG_PAGE 0x64 // 'd' 30 | #define STK_PROG_FUSE_EXT 0x65 // 'e' 31 | #define STK_READ_FLASH 0x70 // 'p' 32 | #define STK_READ_DATA 0x71 // 'q' 33 | #define STK_READ_FUSE 0x72 // 'r' 34 | #define STK_READ_LOCK 0x73 // 's' 35 | #define STK_READ_PAGE 0x74 // 't' 36 | #define STK_READ_SIGN 0x75 // 'u' 37 | #define STK_READ_OSCCAL 0x76 // 'v' 38 | #define STK_READ_FUSE_EXT 0x77 // 'w' 39 | #define STK_READ_OSCCAL_EXT 0x78 // 'x' 40 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Sanguino/bootloaders/atmega644p/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for ATmegaBOOT 2 | # E.Lins, 18.7.2005 3 | # $Id$ 4 | 5 | 6 | # program name should not be changed... 7 | PROGRAM = ATmegaBOOT_644P 8 | 9 | # enter the target CPU frequency 10 | AVR_FREQ = 16000000L 11 | 12 | MCU_TARGET = atmega644p 13 | LDSECTION = --section-start=.text=0xF800 14 | 15 | OBJ = $(PROGRAM).o 16 | OPTIMIZE = -O2 17 | 18 | DEFS = 19 | LIBS = 20 | 21 | CC = avr-gcc 22 | 23 | 24 | # Override is only needed by avr-lib build system. 25 | 26 | override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS) 27 | override LDFLAGS = -Wl,$(LDSECTION) 28 | #override LDFLAGS = -Wl,-Map,$(PROGRAM).map,$(LDSECTION) 29 | 30 | OBJCOPY = avr-objcopy 31 | OBJDUMP = avr-objdump 32 | 33 | all: CFLAGS += '-DMAX_TIME_COUNT=8000000L>>1' -DADABOOT 34 | all: $(PROGRAM).hex 35 | 36 | $(PROGRAM).hex: $(PROGRAM).elf 37 | $(OBJCOPY) -j .text -j .data -O ihex $< $@ 38 | 39 | $(PROGRAM).elf: $(OBJ) 40 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) 41 | 42 | $(OBJ): ATmegaBOOT.c 43 | avr-gcc $(CFLAGS) $(LDFLAGS) -c -g -O2 -Wall -mmcu=$(MCU_TARGET) ATmegaBOOT.c -o $(PROGRAM).o 44 | 45 | %.lst: %.elf 46 | $(OBJDUMP) -h -S $< > $@ 47 | 48 | %.srec: %.elf 49 | $(OBJCOPY) -j .text -j .data -O srec $< $@ 50 | 51 | %.bin: %.elf 52 | $(OBJCOPY) -j .text -j .data -O binary $< $@ 53 | 54 | clean: 55 | rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex 56 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Sanguino/bootloaders/atmega644p/README.txt: -------------------------------------------------------------------------------- 1 | Note: This bootloader support ATmega644, ATmega644P and ATmega324P. 2 | To build, set PROGRAM and MCU_TARGET in the Makefile according to your target device. 3 | 4 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Sanguino/cores/arduino/HardwareSerial.h: -------------------------------------------------------------------------------- 1 | /* 2 | HardwareSerial.h - Hardware serial library for Wiring 3 | Copyright (c) 2006 Nicholas Zambetti. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | Modified 28 September 2010 by Mark Sproul 20 | */ 21 | 22 | #ifndef HardwareSerial_h 23 | #define HardwareSerial_h 24 | 25 | #include 26 | 27 | #include "Stream.h" 28 | 29 | struct ring_buffer; 30 | 31 | class HardwareSerial : public Stream 32 | { 33 | private: 34 | ring_buffer *_rx_buffer; 35 | volatile uint8_t *_ubrrh; 36 | volatile uint8_t *_ubrrl; 37 | volatile uint8_t *_ucsra; 38 | volatile uint8_t *_ucsrb; 39 | volatile uint8_t *_udr; 40 | uint8_t _rxen; 41 | uint8_t _txen; 42 | uint8_t _rxcie; 43 | uint8_t _udre; 44 | uint8_t _u2x; 45 | public: 46 | HardwareSerial(ring_buffer *rx_buffer, 47 | volatile uint8_t *ubrrh, volatile uint8_t *ubrrl, 48 | volatile uint8_t *ucsra, volatile uint8_t *ucsrb, 49 | volatile uint8_t *udr, 50 | uint8_t rxen, uint8_t txen, uint8_t rxcie, uint8_t udre, uint8_t u2x); 51 | void begin(long); 52 | void end(); 53 | virtual int available(void); 54 | virtual int peek(void); 55 | virtual int read(void); 56 | virtual void flush(void); 57 | virtual void write(uint8_t); 58 | using Print::write; // pull in write(str) and write(buf, size) from Print 59 | }; 60 | 61 | #if defined(UBRRH) || defined(UBRR0H) 62 | extern HardwareSerial Serial; 63 | #elif defined(USBCON) 64 | #include "usb_api.h" 65 | #endif 66 | #if defined(UBRR1H) 67 | extern HardwareSerial Serial1; 68 | #endif 69 | #if defined(UBRR2H) 70 | extern HardwareSerial Serial2; 71 | #endif 72 | #if defined(UBRR3H) 73 | extern HardwareSerial Serial3; 74 | #endif 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Sanguino/cores/arduino/Print.h: -------------------------------------------------------------------------------- 1 | /* 2 | Print.h - Base class that provides print() and println() 3 | Copyright (c) 2008 David A. Mellis. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef Print_h 21 | #define Print_h 22 | 23 | #include 24 | #include // for size_t 25 | 26 | #include "WString.h" 27 | 28 | #define DEC 10 29 | #define HEX 16 30 | #define OCT 8 31 | #define BIN 2 32 | #define BYTE 0 33 | 34 | class Print 35 | { 36 | private: 37 | void printNumber(unsigned long, uint8_t); 38 | void printFloat(double, uint8_t); 39 | public: 40 | virtual void write(uint8_t) = 0; 41 | virtual void write(const char *str); 42 | virtual void write(const uint8_t *buffer, size_t size); 43 | 44 | void print(const String &); 45 | void print(const char[]); 46 | void print(char, int = BYTE); 47 | void print(unsigned char, int = BYTE); 48 | void print(int, int = DEC); 49 | void print(unsigned int, int = DEC); 50 | void print(long, int = DEC); 51 | void print(unsigned long, int = DEC); 52 | void print(double, int = 2); 53 | 54 | void println(const String &s); 55 | void println(const char[]); 56 | void println(char, int = BYTE); 57 | void println(unsigned char, int = BYTE); 58 | void println(int, int = DEC); 59 | void println(unsigned int, int = DEC); 60 | void println(long, int = DEC); 61 | void println(unsigned long, int = DEC); 62 | void println(double, int = 2); 63 | void println(void); 64 | }; 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Sanguino/cores/arduino/Stream.h: -------------------------------------------------------------------------------- 1 | /* 2 | Stream.h - base class for character-based streams. 3 | Copyright (c) 2010 David A. Mellis. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef Stream_h 21 | #define Stream_h 22 | 23 | #include 24 | #include "Print.h" 25 | 26 | class Stream : public Print 27 | { 28 | public: 29 | virtual int available() = 0; 30 | virtual int read() = 0; 31 | virtual int peek() = 0; 32 | virtual void flush() = 0; 33 | }; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Sanguino/cores/arduino/WConstants.h: -------------------------------------------------------------------------------- 1 | #include "wiring.h" 2 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Sanguino/cores/arduino/WMath.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | 3 | /* 4 | Part of the Wiring project - http://wiring.org.co 5 | Copyright (c) 2004-06 Hernando Barragan 6 | Modified 13 August 2006, David A. Mellis for Arduino - http://www.arduino.cc/ 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id$ 24 | */ 25 | 26 | extern "C" { 27 | #include "stdlib.h" 28 | } 29 | 30 | void randomSeed(unsigned int seed) 31 | { 32 | if (seed != 0) { 33 | srandom(seed); 34 | } 35 | } 36 | 37 | long random(long howbig) 38 | { 39 | if (howbig == 0) { 40 | return 0; 41 | } 42 | return random() % howbig; 43 | } 44 | 45 | long random(long howsmall, long howbig) 46 | { 47 | if (howsmall >= howbig) { 48 | return howsmall; 49 | } 50 | long diff = howbig - howsmall; 51 | return random(diff) + howsmall; 52 | } 53 | 54 | long map(long x, long in_min, long in_max, long out_min, long out_max) 55 | { 56 | return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; 57 | } 58 | 59 | unsigned int makeWord(unsigned int w) { return w; } 60 | unsigned int makeWord(unsigned char h, unsigned char l) { return (h << 8) | l; } -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Sanguino/cores/arduino/WProgram.h: -------------------------------------------------------------------------------- 1 | #ifndef WProgram_h 2 | #define WProgram_h 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | #include "wiring.h" 11 | 12 | #ifdef __cplusplus 13 | #include "WCharacter.h" 14 | #include "WString.h" 15 | #include "HardwareSerial.h" 16 | 17 | uint16_t makeWord(uint16_t w); 18 | uint16_t makeWord(byte h, byte l); 19 | 20 | #define word(...) makeWord(__VA_ARGS__) 21 | 22 | unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L); 23 | 24 | void tone(uint8_t _pin, unsigned int frequency, unsigned long duration = 0); 25 | void noTone(uint8_t _pin); 26 | 27 | // WMath prototypes 28 | long random(long); 29 | long random(long, long); 30 | void randomSeed(unsigned int); 31 | long map(long, long, long, long, long); 32 | 33 | #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) 34 | const static uint8_t A0 = 54; 35 | const static uint8_t A1 = 55; 36 | const static uint8_t A2 = 56; 37 | const static uint8_t A3 = 57; 38 | const static uint8_t A4 = 58; 39 | const static uint8_t A5 = 59; 40 | const static uint8_t A6 = 60; 41 | const static uint8_t A7 = 61; 42 | const static uint8_t A8 = 62; 43 | const static uint8_t A9 = 63; 44 | const static uint8_t A10 = 64; 45 | const static uint8_t A11 = 65; 46 | const static uint8_t A12 = 66; 47 | const static uint8_t A13 = 67; 48 | const static uint8_t A14 = 68; 49 | const static uint8_t A15 = 69; 50 | #else 51 | const static uint8_t A0 = 14; 52 | const static uint8_t A1 = 15; 53 | const static uint8_t A2 = 16; 54 | const static uint8_t A3 = 17; 55 | const static uint8_t A4 = 18; 56 | const static uint8_t A5 = 19; 57 | const static uint8_t A6 = 20; 58 | const static uint8_t A7 = 21; 59 | #endif 60 | 61 | #endif 62 | 63 | #endif -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Sanguino/cores/arduino/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | init(); 6 | 7 | setup(); 8 | 9 | for (;;) 10 | loop(); 11 | 12 | return 0; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Sanguino/cores/arduino/wiring_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | wiring_private.h - Internal header file. 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2005-2006 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | $Id: wiring.h 239 2007-01-12 17:58:39Z mellis $ 23 | */ 24 | 25 | #ifndef WiringPrivate_h 26 | #define WiringPrivate_h 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | #include "wiring.h" 35 | 36 | #ifdef __cplusplus 37 | extern "C"{ 38 | #endif 39 | 40 | #ifndef cbi 41 | #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) 42 | #endif 43 | #ifndef sbi 44 | #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) 45 | #endif 46 | 47 | #define EXTERNAL_INT_0 0 48 | #define EXTERNAL_INT_1 1 49 | #define EXTERNAL_INT_2 2 50 | #define EXTERNAL_INT_3 3 51 | #define EXTERNAL_INT_4 4 52 | #define EXTERNAL_INT_5 5 53 | #define EXTERNAL_INT_6 6 54 | #define EXTERNAL_INT_7 7 55 | 56 | #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) 57 | #define EXTERNAL_NUM_INTERRUPTS 8 58 | #elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__) 59 | #define EXTERNAL_NUM_INTERRUPTS 3 60 | #else 61 | #define EXTERNAL_NUM_INTERRUPTS 2 62 | #endif 63 | 64 | typedef void (*voidFuncPtr)(void); 65 | 66 | #ifdef __cplusplus 67 | } // extern "C" 68 | #endif 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Sanguino/cores/arduino/wiring_shift.c: -------------------------------------------------------------------------------- 1 | /* 2 | wiring_shift.c - shiftOut() function 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2005-2006 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | $Id: wiring.c 248 2007-02-03 15:36:30Z mellis $ 23 | */ 24 | 25 | #include "wiring_private.h" 26 | 27 | uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder) { 28 | uint8_t value = 0; 29 | uint8_t i; 30 | 31 | for (i = 0; i < 8; ++i) { 32 | digitalWrite(clockPin, HIGH); 33 | if (bitOrder == LSBFIRST) 34 | value |= digitalRead(dataPin) << i; 35 | else 36 | value |= digitalRead(dataPin) << (7 - i); 37 | digitalWrite(clockPin, LOW); 38 | } 39 | return value; 40 | } 41 | 42 | void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val) 43 | { 44 | uint8_t i; 45 | 46 | for (i = 0; i < 8; i++) { 47 | if (bitOrder == LSBFIRST) 48 | digitalWrite(dataPin, !!(val & (1 << i))); 49 | else 50 | digitalWrite(dataPin, !!(val & (1 << (7 - i)))); 51 | 52 | digitalWrite(clockPin, HIGH); 53 | digitalWrite(clockPin, LOW); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/Sanguino/programmers.txt: -------------------------------------------------------------------------------- 1 | avrisp.name=AVR ISP 2 | avrisp.communication=serial 3 | avrisp.protocol=stk500v1 4 | 5 | avrispmkii.name=AVRISP mkII 6 | avrispmkii.communication=usb 7 | avrispmkii.protocol=stk500v2 8 | 9 | usbtinyisp.name=USBtinyISP 10 | usbtinyisp.protocol=usbtiny 11 | 12 | parallel.name=Parallel Programmer 13 | parallel.protocol=dapa 14 | parallel.force=true 15 | # parallel.delay=200 16 | 17 | arduinoisp.name=Arduino as ISP 18 | arduinoisp.communication=serial 19 | arduinoisp.protocol=stk500v1 20 | arduinoisp.speed=19200 21 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/libraries/LiquidCrystal/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For LiquidCrystal 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | LiquidCrystal KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | begin KEYWORD2 16 | clear KEYWORD2 17 | home KEYWORD2 18 | print KEYWORD2 19 | setCursor KEYWORD2 20 | cursor KEYWORD2 21 | noCursor KEYWORD2 22 | blink KEYWORD2 23 | noBlink KEYWORD2 24 | display KEYWORD2 25 | noDisplay KEYWORD2 26 | autoscroll KEYWORD2 27 | noAutoscroll KEYWORD2 28 | leftToRight KEYWORD2 29 | rightToLeft KEYWORD2 30 | scrollDisplayLeft KEYWORD2 31 | scrollDisplayRight KEYWORD2 32 | createChar KEYWORD2 33 | 34 | ####################################### 35 | # Constants (LITERAL1) 36 | ####################################### 37 | 38 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/libraries/SPI/SPI.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 by Cristian Maglie 3 | * SPI Master library for arduino. 4 | * 5 | * This file is free software; you can redistribute it and/or modify 6 | * it under the terms of either the GNU General Public License version 2 7 | * or the GNU Lesser General Public License version 2.1, both as 8 | * published by the Free Software Foundation. 9 | */ 10 | 11 | #include "pins_arduino.h" 12 | #include "SPI.h" 13 | 14 | SPIClass SPI; 15 | 16 | void SPIClass::begin() { 17 | // Set direction register for SCK and MOSI pin. 18 | // MISO pin automatically overrides to INPUT. 19 | // When the SS pin is set as OUTPUT, it can be used as 20 | // a general purpose output port (it doesn't influence 21 | // SPI operations). 22 | 23 | pinMode(SCK, OUTPUT); 24 | pinMode(MOSI, OUTPUT); 25 | pinMode(SS, OUTPUT); 26 | 27 | digitalWrite(SCK, LOW); 28 | digitalWrite(MOSI, LOW); 29 | digitalWrite(SS, HIGH); 30 | 31 | // Warning: if the SS pin ever becomes a LOW INPUT then SPI 32 | // automatically switches to Slave, so the data direction of 33 | // the SS pin MUST be kept as OUTPUT. 34 | SPCR |= _BV(MSTR); 35 | SPCR |= _BV(SPE); 36 | } 37 | 38 | void SPIClass::end() { 39 | SPCR &= ~_BV(SPE); 40 | } 41 | 42 | void SPIClass::setBitOrder(uint8_t bitOrder) 43 | { 44 | if(bitOrder == LSBFIRST) { 45 | SPCR |= _BV(DORD); 46 | } else { 47 | SPCR &= ~(_BV(DORD)); 48 | } 49 | } 50 | 51 | void SPIClass::setDataMode(uint8_t mode) 52 | { 53 | SPCR = (SPCR & ~SPI_MODE_MASK) | mode; 54 | } 55 | 56 | void SPIClass::setClockDivider(uint8_t rate) 57 | { 58 | SPCR = (SPCR & ~SPI_CLOCK_MASK) | (rate & SPI_CLOCK_MASK); 59 | SPSR = (SPSR & ~SPI_2XCLOCK_MASK) | ((rate >> 2) & SPI_2XCLOCK_MASK); 60 | } 61 | 62 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/libraries/SPI/SPI.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 by Cristian Maglie 3 | * SPI Master library for arduino. 4 | * 5 | * This file is free software; you can redistribute it and/or modify 6 | * it under the terms of either the GNU General Public License version 2 7 | * or the GNU Lesser General Public License version 2.1, both as 8 | * published by the Free Software Foundation. 9 | */ 10 | 11 | #ifndef _SPI_H_INCLUDED 12 | #define _SPI_H_INCLUDED 13 | 14 | #include 15 | #include 16 | #include 17 | 18 | #define SPI_CLOCK_DIV4 0x00 19 | #define SPI_CLOCK_DIV16 0x01 20 | #define SPI_CLOCK_DIV64 0x02 21 | #define SPI_CLOCK_DIV128 0x03 22 | #define SPI_CLOCK_DIV2 0x04 23 | #define SPI_CLOCK_DIV8 0x05 24 | #define SPI_CLOCK_DIV32 0x06 25 | #define SPI_CLOCK_DIV64 0x07 26 | 27 | #define SPI_MODE0 0x00 28 | #define SPI_MODE1 0x04 29 | #define SPI_MODE2 0x08 30 | #define SPI_MODE3 0x0C 31 | 32 | #define SPI_MODE_MASK 0x0C // CPOL = bit 3, CPHA = bit 2 on SPCR 33 | #define SPI_CLOCK_MASK 0x03 // SPR1 = bit 1, SPR0 = bit 0 on SPCR 34 | #define SPI_2XCLOCK_MASK 0x01 // SPI2X = bit 0 on SPSR 35 | 36 | class SPIClass { 37 | public: 38 | inline static byte transfer(byte _data); 39 | 40 | // SPI Configuration methods 41 | 42 | inline static void attachInterrupt(); 43 | inline static void detachInterrupt(); // Default 44 | 45 | static void begin(); // Default 46 | static void end(); 47 | 48 | static void setBitOrder(uint8_t); 49 | static void setDataMode(uint8_t); 50 | static void setClockDivider(uint8_t); 51 | }; 52 | 53 | extern SPIClass SPI; 54 | 55 | byte SPIClass::transfer(byte _data) { 56 | SPDR = _data; 57 | while (!(SPSR & _BV(SPIF))) 58 | ; 59 | return SPDR; 60 | } 61 | 62 | void SPIClass::attachInterrupt() { 63 | SPCR |= _BV(SPIE); 64 | } 65 | 66 | void SPIClass::detachInterrupt() { 67 | SPCR &= ~_BV(SPIE); 68 | } 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/libraries/SPI/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map SPI 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SPI KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | begin KEYWORD2 15 | end KEYWORD2 16 | transfer KEYWORD2 17 | setBitOrder KEYWORD2 18 | setDataMode KEYWORD2 19 | setClockDivider KEYWORD2 20 | 21 | 22 | ####################################### 23 | # Constants (LITERAL1) 24 | ####################################### 25 | SPI_CLOCK_DIV4 LITERAL1 26 | SPI_CLOCK_DIV16 LITERAL1 27 | SPI_CLOCK_DIV64 LITERAL1 28 | SPI_CLOCK_DIV128 LITERAL1 29 | SPI_CLOCK_DIV2 LITERAL1 30 | SPI_CLOCK_DIV8 LITERAL1 31 | SPI_CLOCK_DIV32 LITERAL1 32 | SPI_CLOCK_DIV64 LITERAL1 33 | SPI_MODE0 LITERAL1 34 | SPI_MODE1 LITERAL1 35 | SPI_MODE2 LITERAL1 36 | SPI_MODE3 LITERAL1 -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/libraries/U8glib/INSTALL.TXT: -------------------------------------------------------------------------------- 1 | 2 | U8GLIB 3 | http://code.google.com/p/u8glib/ 4 | 5 | 6 | Install instructions for the Arduino environment. 7 | 8 | 1. Unzip u8glib_arduino_vX.XX.zip into the "libraries" folder 9 | 2. Start Arduino IDE 10 | 11 | Install instructions for the Chipkit (Arduino) environment. 12 | 13 | 1. cd /libraries 14 | 2. unzip u8glib_arduino_vX.XX.zip 15 | 3. cd ///hardware/pic32/libraries 16 | 4. again: u8glib_arduino_vX.XX.zip 17 | 5. Open hardware/pic32/cores/pic32/Print.h 18 | Remove line 19 | #define BYTE 0 20 | from the file, use PRINT_BYTE instead of BYTE. 21 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/libraries/U8glib/utility/chessengine.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/Arduino/ArduinoAddons/Arduino_0.xx/libraries/U8glib/utility/chessengine.c -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/libraries/U8glib/utility/u8g_com_arduino_common.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_com_arduino_common.c 4 | 5 | shared procedures for the arduino communication procedures 6 | 7 | Universal 8bit Graphics Library 8 | 9 | Copyright (c) 2011, olikraus@gmail.com 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without modification, 13 | are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this list 16 | of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright notice, this 19 | list of conditions and the following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 23 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 24 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 32 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 34 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | 37 | */ 38 | 39 | #include "u8g.h" 40 | 41 | #if defined(ARDUINO) 42 | 43 | #if ARDUINO < 100 44 | #include 45 | #else 46 | #include 47 | #endif 48 | 49 | void u8g_com_arduino_digital_write(u8g_t *u8g, uint8_t pin_index, uint8_t value) 50 | { 51 | uint8_t pin; 52 | pin = u8g->pin_list[pin_index]; 53 | if ( pin != U8G_PIN_NONE ) 54 | digitalWrite(pin, value); 55 | } 56 | 57 | /* this procedure does not set the RW pin */ 58 | void u8g_com_arduino_assign_pin_output_high(u8g_t *u8g) 59 | { 60 | uint8_t i; 61 | /* skip the RW pin, which is the last pin in the list */ 62 | for( i = 0; i < U8G_PIN_LIST_LEN-1; i++ ) 63 | { 64 | if ( u8g->pin_list[i] != U8G_PIN_NONE ) 65 | { 66 | pinMode(u8g->pin_list[i], OUTPUT); 67 | digitalWrite(u8g->pin_list[i], HIGH); 68 | } 69 | } 70 | } 71 | 72 | 73 | #endif 74 | 75 | 76 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/libraries/U8glib/utility/u8g_com_null.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_com_null.c 4 | 5 | communication null device 6 | 7 | Universal 8bit Graphics Library 8 | 9 | Copyright (c) 2011, olikraus@gmail.com 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without modification, 13 | are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this list 16 | of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright notice, this 19 | list of conditions and the following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 23 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 24 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 32 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 34 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | 37 | */ 38 | 39 | #include "u8g.h" 40 | 41 | uint8_t u8g_com_null_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) 42 | { 43 | switch(msg) 44 | { 45 | case U8G_COM_MSG_INIT: 46 | break; 47 | case U8G_COM_MSG_STOP: 48 | break; 49 | 50 | 51 | case U8G_COM_MSG_CHIP_SELECT: 52 | /* arg_val contains the chip number, which should be enabled */ 53 | break; 54 | 55 | 56 | case U8G_COM_MSG_WRITE_BYTE: 57 | break; 58 | case U8G_COM_MSG_WRITE_SEQ: 59 | break; 60 | } 61 | return 1; 62 | } 63 | 64 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/libraries/U8glib/utility/u8g_dev_null.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_dev_null.c 4 | 5 | Universal 8bit Graphics Library 6 | 7 | Copyright (c) 2011, olikraus@gmail.com 8 | All rights reserved. 9 | 10 | Redistribution and use in source and binary forms, with or without modification, 11 | are permitted provided that the following conditions are met: 12 | 13 | * Redistributions of source code must retain the above copyright notice, this list 14 | of conditions and the following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above copyright notice, this 17 | list of conditions and the following disclaimer in the documentation and/or other 18 | materials provided with the distribution. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 21 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 22 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 32 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | 35 | */ 36 | 37 | #include "u8g.h" 38 | 39 | uint8_t u8g_dev_null(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) 40 | { 41 | switch(msg) 42 | { 43 | case U8G_DEV_MSG_SET_8PIXEL: /* most often used command */ 44 | break; 45 | case U8G_DEV_MSG_SET_PIXEL: 46 | break; 47 | case U8G_DEV_MSG_INIT: 48 | break; 49 | case U8G_DEV_MSG_STOP: 50 | break; 51 | case U8G_DEV_MSG_PAGE_FIRST: 52 | break; 53 | case U8G_DEV_MSG_PAGE_NEXT: 54 | break; 55 | #ifdef U8G_DEV_MSG_IS_BBX_INTERSECTION 56 | case U8G_DEV_MSG_IS_BBX_INTERSECTION: 57 | return 1; 58 | #endif 59 | case U8G_DEV_MSG_GET_PAGE_BOX: 60 | break; 61 | case U8G_DEV_MSG_SET_COLOR_INDEX: 62 | break; 63 | case U8G_DEV_MSG_SET_XY_CB: 64 | break; 65 | } 66 | return 1; 67 | } 68 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/libraries/U8glib/utility/u8g_font_data.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/Arduino/ArduinoAddons/Arduino_0.xx/libraries/U8glib/utility/u8g_font_data.c -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/libraries/U8glib/utility/u8g_page.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_page.c 4 | 5 | page helper functions, only called by the dev handler. 6 | 7 | Universal 8bit Graphics Library 8 | 9 | Copyright (c) 2011, olikraus@gmail.com 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without modification, 13 | are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this list 16 | of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright notice, this 19 | list of conditions and the following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 23 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 24 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 32 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 34 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | 37 | */ 38 | 39 | #include "u8g.h" 40 | 41 | /* 42 | setup page count structure 43 | conditions: page_height <= total_height 44 | */ 45 | void u8g_page_Init(u8g_page_t *p, u8g_uint_t page_height, u8g_uint_t total_height ) 46 | { 47 | p->page_height = page_height; 48 | p->total_height = total_height; 49 | p->page = 0; 50 | u8g_page_First(p); 51 | } 52 | 53 | void u8g_page_First(u8g_page_t *p) 54 | { 55 | p->page_y0 = 0; 56 | p->page_y1 = p->page_height; 57 | p->page_y1--; 58 | p->page = 0; 59 | } 60 | 61 | uint8_t u8g_page_Next(u8g_page_t * p) 62 | { 63 | register u8g_uint_t y1; 64 | p->page_y0 += p->page_height; 65 | if ( p->page_y0 >= p->total_height ) 66 | return 0; 67 | p->page++; 68 | y1 = p->page_y1; 69 | y1 += p->page_height; 70 | if ( y1 >= p->total_height ) 71 | { 72 | y1 = p->total_height; 73 | y1--; 74 | } 75 | p->page_y1 = y1; 76 | 77 | return 1; 78 | } 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/libraries/U8glib/utility/u8g_u16toa.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_u16toa.c 4 | 5 | 6 | Universal 8bit Graphics Library 7 | 8 | Copyright (c) 2012, olikraus@gmail.com 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without modification, 12 | are permitted provided that the following conditions are met: 13 | 14 | * Redistributions of source code must retain the above copyright notice, this list 15 | of conditions and the following disclaimer. 16 | 17 | * Redistributions in binary form must reproduce the above copyright notice, this 18 | list of conditions and the following disclaimer in the documentation and/or other 19 | materials provided with the distribution. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 22 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 23 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | */ 36 | 37 | 38 | #include "u8g.h" 39 | 40 | const char *u8g_u16toap(char * dest, uint16_t v) 41 | { 42 | uint8_t pos; 43 | uint8_t d; 44 | uint16_t c; 45 | c = 10000; 46 | for( pos = 0; pos < 5; pos++ ) 47 | { 48 | d = '0'; 49 | while( v >= c ) 50 | { 51 | v -= c; 52 | d++; 53 | } 54 | dest[pos] = d; 55 | c /= 10; 56 | } 57 | dest[5] = '\0'; 58 | return dest; 59 | } 60 | 61 | /* v = value, d = number of digits */ 62 | const char *u8g_u16toa(uint16_t v, uint8_t d) 63 | { 64 | static char buf[6]; 65 | d = 5-d; 66 | return u8g_u16toap(buf, v) + d; 67 | } 68 | 69 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_0.xx/libraries/U8glib/utility/u8g_u8toa.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_u8toa.c 4 | 5 | 6 | Universal 8bit Graphics Library 7 | 8 | Copyright (c) 2011, olikraus@gmail.com 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without modification, 12 | are permitted provided that the following conditions are met: 13 | 14 | * Redistributions of source code must retain the above copyright notice, this list 15 | of conditions and the following disclaimer. 16 | 17 | * Redistributions in binary form must reproduce the above copyright notice, this 18 | list of conditions and the following disclaimer in the documentation and/or other 19 | materials provided with the distribution. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 22 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 23 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | */ 36 | 37 | 38 | #include "u8g.h" 39 | 40 | static const unsigned char u8g_u8toa_tab[3] = { 100, 10, 1 } ; 41 | const char *u8g_u8toap(char * dest, uint8_t v) 42 | { 43 | uint8_t pos; 44 | uint8_t d; 45 | uint8_t c; 46 | for( pos = 0; pos < 3; pos++ ) 47 | { 48 | d = '0'; 49 | c = *(u8g_u8toa_tab+pos); 50 | while( v >= c ) 51 | { 52 | v -= c; 53 | d++; 54 | } 55 | dest[pos] = d; 56 | } 57 | dest[3] = '\0'; 58 | return dest; 59 | } 60 | 61 | /* v = value, d = number of digits */ 62 | const char *u8g_u8toa(uint8_t v, uint8_t d) 63 | { 64 | static char buf[4]; 65 | d = 3-d; 66 | return u8g_u8toap(buf, v) + d; 67 | } 68 | 69 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/OMC_tkj/boards.txt: -------------------------------------------------------------------------------- 1 | ############################################################## 2 | 3 | omc.name=OMC with Atmega644 at 20Mhz 4 | 5 | omc.upload.maximum_size=63488 6 | omc.upload.maximum_data_size=4096 7 | 8 | omc.upload.protocol=stk500v2 9 | omc.upload.speed=115200 10 | omc.bootloader.path=OMC 11 | omc.bootloader.file=bootloader-644-20MHz.hex 12 | 13 | omc.bootloader.low_fuses=0xE7 14 | omc.bootloader.high_fuses=0xD4 15 | omc.bootloader.extended_fuses=0xFC 16 | omc.bootloader.unlock_bits=0x3F 17 | omc.bootloader.lock_bits=0x0F 18 | 19 | omc.build.mcu=atmega644 20 | omc.build.f_cpu=20000000L 21 | omc.build.board=AVR_OMC 22 | omc.build.core=arduino:arduino 23 | omc.build.variant=sanguino -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/OMC_tkj/bootloaders/atmega644p/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for ATmegaBOOT 2 | # E.Lins, 18.7.2005 3 | # $Id$ 4 | 5 | 6 | # program name should not be changed... 7 | PROGRAM = ATmegaBOOT_644P 8 | 9 | # enter the target CPU frequency 10 | AVR_FREQ = 16000000L 11 | 12 | MCU_TARGET = atmega644p 13 | LDSECTION = --section-start=.text=0xF800 14 | 15 | OBJ = $(PROGRAM).o 16 | OPTIMIZE = -O2 17 | 18 | DEFS = 19 | LIBS = 20 | 21 | CC = avr-gcc 22 | 23 | 24 | # Override is only needed by avr-lib build system. 25 | 26 | override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS) 27 | override LDFLAGS = -Wl,$(LDSECTION) 28 | #override LDFLAGS = -Wl,-Map,$(PROGRAM).map,$(LDSECTION) 29 | 30 | OBJCOPY = avr-objcopy 31 | OBJDUMP = avr-objdump 32 | 33 | all: CFLAGS += '-DMAX_TIME_COUNT=8000000L>>1' -DADABOOT 34 | all: $(PROGRAM).hex 35 | 36 | $(PROGRAM).hex: $(PROGRAM).elf 37 | $(OBJCOPY) -j .text -j .data -O ihex $< $@ 38 | 39 | $(PROGRAM).elf: $(OBJ) 40 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) 41 | 42 | $(OBJ): ATmegaBOOT.c 43 | avr-gcc $(CFLAGS) $(LDFLAGS) -c -g -O2 -Wall -mmcu=$(MCU_TARGET) ATmegaBOOT.c -o $(PROGRAM).o 44 | 45 | %.lst: %.elf 46 | $(OBJDUMP) -h -S $< > $@ 47 | 48 | %.srec: %.elf 49 | $(OBJCOPY) -j .text -j .data -O srec $< $@ 50 | 51 | %.bin: %.elf 52 | $(OBJCOPY) -j .text -j .data -O binary $< $@ 53 | 54 | clean: 55 | rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex 56 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/OMC_tkj/bootloaders/atmega644p/README.txt: -------------------------------------------------------------------------------- 1 | Note: This bootloader support ATmega644, ATmega644P and ATmega324P. 2 | To build, set PROGRAM and MCU_TARGET in the Makefile according to your target device. 3 | 4 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/Arduino/ArduinoAddons/Arduino_1.0.x/hardware/Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.elf -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/Sanguino/bootloaders/atmega644p/Makefile: -------------------------------------------------------------------------------- 1 | #Makefile for ATmegaBOOT 2 | # E.Lins, 18.7.2005 3 | # $Id$ 4 | 5 | 6 | # program name should not be changed... 7 | PROGRAM = ATmegaBOOT_644P 8 | 9 | # enter the target CPU frequency 10 | AVR_FREQ = 16000000L 11 | 12 | MCU_TARGET = atmega644p 13 | LDSECTION = --section-start=.text=0x1F000 14 | 15 | OBJ = $(PROGRAM).o 16 | OPTIMIZE = -Os 17 | 18 | DEFS = 19 | LIBS = 20 | 21 | CC = avr-gcc 22 | 23 | 24 | # Override is only needed by avr-lib build system. 25 | 26 | override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS) 27 | override LDFLAGS = -Wl,$(LDSECTION) 28 | #override LDFLAGS = -Wl,-Map,$(PROGRAM).map,$(LDSECTION) 29 | 30 | OBJCOPY = avr-objcopy 31 | OBJDUMP = avr-objdump 32 | 33 | all: CFLAGS += '-DMAX_TIME_COUNT=8000000L>>1' -DADABOOT 34 | all: $(PROGRAM).hex 35 | 36 | $(PROGRAM).hex: $(PROGRAM).elf 37 | $(OBJCOPY) -j .text -j .data -O ihex $< $@ 38 | 39 | $(PROGRAM).elf: $(OBJ) 40 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) 41 | 42 | $(OBJ): ATmegaBOOT.c 43 | avr-gcc $(CFLAGS) $(LDFLAGS) -c -g -Os -Wall -mmcu=$(MCU_TARGET) ATmegaBOOT.c -o $(PROGRAM).o 44 | 45 | %.lst: %.elf 46 | $(OBJDUMP) -h -S $< > $@ 47 | 48 | %.srec: %.elf 49 | $(OBJCOPY) -j .text -j .data -O srec $< $@ 50 | 51 | %.bin: %.elf 52 | $(OBJCOPY) -j .text -j .data -O binary $< $@ 53 | 54 | clean: 55 | rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex 56 | 57 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/Sanguino/bootloaders/atmega644p/README.txt: -------------------------------------------------------------------------------- 1 | Note: This bootloader support ATmega644, ATmega644P and ATmega324P. 2 | To build, set PROGRAM and MCU_TARGET in the Makefile according to your target device. 3 | 4 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/Sanguino/cores/arduino/Client.h: -------------------------------------------------------------------------------- 1 | #ifndef client_h 2 | #define client_h 3 | #include "Print.h" 4 | #include "Stream.h" 5 | #include "IPAddress.h" 6 | 7 | class Client : public Stream { 8 | 9 | public: 10 | virtual int connect(IPAddress ip, uint16_t port) =0; 11 | virtual int connect(const char *host, uint16_t port) =0; 12 | virtual size_t write(uint8_t) =0; 13 | virtual size_t write(const uint8_t *buf, size_t size) =0; 14 | virtual int available() = 0; 15 | virtual int read() = 0; 16 | virtual int read(uint8_t *buf, size_t size) = 0; 17 | virtual int peek() = 0; 18 | virtual void flush() = 0; 19 | virtual void stop() = 0; 20 | virtual uint8_t connected() = 0; 21 | virtual operator bool() = 0; 22 | protected: 23 | uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; 24 | }; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/Sanguino/cores/arduino/IPAddress.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | IPAddress::IPAddress() 6 | { 7 | memset(_address, 0, sizeof(_address)); 8 | } 9 | 10 | IPAddress::IPAddress(uint8_t first_octet, uint8_t second_octet, uint8_t third_octet, uint8_t fourth_octet) 11 | { 12 | _address[0] = first_octet; 13 | _address[1] = second_octet; 14 | _address[2] = third_octet; 15 | _address[3] = fourth_octet; 16 | } 17 | 18 | IPAddress::IPAddress(uint32_t address) 19 | { 20 | memcpy(_address, &address, sizeof(_address)); 21 | } 22 | 23 | IPAddress::IPAddress(const uint8_t *address) 24 | { 25 | memcpy(_address, address, sizeof(_address)); 26 | } 27 | 28 | IPAddress& IPAddress::operator=(const uint8_t *address) 29 | { 30 | memcpy(_address, address, sizeof(_address)); 31 | return *this; 32 | } 33 | 34 | IPAddress& IPAddress::operator=(uint32_t address) 35 | { 36 | memcpy(_address, (const uint8_t *)&address, sizeof(_address)); 37 | return *this; 38 | } 39 | 40 | bool IPAddress::operator==(const uint8_t* addr) 41 | { 42 | return memcmp(addr, _address, sizeof(_address)) == 0; 43 | } 44 | 45 | size_t IPAddress::printTo(Print& p) const 46 | { 47 | size_t n = 0; 48 | for (int i =0; i < 3; i++) 49 | { 50 | n += p.print(_address[i], DEC); 51 | n += p.print('.'); 52 | } 53 | n += p.print(_address[3], DEC); 54 | return n; 55 | } 56 | 57 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/Sanguino/cores/arduino/Platform.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __PLATFORM_H__ 3 | #define __PLATFORM_H__ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | typedef unsigned char u8; 12 | typedef unsigned short u16; 13 | typedef unsigned long u32; 14 | 15 | #include "Arduino.h" 16 | 17 | #if defined(USBCON) 18 | #include "USBDesc.h" 19 | #include "USBCore.h" 20 | #include "USBAPI.h" 21 | #endif /* if defined(USBCON) */ 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/Sanguino/cores/arduino/Printable.h: -------------------------------------------------------------------------------- 1 | /* 2 | Printable.h - Interface class that allows printing of complex types 3 | Copyright (c) 2011 Adrian McEwen. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef Printable_h 21 | #define Printable_h 22 | 23 | #include 24 | 25 | class Print; 26 | 27 | /** The Printable class provides a way for new classes to allow themselves to be printed. 28 | By deriving from Printable and implementing the printTo method, it will then be possible 29 | for users to print out instances of this class by passing them into the usual 30 | Print::print and Print::println methods. 31 | */ 32 | 33 | class Printable 34 | { 35 | public: 36 | virtual size_t printTo(Print& p) const = 0; 37 | }; 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/Sanguino/cores/arduino/Server.h: -------------------------------------------------------------------------------- 1 | #ifndef server_h 2 | #define server_h 3 | 4 | class Server : public Print { 5 | public: 6 | virtual void begin() =0; 7 | }; 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/Sanguino/cores/arduino/USBDesc.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* Copyright (c) 2011, Peter Barrett 4 | ** 5 | ** Permission to use, copy, modify, and/or distribute this software for 6 | ** any purpose with or without fee is hereby granted, provided that the 7 | ** above copyright notice and this permission notice appear in all copies. 8 | ** 9 | ** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 | ** WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR 12 | ** BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES 13 | ** OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 14 | ** WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 15 | ** ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 16 | ** SOFTWARE. 17 | */ 18 | 19 | #define CDC_ENABLED 20 | #define HID_ENABLED 21 | 22 | 23 | #ifdef CDC_ENABLED 24 | #define CDC_INTERFACE_COUNT 2 25 | #define CDC_ENPOINT_COUNT 3 26 | #else 27 | #define CDC_INTERFACE_COUNT 0 28 | #define CDC_ENPOINT_COUNT 0 29 | #endif 30 | 31 | #ifdef HID_ENABLED 32 | #define HID_INTERFACE_COUNT 1 33 | #define HID_ENPOINT_COUNT 1 34 | #else 35 | #define HID_INTERFACE_COUNT 0 36 | #define HID_ENPOINT_COUNT 0 37 | #endif 38 | 39 | #define CDC_ACM_INTERFACE 0 // CDC ACM 40 | #define CDC_DATA_INTERFACE 1 // CDC Data 41 | #define CDC_FIRST_ENDPOINT 1 42 | #define CDC_ENDPOINT_ACM (CDC_FIRST_ENDPOINT) // CDC First 43 | #define CDC_ENDPOINT_OUT (CDC_FIRST_ENDPOINT+1) 44 | #define CDC_ENDPOINT_IN (CDC_FIRST_ENDPOINT+2) 45 | 46 | #define HID_INTERFACE (CDC_ACM_INTERFACE + CDC_INTERFACE_COUNT) // HID Interface 47 | #define HID_FIRST_ENDPOINT (CDC_FIRST_ENDPOINT + CDC_ENPOINT_COUNT) 48 | #define HID_ENDPOINT_INT (HID_FIRST_ENDPOINT) 49 | 50 | #define INTERFACE_COUNT (MSC_INTERFACE + MSC_INTERFACE_COUNT) 51 | 52 | #ifdef CDC_ENABLED 53 | #define CDC_RX CDC_ENDPOINT_OUT 54 | #define CDC_TX CDC_ENDPOINT_IN 55 | #endif 56 | 57 | #ifdef HID_ENABLED 58 | #define HID_TX HID_ENDPOINT_INT 59 | #endif 60 | 61 | #define IMANUFACTURER 1 62 | #define IPRODUCT 2 63 | 64 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/Sanguino/cores/arduino/WMath.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | 3 | /* 4 | Part of the Wiring project - http://wiring.org.co 5 | Copyright (c) 2004-06 Hernando Barragan 6 | Modified 13 August 2006, David A. Mellis for Arduino - http://www.arduino.cc/ 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id$ 24 | */ 25 | 26 | extern "C" { 27 | #include "stdlib.h" 28 | } 29 | 30 | void randomSeed(unsigned int seed) 31 | { 32 | if (seed != 0) { 33 | srandom(seed); 34 | } 35 | } 36 | 37 | long random(long howbig) 38 | { 39 | if (howbig == 0) { 40 | return 0; 41 | } 42 | return random() % howbig; 43 | } 44 | 45 | long random(long howsmall, long howbig) 46 | { 47 | if (howsmall >= howbig) { 48 | return howsmall; 49 | } 50 | long diff = howbig - howsmall; 51 | return random(diff) + howsmall; 52 | } 53 | 54 | long map(long x, long in_min, long in_max, long out_min, long out_max) 55 | { 56 | return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; 57 | } 58 | 59 | unsigned int makeWord(unsigned int w) { return w; } 60 | unsigned int makeWord(unsigned char h, unsigned char l) { return (h << 8) | l; } -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/Sanguino/cores/arduino/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | init(); 6 | 7 | #if defined(USBCON) 8 | USBDevice.attach(); 9 | #endif 10 | 11 | setup(); 12 | 13 | for (;;) { 14 | loop(); 15 | if (serialEventRun) serialEventRun(); 16 | } 17 | 18 | return 0; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/Sanguino/cores/arduino/new.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void * operator new(size_t size) 4 | { 5 | return malloc(size); 6 | } 7 | 8 | void operator delete(void * ptr) 9 | { 10 | free(ptr); 11 | } 12 | 13 | int __cxa_guard_acquire(__guard *g) {return !*(char *)(g);}; 14 | void __cxa_guard_release (__guard *g) {*(char *)g = 1;}; 15 | void __cxa_guard_abort (__guard *) {}; 16 | 17 | void __cxa_pure_virtual(void) {}; 18 | 19 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/Sanguino/cores/arduino/new.h: -------------------------------------------------------------------------------- 1 | /* Header to define new/delete operators as they aren't provided by avr-gcc by default 2 | Taken from http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=59453 3 | */ 4 | 5 | #ifndef NEW_H 6 | #define NEW_H 7 | 8 | #include 9 | 10 | void * operator new(size_t size); 11 | void operator delete(void * ptr); 12 | 13 | __extension__ typedef int __guard __attribute__((mode (__DI__))); 14 | 15 | extern "C" int __cxa_guard_acquire(__guard *); 16 | extern "C" void __cxa_guard_release (__guard *); 17 | extern "C" void __cxa_guard_abort (__guard *); 18 | 19 | extern "C" void __cxa_pure_virtual(void); 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/Sanguino/cores/arduino/wiring_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | wiring_private.h - Internal header file. 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2005-2006 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | $Id: wiring.h 239 2007-01-12 17:58:39Z mellis $ 23 | */ 24 | 25 | #ifndef WiringPrivate_h 26 | #define WiringPrivate_h 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #include "Arduino.h" 34 | 35 | #ifdef __cplusplus 36 | extern "C"{ 37 | #endif 38 | 39 | #ifndef cbi 40 | #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) 41 | #endif 42 | #ifndef sbi 43 | #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) 44 | #endif 45 | 46 | #define EXTERNAL_INT_0 0 47 | #define EXTERNAL_INT_1 1 48 | #define EXTERNAL_INT_2 2 49 | #define EXTERNAL_INT_3 3 50 | #define EXTERNAL_INT_4 4 51 | #define EXTERNAL_INT_5 5 52 | #define EXTERNAL_INT_6 6 53 | #define EXTERNAL_INT_7 7 54 | 55 | #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) 56 | #define EXTERNAL_NUM_INTERRUPTS 8 57 | #elif defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega644P__) 58 | #define EXTERNAL_NUM_INTERRUPTS 3 59 | #elif defined(__AVR_ATmega32U4__) 60 | #define EXTERNAL_NUM_INTERRUPTS 4 61 | #else 62 | #define EXTERNAL_NUM_INTERRUPTS 2 63 | #endif 64 | 65 | typedef void (*voidFuncPtr)(void); 66 | 67 | #ifdef __cplusplus 68 | } // extern "C" 69 | #endif 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/Sanguino/cores/arduino/wiring_shift.c: -------------------------------------------------------------------------------- 1 | /* 2 | wiring_shift.c - shiftOut() function 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2005-2006 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | $Id: wiring.c 248 2007-02-03 15:36:30Z mellis $ 23 | */ 24 | 25 | #include "wiring_private.h" 26 | 27 | uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder) { 28 | uint8_t value = 0; 29 | uint8_t i; 30 | 31 | for (i = 0; i < 8; ++i) { 32 | digitalWrite(clockPin, HIGH); 33 | if (bitOrder == LSBFIRST) 34 | value |= digitalRead(dataPin) << i; 35 | else 36 | value |= digitalRead(dataPin) << (7 - i); 37 | digitalWrite(clockPin, LOW); 38 | } 39 | return value; 40 | } 41 | 42 | void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val) 43 | { 44 | uint8_t i; 45 | 46 | for (i = 0; i < 8; i++) { 47 | if (bitOrder == LSBFIRST) 48 | digitalWrite(dataPin, !!(val & (1 << i))); 49 | else 50 | digitalWrite(dataPin, !!(val & (1 << (7 - i)))); 51 | 52 | digitalWrite(clockPin, HIGH); 53 | digitalWrite(clockPin, LOW); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/rambo/boards.txt: -------------------------------------------------------------------------------- 1 | # See: http://code.google.com/p/arduino/wiki/Platforms 2 | 3 | ############################################################## 4 | 5 | mega2560.name=RAMBo 6 | 7 | mega2560.upload.protocol=wiring 8 | mega2560.upload.maximum_size=258048 9 | mega2560.upload.speed=115200 10 | 11 | mega2560.bootloader.low_fuses=0xFF 12 | mega2560.bootloader.high_fuses=0xD8 13 | mega2560.bootloader.extended_fuses=0xFD 14 | mega2560.bootloader.path=stk500v2 15 | mega2560.bootloader.file=stk500boot_v2_mega2560.hex 16 | mega2560.bootloader.unlock_bits=0x3F 17 | mega2560.bootloader.lock_bits=0x0F 18 | 19 | mega2560.build.mcu=atmega2560 20 | mega2560.build.f_cpu=16000000L 21 | mega2560.build.core=arduino 22 | mega2560.build.variant=standard 23 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/rambo/cores/arduino/Client.h: -------------------------------------------------------------------------------- 1 | #ifndef client_h 2 | #define client_h 3 | #include "Print.h" 4 | #include "Stream.h" 5 | #include "IPAddress.h" 6 | 7 | class Client : public Stream { 8 | 9 | public: 10 | virtual int connect(IPAddress ip, uint16_t port) =0; 11 | virtual int connect(const char *host, uint16_t port) =0; 12 | virtual size_t write(uint8_t) =0; 13 | virtual size_t write(const uint8_t *buf, size_t size) =0; 14 | virtual int available() = 0; 15 | virtual int read() = 0; 16 | virtual int read(uint8_t *buf, size_t size) = 0; 17 | virtual int peek() = 0; 18 | virtual void flush() = 0; 19 | virtual void stop() = 0; 20 | virtual uint8_t connected() = 0; 21 | virtual operator bool() = 0; 22 | protected: 23 | uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; 24 | }; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/rambo/cores/arduino/IPAddress.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | IPAddress::IPAddress() 6 | { 7 | memset(_address, 0, sizeof(_address)); 8 | } 9 | 10 | IPAddress::IPAddress(uint8_t first_octet, uint8_t second_octet, uint8_t third_octet, uint8_t fourth_octet) 11 | { 12 | _address[0] = first_octet; 13 | _address[1] = second_octet; 14 | _address[2] = third_octet; 15 | _address[3] = fourth_octet; 16 | } 17 | 18 | IPAddress::IPAddress(uint32_t address) 19 | { 20 | memcpy(_address, &address, sizeof(_address)); 21 | } 22 | 23 | IPAddress::IPAddress(const uint8_t *address) 24 | { 25 | memcpy(_address, address, sizeof(_address)); 26 | } 27 | 28 | IPAddress& IPAddress::operator=(const uint8_t *address) 29 | { 30 | memcpy(_address, address, sizeof(_address)); 31 | return *this; 32 | } 33 | 34 | IPAddress& IPAddress::operator=(uint32_t address) 35 | { 36 | memcpy(_address, (const uint8_t *)&address, sizeof(_address)); 37 | return *this; 38 | } 39 | 40 | bool IPAddress::operator==(const uint8_t* addr) 41 | { 42 | return memcmp(addr, _address, sizeof(_address)) == 0; 43 | } 44 | 45 | size_t IPAddress::printTo(Print& p) const 46 | { 47 | size_t n = 0; 48 | for (int i =0; i < 3; i++) 49 | { 50 | n += p.print(_address[i], DEC); 51 | n += p.print('.'); 52 | } 53 | n += p.print(_address[3], DEC); 54 | return n; 55 | } 56 | 57 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/rambo/cores/arduino/Platform.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __PLATFORM_H__ 3 | #define __PLATFORM_H__ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | typedef unsigned char u8; 12 | typedef unsigned short u16; 13 | typedef unsigned long u32; 14 | 15 | #include "Arduino.h" 16 | 17 | #if defined(USBCON) 18 | #include "USBDesc.h" 19 | #include "USBCore.h" 20 | #include "USBAPI.h" 21 | #endif /* if defined(USBCON) */ 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/rambo/cores/arduino/Printable.h: -------------------------------------------------------------------------------- 1 | /* 2 | Printable.h - Interface class that allows printing of complex types 3 | Copyright (c) 2011 Adrian McEwen. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef Printable_h 21 | #define Printable_h 22 | 23 | #include 24 | 25 | class Print; 26 | 27 | /** The Printable class provides a way for new classes to allow themselves to be printed. 28 | By deriving from Printable and implementing the printTo method, it will then be possible 29 | for users to print out instances of this class by passing them into the usual 30 | Print::print and Print::println methods. 31 | */ 32 | 33 | class Printable 34 | { 35 | public: 36 | virtual size_t printTo(Print& p) const = 0; 37 | }; 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/rambo/cores/arduino/Server.h: -------------------------------------------------------------------------------- 1 | #ifndef server_h 2 | #define server_h 3 | 4 | class Server : public Print { 5 | public: 6 | virtual void begin() =0; 7 | }; 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/rambo/cores/arduino/USBDesc.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* Copyright (c) 2011, Peter Barrett 4 | ** 5 | ** Permission to use, copy, modify, and/or distribute this software for 6 | ** any purpose with or without fee is hereby granted, provided that the 7 | ** above copyright notice and this permission notice appear in all copies. 8 | ** 9 | ** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 | ** WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR 12 | ** BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES 13 | ** OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 14 | ** WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 15 | ** ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 16 | ** SOFTWARE. 17 | */ 18 | 19 | #define CDC_ENABLED 20 | #define HID_ENABLED 21 | 22 | 23 | #ifdef CDC_ENABLED 24 | #define CDC_INTERFACE_COUNT 2 25 | #define CDC_ENPOINT_COUNT 3 26 | #else 27 | #define CDC_INTERFACE_COUNT 0 28 | #define CDC_ENPOINT_COUNT 0 29 | #endif 30 | 31 | #ifdef HID_ENABLED 32 | #define HID_INTERFACE_COUNT 1 33 | #define HID_ENPOINT_COUNT 1 34 | #else 35 | #define HID_INTERFACE_COUNT 0 36 | #define HID_ENPOINT_COUNT 0 37 | #endif 38 | 39 | #define CDC_ACM_INTERFACE 0 // CDC ACM 40 | #define CDC_DATA_INTERFACE 1 // CDC Data 41 | #define CDC_FIRST_ENDPOINT 1 42 | #define CDC_ENDPOINT_ACM (CDC_FIRST_ENDPOINT) // CDC First 43 | #define CDC_ENDPOINT_OUT (CDC_FIRST_ENDPOINT+1) 44 | #define CDC_ENDPOINT_IN (CDC_FIRST_ENDPOINT+2) 45 | 46 | #define HID_INTERFACE (CDC_ACM_INTERFACE + CDC_INTERFACE_COUNT) // HID Interface 47 | #define HID_FIRST_ENDPOINT (CDC_FIRST_ENDPOINT + CDC_ENPOINT_COUNT) 48 | #define HID_ENDPOINT_INT (HID_FIRST_ENDPOINT) 49 | 50 | #define INTERFACE_COUNT (MSC_INTERFACE + MSC_INTERFACE_COUNT) 51 | 52 | #ifdef CDC_ENABLED 53 | #define CDC_RX CDC_ENDPOINT_OUT 54 | #define CDC_TX CDC_ENDPOINT_IN 55 | #endif 56 | 57 | #ifdef HID_ENABLED 58 | #define HID_TX HID_ENDPOINT_INT 59 | #endif 60 | 61 | #define IMANUFACTURER 1 62 | #define IPRODUCT 2 63 | 64 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/rambo/cores/arduino/WMath.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | 3 | /* 4 | Part of the Wiring project - http://wiring.org.co 5 | Copyright (c) 2004-06 Hernando Barragan 6 | Modified 13 August 2006, David A. Mellis for Arduino - http://www.arduino.cc/ 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id$ 24 | */ 25 | 26 | extern "C" { 27 | #include "stdlib.h" 28 | } 29 | 30 | void randomSeed(unsigned int seed) 31 | { 32 | if (seed != 0) { 33 | srandom(seed); 34 | } 35 | } 36 | 37 | long random(long howbig) 38 | { 39 | if (howbig == 0) { 40 | return 0; 41 | } 42 | return random() % howbig; 43 | } 44 | 45 | long random(long howsmall, long howbig) 46 | { 47 | if (howsmall >= howbig) { 48 | return howsmall; 49 | } 50 | long diff = howbig - howsmall; 51 | return random(diff) + howsmall; 52 | } 53 | 54 | long map(long x, long in_min, long in_max, long out_min, long out_max) 55 | { 56 | return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; 57 | } 58 | 59 | unsigned int makeWord(unsigned int w) { return w; } 60 | unsigned int makeWord(unsigned char h, unsigned char l) { return (h << 8) | l; } -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/rambo/cores/arduino/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | init(); 6 | 7 | #if defined(USBCON) 8 | USBDevice.attach(); 9 | #endif 10 | 11 | setup(); 12 | 13 | for (;;) { 14 | loop(); 15 | if (serialEventRun) serialEventRun(); 16 | } 17 | 18 | return 0; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/rambo/cores/arduino/new.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void * operator new(size_t size) 4 | { 5 | return malloc(size); 6 | } 7 | 8 | void operator delete(void * ptr) 9 | { 10 | free(ptr); 11 | } 12 | 13 | int __cxa_guard_acquire(__guard *g) {return !*(char *)(g);}; 14 | void __cxa_guard_release (__guard *g) {*(char *)g = 1;}; 15 | void __cxa_guard_abort (__guard *) {}; 16 | 17 | void __cxa_pure_virtual(void) {}; 18 | 19 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/rambo/cores/arduino/new.h: -------------------------------------------------------------------------------- 1 | /* Header to define new/delete operators as they aren't provided by avr-gcc by default 2 | Taken from http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=59453 3 | */ 4 | 5 | #ifndef NEW_H 6 | #define NEW_H 7 | 8 | #include 9 | 10 | void * operator new(size_t size); 11 | void operator delete(void * ptr); 12 | 13 | __extension__ typedef int __guard __attribute__((mode (__DI__))); 14 | 15 | extern "C" int __cxa_guard_acquire(__guard *); 16 | extern "C" void __cxa_guard_release (__guard *); 17 | extern "C" void __cxa_guard_abort (__guard *); 18 | 19 | extern "C" void __cxa_pure_virtual(void); 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/rambo/cores/arduino/wiring_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | wiring_private.h - Internal header file. 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2005-2006 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | $Id: wiring.h 239 2007-01-12 17:58:39Z mellis $ 23 | */ 24 | 25 | #ifndef WiringPrivate_h 26 | #define WiringPrivate_h 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #include "Arduino.h" 34 | 35 | #ifdef __cplusplus 36 | extern "C"{ 37 | #endif 38 | 39 | #ifndef cbi 40 | #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) 41 | #endif 42 | #ifndef sbi 43 | #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) 44 | #endif 45 | 46 | #define EXTERNAL_INT_0 0 47 | #define EXTERNAL_INT_1 1 48 | #define EXTERNAL_INT_2 2 49 | #define EXTERNAL_INT_3 3 50 | #define EXTERNAL_INT_4 4 51 | #define EXTERNAL_INT_5 5 52 | #define EXTERNAL_INT_6 6 53 | #define EXTERNAL_INT_7 7 54 | 55 | #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) 56 | #define EXTERNAL_NUM_INTERRUPTS 8 57 | #elif defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega644P__) 58 | #define EXTERNAL_NUM_INTERRUPTS 3 59 | #elif defined(__AVR_ATmega32U4__) 60 | #define EXTERNAL_NUM_INTERRUPTS 4 61 | #else 62 | #define EXTERNAL_NUM_INTERRUPTS 2 63 | #endif 64 | 65 | typedef void (*voidFuncPtr)(void); 66 | 67 | #ifdef __cplusplus 68 | } // extern "C" 69 | #endif 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/hardware/rambo/cores/arduino/wiring_shift.c: -------------------------------------------------------------------------------- 1 | /* 2 | wiring_shift.c - shiftOut() function 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2005-2006 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | $Id: wiring.c 248 2007-02-03 15:36:30Z mellis $ 23 | */ 24 | 25 | #include "wiring_private.h" 26 | 27 | uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder) { 28 | uint8_t value = 0; 29 | uint8_t i; 30 | 31 | for (i = 0; i < 8; ++i) { 32 | digitalWrite(clockPin, HIGH); 33 | if (bitOrder == LSBFIRST) 34 | value |= digitalRead(dataPin) << i; 35 | else 36 | value |= digitalRead(dataPin) << (7 - i); 37 | digitalWrite(clockPin, LOW); 38 | } 39 | return value; 40 | } 41 | 42 | void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val) 43 | { 44 | uint8_t i; 45 | 46 | for (i = 0; i < 8; i++) { 47 | if (bitOrder == LSBFIRST) 48 | digitalWrite(dataPin, !!(val & (1 << i))); 49 | else 50 | digitalWrite(dataPin, !!(val & (1 << (7 - i)))); 51 | 52 | digitalWrite(clockPin, HIGH); 53 | digitalWrite(clockPin, LOW); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/libraries/LiquidCrystal/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For LiquidCrystal 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | LiquidCrystal KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | begin KEYWORD2 16 | clear KEYWORD2 17 | home KEYWORD2 18 | print KEYWORD2 19 | setCursor KEYWORD2 20 | cursor KEYWORD2 21 | noCursor KEYWORD2 22 | blink KEYWORD2 23 | noBlink KEYWORD2 24 | display KEYWORD2 25 | noDisplay KEYWORD2 26 | autoscroll KEYWORD2 27 | noAutoscroll KEYWORD2 28 | leftToRight KEYWORD2 29 | rightToLeft KEYWORD2 30 | scrollDisplayLeft KEYWORD2 31 | scrollDisplayRight KEYWORD2 32 | createChar KEYWORD2 33 | 34 | ####################################### 35 | # Constants (LITERAL1) 36 | ####################################### 37 | 38 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/libraries/SPI/SPI.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 by Cristian Maglie 3 | * SPI Master library for arduino. 4 | * 5 | * This file is free software; you can redistribute it and/or modify 6 | * it under the terms of either the GNU General Public License version 2 7 | * or the GNU Lesser General Public License version 2.1, both as 8 | * published by the Free Software Foundation. 9 | */ 10 | 11 | #include "pins_arduino.h" 12 | #include "SPI.h" 13 | 14 | SPIClass SPI; 15 | 16 | void SPIClass::begin() { 17 | 18 | // Set SS to high so a connected chip will be "deselected" by default 19 | digitalWrite(SS, HIGH); 20 | 21 | // When the SS pin is set as OUTPUT, it can be used as 22 | // a general purpose output port (it doesn't influence 23 | // SPI operations). 24 | pinMode(SS, OUTPUT); 25 | 26 | // Warning: if the SS pin ever becomes a LOW INPUT then SPI 27 | // automatically switches to Slave, so the data direction of 28 | // the SS pin MUST be kept as OUTPUT. 29 | SPCR |= _BV(MSTR); 30 | SPCR |= _BV(SPE); 31 | 32 | // Set direction register for SCK and MOSI pin. 33 | // MISO pin automatically overrides to INPUT. 34 | // By doing this AFTER enabling SPI, we avoid accidentally 35 | // clocking in a single bit since the lines go directly 36 | // from "input" to SPI control. 37 | // http://code.google.com/p/arduino/issues/detail?id=888 38 | pinMode(SCK, OUTPUT); 39 | pinMode(MOSI, OUTPUT); 40 | } 41 | 42 | 43 | void SPIClass::end() { 44 | SPCR &= ~_BV(SPE); 45 | } 46 | 47 | void SPIClass::setBitOrder(uint8_t bitOrder) 48 | { 49 | if(bitOrder == LSBFIRST) { 50 | SPCR |= _BV(DORD); 51 | } else { 52 | SPCR &= ~(_BV(DORD)); 53 | } 54 | } 55 | 56 | void SPIClass::setDataMode(uint8_t mode) 57 | { 58 | SPCR = (SPCR & ~SPI_MODE_MASK) | mode; 59 | } 60 | 61 | void SPIClass::setClockDivider(uint8_t rate) 62 | { 63 | SPCR = (SPCR & ~SPI_CLOCK_MASK) | (rate & SPI_CLOCK_MASK); 64 | SPSR = (SPSR & ~SPI_2XCLOCK_MASK) | ((rate >> 2) & SPI_2XCLOCK_MASK); 65 | } 66 | 67 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/libraries/SPI/SPI.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 by Cristian Maglie 3 | * SPI Master library for arduino. 4 | * 5 | * This file is free software; you can redistribute it and/or modify 6 | * it under the terms of either the GNU General Public License version 2 7 | * or the GNU Lesser General Public License version 2.1, both as 8 | * published by the Free Software Foundation. 9 | */ 10 | 11 | #ifndef _SPI_H_INCLUDED 12 | #define _SPI_H_INCLUDED 13 | 14 | #include 15 | #include 16 | #include 17 | 18 | #define SPI_CLOCK_DIV4 0x00 19 | #define SPI_CLOCK_DIV16 0x01 20 | #define SPI_CLOCK_DIV64 0x02 21 | #define SPI_CLOCK_DIV128 0x03 22 | #define SPI_CLOCK_DIV2 0x04 23 | #define SPI_CLOCK_DIV8 0x05 24 | #define SPI_CLOCK_DIV32 0x06 25 | //#define SPI_CLOCK_DIV64 0x07 26 | 27 | #define SPI_MODE0 0x00 28 | #define SPI_MODE1 0x04 29 | #define SPI_MODE2 0x08 30 | #define SPI_MODE3 0x0C 31 | 32 | #define SPI_MODE_MASK 0x0C // CPOL = bit 3, CPHA = bit 2 on SPCR 33 | #define SPI_CLOCK_MASK 0x03 // SPR1 = bit 1, SPR0 = bit 0 on SPCR 34 | #define SPI_2XCLOCK_MASK 0x01 // SPI2X = bit 0 on SPSR 35 | 36 | class SPIClass { 37 | public: 38 | inline static byte transfer(byte _data); 39 | 40 | // SPI Configuration methods 41 | 42 | inline static void attachInterrupt(); 43 | inline static void detachInterrupt(); // Default 44 | 45 | static void begin(); // Default 46 | static void end(); 47 | 48 | static void setBitOrder(uint8_t); 49 | static void setDataMode(uint8_t); 50 | static void setClockDivider(uint8_t); 51 | }; 52 | 53 | extern SPIClass SPI; 54 | 55 | byte SPIClass::transfer(byte _data) { 56 | SPDR = _data; 57 | while (!(SPSR & _BV(SPIF))) 58 | ; 59 | return SPDR; 60 | } 61 | 62 | void SPIClass::attachInterrupt() { 63 | SPCR |= _BV(SPIE); 64 | } 65 | 66 | void SPIClass::detachInterrupt() { 67 | SPCR &= ~_BV(SPIE); 68 | } 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/libraries/SPI/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map SPI 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SPI KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | begin KEYWORD2 15 | end KEYWORD2 16 | transfer KEYWORD2 17 | setBitOrder KEYWORD2 18 | setDataMode KEYWORD2 19 | setClockDivider KEYWORD2 20 | 21 | 22 | ####################################### 23 | # Constants (LITERAL1) 24 | ####################################### 25 | SPI_CLOCK_DIV4 LITERAL1 26 | SPI_CLOCK_DIV16 LITERAL1 27 | SPI_CLOCK_DIV64 LITERAL1 28 | SPI_CLOCK_DIV128 LITERAL1 29 | SPI_CLOCK_DIV2 LITERAL1 30 | SPI_CLOCK_DIV8 LITERAL1 31 | SPI_CLOCK_DIV32 LITERAL1 32 | SPI_CLOCK_DIV64 LITERAL1 33 | SPI_MODE0 LITERAL1 34 | SPI_MODE1 LITERAL1 35 | SPI_MODE2 LITERAL1 36 | SPI_MODE3 LITERAL1 -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/libraries/U8glib/INSTALL.TXT: -------------------------------------------------------------------------------- 1 | 2 | U8GLIB 3 | http://code.google.com/p/u8glib/ 4 | 5 | 6 | Install instructions for the Arduino environment. 7 | 8 | 1. Unzip u8glib_arduino_vX.XX.zip into the "libraries" folder 9 | 2. Start Arduino IDE 10 | 11 | Install instructions for the Chipkit (Arduino) environment. 12 | 13 | 1. cd /libraries 14 | 2. unzip u8glib_arduino_vX.XX.zip 15 | 3. cd ///hardware/pic32/libraries 16 | 4. again: u8glib_arduino_vX.XX.zip 17 | 5. Open hardware/pic32/cores/pic32/Print.h 18 | Remove line 19 | #define BYTE 0 20 | from the file, use PRINT_BYTE instead of BYTE. 21 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/libraries/U8glib/utility/chessengine.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/Arduino/ArduinoAddons/Arduino_1.0.x/libraries/U8glib/utility/chessengine.c -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/libraries/U8glib/utility/u8g_com_arduino_common.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_com_arduino_common.c 4 | 5 | shared procedures for the arduino communication procedures 6 | 7 | Universal 8bit Graphics Library 8 | 9 | Copyright (c) 2011, olikraus@gmail.com 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without modification, 13 | are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this list 16 | of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright notice, this 19 | list of conditions and the following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 23 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 24 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 32 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 34 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | 37 | */ 38 | 39 | #include "u8g.h" 40 | 41 | #if defined(ARDUINO) 42 | 43 | #if ARDUINO < 100 44 | #include 45 | #else 46 | #include 47 | #endif 48 | 49 | void u8g_com_arduino_digital_write(u8g_t *u8g, uint8_t pin_index, uint8_t value) 50 | { 51 | uint8_t pin; 52 | pin = u8g->pin_list[pin_index]; 53 | if ( pin != U8G_PIN_NONE ) 54 | digitalWrite(pin, value); 55 | } 56 | 57 | /* this procedure does not set the RW pin */ 58 | void u8g_com_arduino_assign_pin_output_high(u8g_t *u8g) 59 | { 60 | uint8_t i; 61 | /* skip the RW pin, which is the last pin in the list */ 62 | for( i = 0; i < U8G_PIN_LIST_LEN-1; i++ ) 63 | { 64 | if ( u8g->pin_list[i] != U8G_PIN_NONE ) 65 | { 66 | pinMode(u8g->pin_list[i], OUTPUT); 67 | digitalWrite(u8g->pin_list[i], HIGH); 68 | } 69 | } 70 | } 71 | 72 | 73 | #endif 74 | 75 | 76 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/libraries/U8glib/utility/u8g_com_null.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_com_null.c 4 | 5 | communication null device 6 | 7 | Universal 8bit Graphics Library 8 | 9 | Copyright (c) 2011, olikraus@gmail.com 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without modification, 13 | are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this list 16 | of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright notice, this 19 | list of conditions and the following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 23 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 24 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 32 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 34 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | 37 | */ 38 | 39 | #include "u8g.h" 40 | 41 | uint8_t u8g_com_null_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) 42 | { 43 | switch(msg) 44 | { 45 | case U8G_COM_MSG_INIT: 46 | break; 47 | case U8G_COM_MSG_STOP: 48 | break; 49 | 50 | 51 | case U8G_COM_MSG_CHIP_SELECT: 52 | /* arg_val contains the chip number, which should be enabled */ 53 | break; 54 | 55 | 56 | case U8G_COM_MSG_WRITE_BYTE: 57 | break; 58 | case U8G_COM_MSG_WRITE_SEQ: 59 | break; 60 | } 61 | return 1; 62 | } 63 | 64 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/libraries/U8glib/utility/u8g_dev_null.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_dev_null.c 4 | 5 | Universal 8bit Graphics Library 6 | 7 | Copyright (c) 2011, olikraus@gmail.com 8 | All rights reserved. 9 | 10 | Redistribution and use in source and binary forms, with or without modification, 11 | are permitted provided that the following conditions are met: 12 | 13 | * Redistributions of source code must retain the above copyright notice, this list 14 | of conditions and the following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above copyright notice, this 17 | list of conditions and the following disclaimer in the documentation and/or other 18 | materials provided with the distribution. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 21 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 22 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 32 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | 35 | */ 36 | 37 | #include "u8g.h" 38 | 39 | uint8_t u8g_dev_null(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) 40 | { 41 | switch(msg) 42 | { 43 | case U8G_DEV_MSG_SET_8PIXEL: /* most often used command */ 44 | break; 45 | case U8G_DEV_MSG_SET_PIXEL: 46 | break; 47 | case U8G_DEV_MSG_INIT: 48 | break; 49 | case U8G_DEV_MSG_STOP: 50 | break; 51 | case U8G_DEV_MSG_PAGE_FIRST: 52 | break; 53 | case U8G_DEV_MSG_PAGE_NEXT: 54 | break; 55 | #ifdef U8G_DEV_MSG_IS_BBX_INTERSECTION 56 | case U8G_DEV_MSG_IS_BBX_INTERSECTION: 57 | return 1; 58 | #endif 59 | case U8G_DEV_MSG_GET_PAGE_BOX: 60 | break; 61 | case U8G_DEV_MSG_SET_COLOR_INDEX: 62 | break; 63 | case U8G_DEV_MSG_SET_XY_CB: 64 | break; 65 | } 66 | return 1; 67 | } 68 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/libraries/U8glib/utility/u8g_font_data.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/Arduino/ArduinoAddons/Arduino_1.0.x/libraries/U8glib/utility/u8g_font_data.c -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/libraries/U8glib/utility/u8g_page.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_page.c 4 | 5 | page helper functions, only called by the dev handler. 6 | 7 | Universal 8bit Graphics Library 8 | 9 | Copyright (c) 2011, olikraus@gmail.com 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without modification, 13 | are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this list 16 | of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright notice, this 19 | list of conditions and the following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 23 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 24 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 32 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 34 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | 37 | */ 38 | 39 | #include "u8g.h" 40 | 41 | /* 42 | setup page count structure 43 | conditions: page_height <= total_height 44 | */ 45 | void u8g_page_Init(u8g_page_t *p, u8g_uint_t page_height, u8g_uint_t total_height ) 46 | { 47 | p->page_height = page_height; 48 | p->total_height = total_height; 49 | p->page = 0; 50 | u8g_page_First(p); 51 | } 52 | 53 | void u8g_page_First(u8g_page_t *p) 54 | { 55 | p->page_y0 = 0; 56 | p->page_y1 = p->page_height; 57 | p->page_y1--; 58 | p->page = 0; 59 | } 60 | 61 | uint8_t u8g_page_Next(u8g_page_t * p) 62 | { 63 | register u8g_uint_t y1; 64 | p->page_y0 += p->page_height; 65 | if ( p->page_y0 >= p->total_height ) 66 | return 0; 67 | p->page++; 68 | y1 = p->page_y1; 69 | y1 += p->page_height; 70 | if ( y1 >= p->total_height ) 71 | { 72 | y1 = p->total_height; 73 | y1--; 74 | } 75 | p->page_y1 = y1; 76 | 77 | return 1; 78 | } 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/libraries/U8glib/utility/u8g_u16toa.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_u16toa.c 4 | 5 | 6 | Universal 8bit Graphics Library 7 | 8 | Copyright (c) 2012, olikraus@gmail.com 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without modification, 12 | are permitted provided that the following conditions are met: 13 | 14 | * Redistributions of source code must retain the above copyright notice, this list 15 | of conditions and the following disclaimer. 16 | 17 | * Redistributions in binary form must reproduce the above copyright notice, this 18 | list of conditions and the following disclaimer in the documentation and/or other 19 | materials provided with the distribution. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 22 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 23 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | */ 36 | 37 | 38 | #include "u8g.h" 39 | 40 | const char *u8g_u16toap(char * dest, uint16_t v) 41 | { 42 | uint8_t pos; 43 | uint8_t d; 44 | uint16_t c; 45 | c = 10000; 46 | for( pos = 0; pos < 5; pos++ ) 47 | { 48 | d = '0'; 49 | while( v >= c ) 50 | { 51 | v -= c; 52 | d++; 53 | } 54 | dest[pos] = d; 55 | c /= 10; 56 | } 57 | dest[5] = '\0'; 58 | return dest; 59 | } 60 | 61 | /* v = value, d = number of digits */ 62 | const char *u8g_u16toa(uint16_t v, uint8_t d) 63 | { 64 | static char buf[6]; 65 | d = 5-d; 66 | return u8g_u16toap(buf, v) + d; 67 | } 68 | 69 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.0.x/libraries/U8glib/utility/u8g_u8toa.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_u8toa.c 4 | 5 | 6 | Universal 8bit Graphics Library 7 | 8 | Copyright (c) 2011, olikraus@gmail.com 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without modification, 12 | are permitted provided that the following conditions are met: 13 | 14 | * Redistributions of source code must retain the above copyright notice, this list 15 | of conditions and the following disclaimer. 16 | 17 | * Redistributions in binary form must reproduce the above copyright notice, this 18 | list of conditions and the following disclaimer in the documentation and/or other 19 | materials provided with the distribution. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 22 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 23 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | */ 36 | 37 | 38 | #include "u8g.h" 39 | 40 | static const unsigned char u8g_u8toa_tab[3] = { 100, 10, 1 } ; 41 | const char *u8g_u8toap(char * dest, uint8_t v) 42 | { 43 | uint8_t pos; 44 | uint8_t d; 45 | uint8_t c; 46 | for( pos = 0; pos < 3; pos++ ) 47 | { 48 | d = '0'; 49 | c = *(u8g_u8toa_tab+pos); 50 | while( v >= c ) 51 | { 52 | v -= c; 53 | d++; 54 | } 55 | dest[pos] = d; 56 | } 57 | dest[3] = '\0'; 58 | return dest; 59 | } 60 | 61 | /* v = value, d = number of digits */ 62 | const char *u8g_u8toa(uint8_t v, uint8_t d) 63 | { 64 | static char buf[4]; 65 | d = 3-d; 66 | return u8g_u8toap(buf, v) + d; 67 | } 68 | 69 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/boards.txt: -------------------------------------------------------------------------------- 1 | # See: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification 2 | 3 | ############################################################## 4 | 5 | menu.cpu=Processor 6 | 7 | ######################################## 8 | ## RAMBo 9 | ######################################## 10 | rambo.name=RAMBo 11 | 12 | rambo.upload.tool=arduino:avrdude 13 | rambo.upload.protocol=wiring 14 | rambo.upload.maximum_size=258048 15 | rambo.upload.speed=115200 16 | 17 | rambo.bootloader.low_fuses=0xFF 18 | rambo.bootloader.high_fuses=0xD8 19 | rambo.bootloader.extended_fuses=0xFD 20 | rambo.bootloader.path=stk500v2 21 | rambo.bootloader.file=stk500boot_v2_mega2560.hex 22 | rambo.bootloader.unlock_bits=0x3F 23 | rambo.bootloader.lock_bits=0x0F 24 | 25 | rambo.build.mcu=atmega2560 26 | rambo.build.f_cpu=16000000L 27 | rambo.build.board=AVR_RAMBO 28 | rambo.build.core=arduino:arduino 29 | rambo.build.variant=rambo 30 | 31 | ######################################## 32 | ## Sanguino 33 | ######################################## 34 | sanguino.name=Sanguino 35 | 36 | sanguino.upload.tool=ardunio:avrdude 37 | sanguino.upload.protocol=stk500 38 | sanguino.upload.maximum_size=131072 39 | sanguino.upload.speed=57600 40 | 41 | sanguino.bootloader.low_fuses=0xD6 42 | sanguino.bootloader.high_fuses=0xDA 43 | sanguino.bootloader.extended_fuses=0xFD 44 | sanguino.bootloader.path=atmega 45 | sanguino.bootloader.unlock_bits=0x3F 46 | sanguino.bootloader.lock_bits=0x0F 47 | 48 | sanguino.build.mcu=atmega1284p 49 | sanguino.build.f_cpu=16000000L 50 | sanguino.build.board=AVR_SANGUINO 51 | sanguino.build.core=arduino:arduino 52 | sanguino.build.variant=sanguino 53 | 54 | sanguino.menu.cpu.atmega644=ATmega644P 55 | sanguino.menu.cpu.atmega644.upload.maximum_size=63488 56 | sanguino.menu.cpu.atmega644.bootloader.low_fuses=0xFF 57 | sanguino.menu.cpu.atmega644.bootloader.high_fuses=0x9A 58 | sanguino.menu.cpu.atmega644.bootloader.extended_fuses=0xFF 59 | sanguino.menu.cpu.atmega644.bootloader.file=ATmegaBOOT_168_atmega644p.hex 60 | sanguino.menu.cpu.atmega644.build.mcu=atmega644p 61 | 62 | sanguino.menu.cpu.atmega12848m=ATmega1284p 8MHz 63 | sanguino.menu.cpu.atmega12848m.upload.speed=19200 64 | sanguino.menu.cpu.atmega12848m.bootloader.file=ATmegaBOOT_168_atmega1284p_8m.hex 65 | sanguino.menu.cpu.atmega12848m.build.f_cpu=8000000L 66 | 67 | sanguino.menu.cpu.atmega1284=ATmega1284p 16MHz 68 | sanguino.menu.cpu.atmega1284.bootloader.file=ATmegaBOOT_168_atmega1284p.hex 69 | 70 | sanguino.menu.cpu.atmega1284m=ATmega1284p 20MHz 71 | sanguino.menu.cpu.atmega1284m.bootloader.file=ATmegaBOOT_168_atmega1284p.hex 72 | sanguino.menu.cpu.atmega1284m.build.f_cpu=20000000L 73 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/libraries/U8glib/INSTALL.TXT: -------------------------------------------------------------------------------- 1 | 2 | U8GLIB 3 | http://code.google.com/p/u8glib/ 4 | 5 | 6 | Install instructions for the Arduino environment. 7 | 8 | 1. Unzip u8glib_arduino_vX.XX.zip into the "libraries" folder 9 | 2. Start Arduino IDE 10 | 11 | Install instructions for the Chipkit (Arduino) environment. 12 | 13 | 1. cd /libraries 14 | 2. unzip u8glib_arduino_vX.XX.zip 15 | 3. cd ///hardware/pic32/libraries 16 | 4. again: u8glib_arduino_vX.XX.zip 17 | 5. Open hardware/pic32/cores/pic32/Print.h 18 | Remove line 19 | #define BYTE 0 20 | from the file, use PRINT_BYTE instead of BYTE. 21 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/libraries/U8glib/utility/chessengine.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/Arduino/ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/libraries/U8glib/utility/chessengine.c -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/libraries/U8glib/utility/u8g_com_arduino_common.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_com_arduino_common.c 4 | 5 | shared procedures for the arduino communication procedures 6 | 7 | Universal 8bit Graphics Library 8 | 9 | Copyright (c) 2011, olikraus@gmail.com 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without modification, 13 | are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this list 16 | of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright notice, this 19 | list of conditions and the following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 23 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 24 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 32 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 34 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | 37 | */ 38 | 39 | #include "u8g.h" 40 | 41 | #if defined(ARDUINO) 42 | 43 | #if ARDUINO < 100 44 | #include 45 | #else 46 | #include 47 | #endif 48 | 49 | void u8g_com_arduino_digital_write(u8g_t *u8g, uint8_t pin_index, uint8_t value) 50 | { 51 | uint8_t pin; 52 | pin = u8g->pin_list[pin_index]; 53 | if ( pin != U8G_PIN_NONE ) 54 | digitalWrite(pin, value); 55 | } 56 | 57 | /* this procedure does not set the RW pin */ 58 | void u8g_com_arduino_assign_pin_output_high(u8g_t *u8g) 59 | { 60 | uint8_t i; 61 | /* skip the RW pin, which is the last pin in the list */ 62 | for( i = 0; i < U8G_PIN_LIST_LEN-1; i++ ) 63 | { 64 | if ( u8g->pin_list[i] != U8G_PIN_NONE ) 65 | { 66 | pinMode(u8g->pin_list[i], OUTPUT); 67 | digitalWrite(u8g->pin_list[i], HIGH); 68 | } 69 | } 70 | } 71 | 72 | 73 | #endif 74 | 75 | 76 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/libraries/U8glib/utility/u8g_com_null.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_com_null.c 4 | 5 | communication null device 6 | 7 | Universal 8bit Graphics Library 8 | 9 | Copyright (c) 2011, olikraus@gmail.com 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without modification, 13 | are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this list 16 | of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright notice, this 19 | list of conditions and the following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 23 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 24 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 32 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 34 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | 37 | */ 38 | 39 | #include "u8g.h" 40 | 41 | uint8_t u8g_com_null_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) 42 | { 43 | switch(msg) 44 | { 45 | case U8G_COM_MSG_INIT: 46 | break; 47 | case U8G_COM_MSG_STOP: 48 | break; 49 | 50 | 51 | case U8G_COM_MSG_CHIP_SELECT: 52 | /* arg_val contains the chip number, which should be enabled */ 53 | break; 54 | 55 | 56 | case U8G_COM_MSG_WRITE_BYTE: 57 | break; 58 | case U8G_COM_MSG_WRITE_SEQ: 59 | break; 60 | } 61 | return 1; 62 | } 63 | 64 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/libraries/U8glib/utility/u8g_dev_null.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_dev_null.c 4 | 5 | Universal 8bit Graphics Library 6 | 7 | Copyright (c) 2011, olikraus@gmail.com 8 | All rights reserved. 9 | 10 | Redistribution and use in source and binary forms, with or without modification, 11 | are permitted provided that the following conditions are met: 12 | 13 | * Redistributions of source code must retain the above copyright notice, this list 14 | of conditions and the following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above copyright notice, this 17 | list of conditions and the following disclaimer in the documentation and/or other 18 | materials provided with the distribution. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 21 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 22 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 27 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 30 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 32 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | 34 | 35 | */ 36 | 37 | #include "u8g.h" 38 | 39 | uint8_t u8g_dev_null(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) 40 | { 41 | switch(msg) 42 | { 43 | case U8G_DEV_MSG_SET_8PIXEL: /* most often used command */ 44 | break; 45 | case U8G_DEV_MSG_SET_PIXEL: 46 | break; 47 | case U8G_DEV_MSG_INIT: 48 | break; 49 | case U8G_DEV_MSG_STOP: 50 | break; 51 | case U8G_DEV_MSG_PAGE_FIRST: 52 | break; 53 | case U8G_DEV_MSG_PAGE_NEXT: 54 | break; 55 | #ifdef U8G_DEV_MSG_IS_BBX_INTERSECTION 56 | case U8G_DEV_MSG_IS_BBX_INTERSECTION: 57 | return 1; 58 | #endif 59 | case U8G_DEV_MSG_GET_PAGE_BOX: 60 | break; 61 | case U8G_DEV_MSG_SET_COLOR_INDEX: 62 | break; 63 | case U8G_DEV_MSG_SET_XY_CB: 64 | break; 65 | } 66 | return 1; 67 | } 68 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/libraries/U8glib/utility/u8g_font_data.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/Arduino/ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/libraries/U8glib/utility/u8g_font_data.c -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/libraries/U8glib/utility/u8g_page.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_page.c 4 | 5 | page helper functions, only called by the dev handler. 6 | 7 | Universal 8bit Graphics Library 8 | 9 | Copyright (c) 2011, olikraus@gmail.com 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without modification, 13 | are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this list 16 | of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright notice, this 19 | list of conditions and the following disclaimer in the documentation and/or other 20 | materials provided with the distribution. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 23 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 24 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 30 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 32 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 34 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | 37 | */ 38 | 39 | #include "u8g.h" 40 | 41 | /* 42 | setup page count structure 43 | conditions: page_height <= total_height 44 | */ 45 | void u8g_page_Init(u8g_page_t *p, u8g_uint_t page_height, u8g_uint_t total_height ) 46 | { 47 | p->page_height = page_height; 48 | p->total_height = total_height; 49 | p->page = 0; 50 | u8g_page_First(p); 51 | } 52 | 53 | void u8g_page_First(u8g_page_t *p) 54 | { 55 | p->page_y0 = 0; 56 | p->page_y1 = p->page_height; 57 | p->page_y1--; 58 | p->page = 0; 59 | } 60 | 61 | uint8_t u8g_page_Next(u8g_page_t * p) 62 | { 63 | register u8g_uint_t y1; 64 | p->page_y0 += p->page_height; 65 | if ( p->page_y0 >= p->total_height ) 66 | return 0; 67 | p->page++; 68 | y1 = p->page_y1; 69 | y1 += p->page_height; 70 | if ( y1 >= p->total_height ) 71 | { 72 | y1 = p->total_height; 73 | y1--; 74 | } 75 | p->page_y1 = y1; 76 | 77 | return 1; 78 | } 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/libraries/U8glib/utility/u8g_u16toa.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_u16toa.c 4 | 5 | 6 | Universal 8bit Graphics Library 7 | 8 | Copyright (c) 2012, olikraus@gmail.com 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without modification, 12 | are permitted provided that the following conditions are met: 13 | 14 | * Redistributions of source code must retain the above copyright notice, this list 15 | of conditions and the following disclaimer. 16 | 17 | * Redistributions in binary form must reproduce the above copyright notice, this 18 | list of conditions and the following disclaimer in the documentation and/or other 19 | materials provided with the distribution. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 22 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 23 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | */ 36 | 37 | 38 | #include "u8g.h" 39 | 40 | const char *u8g_u16toap(char * dest, uint16_t v) 41 | { 42 | uint8_t pos; 43 | uint8_t d; 44 | uint16_t c; 45 | c = 10000; 46 | for( pos = 0; pos < 5; pos++ ) 47 | { 48 | d = '0'; 49 | while( v >= c ) 50 | { 51 | v -= c; 52 | d++; 53 | } 54 | dest[pos] = d; 55 | c /= 10; 56 | } 57 | dest[5] = '\0'; 58 | return dest; 59 | } 60 | 61 | /* v = value, d = number of digits */ 62 | const char *u8g_u16toa(uint16_t v, uint8_t d) 63 | { 64 | static char buf[6]; 65 | d = 5-d; 66 | return u8g_u16toap(buf, v) + d; 67 | } 68 | 69 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/libraries/U8glib/utility/u8g_u8toa.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | u8g_u8toa.c 4 | 5 | 6 | Universal 8bit Graphics Library 7 | 8 | Copyright (c) 2011, olikraus@gmail.com 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without modification, 12 | are permitted provided that the following conditions are met: 13 | 14 | * Redistributions of source code must retain the above copyright notice, this list 15 | of conditions and the following disclaimer. 16 | 17 | * Redistributions in binary form must reproduce the above copyright notice, this 18 | list of conditions and the following disclaimer in the documentation and/or other 19 | materials provided with the distribution. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 22 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 23 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 33 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | */ 36 | 37 | 38 | #include "u8g.h" 39 | 40 | static const unsigned char u8g_u8toa_tab[3] = { 100, 10, 1 } ; 41 | const char *u8g_u8toap(char * dest, uint8_t v) 42 | { 43 | uint8_t pos; 44 | uint8_t d; 45 | uint8_t c; 46 | for( pos = 0; pos < 3; pos++ ) 47 | { 48 | d = '0'; 49 | c = *(u8g_u8toa_tab+pos); 50 | while( v >= c ) 51 | { 52 | v -= c; 53 | d++; 54 | } 55 | dest[pos] = d; 56 | } 57 | dest[3] = '\0'; 58 | return dest; 59 | } 60 | 61 | /* v = value, d = number of digits */ 62 | const char *u8g_u8toa(uint8_t v, uint8_t d) 63 | { 64 | static char buf[4]; 65 | d = 3-d; 66 | return u8g_u8toap(buf, v) + d; 67 | } 68 | 69 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.5.x/hardware/marlin/avr/platform.txt: -------------------------------------------------------------------------------- 1 | 2 | # Marlin AVR Core and platform. 3 | # ------------------------------ 4 | 5 | # For more info: 6 | # https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification 7 | 8 | name=Marlin AVR Boards 9 | version=1.5.6 10 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Gen7-dist/cores/arduino/Client.h: -------------------------------------------------------------------------------- 1 | #ifndef client_h 2 | #define client_h 3 | #include "Print.h" 4 | #include "Stream.h" 5 | #include "IPAddress.h" 6 | 7 | class Client : public Stream { 8 | 9 | public: 10 | virtual int connect(IPAddress ip, uint16_t port) =0; 11 | virtual int connect(const char *host, uint16_t port) =0; 12 | virtual size_t write(uint8_t) =0; 13 | virtual size_t write(const uint8_t *buf, size_t size) =0; 14 | virtual int available() = 0; 15 | virtual int read() = 0; 16 | virtual int read(uint8_t *buf, size_t size) = 0; 17 | virtual int peek() = 0; 18 | virtual void flush() = 0; 19 | virtual void stop() = 0; 20 | virtual uint8_t connected() = 0; 21 | virtual operator bool() = 0; 22 | protected: 23 | uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; 24 | }; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Gen7-dist/cores/arduino/IPAddress.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | IPAddress::IPAddress() 6 | { 7 | memset(_address, 0, sizeof(_address)); 8 | } 9 | 10 | IPAddress::IPAddress(uint8_t first_octet, uint8_t second_octet, uint8_t third_octet, uint8_t fourth_octet) 11 | { 12 | _address[0] = first_octet; 13 | _address[1] = second_octet; 14 | _address[2] = third_octet; 15 | _address[3] = fourth_octet; 16 | } 17 | 18 | IPAddress::IPAddress(uint32_t address) 19 | { 20 | memcpy(_address, &address, sizeof(_address)); 21 | } 22 | 23 | IPAddress::IPAddress(const uint8_t *address) 24 | { 25 | memcpy(_address, address, sizeof(_address)); 26 | } 27 | 28 | IPAddress& IPAddress::operator=(const uint8_t *address) 29 | { 30 | memcpy(_address, address, sizeof(_address)); 31 | return *this; 32 | } 33 | 34 | IPAddress& IPAddress::operator=(uint32_t address) 35 | { 36 | memcpy(_address, (const uint8_t *)&address, sizeof(_address)); 37 | return *this; 38 | } 39 | 40 | bool IPAddress::operator==(const uint8_t* addr) 41 | { 42 | return memcmp(addr, _address, sizeof(_address)) == 0; 43 | } 44 | 45 | size_t IPAddress::printTo(Print& p) const 46 | { 47 | size_t n = 0; 48 | for (int i =0; i < 3; i++) 49 | { 50 | n += p.print(_address[i], DEC); 51 | n += p.print('.'); 52 | } 53 | n += p.print(_address[3], DEC); 54 | return n; 55 | } 56 | 57 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Gen7-dist/cores/arduino/Platform.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __PLATFORM_H__ 3 | #define __PLATFORM_H__ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | typedef unsigned char u8; 12 | typedef unsigned short u16; 13 | typedef unsigned long u32; 14 | 15 | #include "Arduino.h" 16 | 17 | #if defined(USBCON) 18 | #include "USBDesc.h" 19 | #include "USBCore.h" 20 | #include "USBAPI.h" 21 | #endif /* if defined(USBCON) */ 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Gen7-dist/cores/arduino/Printable.h: -------------------------------------------------------------------------------- 1 | /* 2 | Printable.h - Interface class that allows printing of complex types 3 | Copyright (c) 2011 Adrian McEwen. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef Printable_h 21 | #define Printable_h 22 | 23 | #include 24 | 25 | class Print; 26 | 27 | /** The Printable class provides a way for new classes to allow themselves to be printed. 28 | By deriving from Printable and implementing the printTo method, it will then be possible 29 | for users to print out instances of this class by passing them into the usual 30 | Print::print and Print::println methods. 31 | */ 32 | 33 | class Printable 34 | { 35 | public: 36 | virtual size_t printTo(Print& p) const = 0; 37 | }; 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Gen7-dist/cores/arduino/Server.h: -------------------------------------------------------------------------------- 1 | #ifndef server_h 2 | #define server_h 3 | 4 | class Server : public Print { 5 | public: 6 | virtual void begin() =0; 7 | }; 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Gen7-dist/cores/arduino/USBDesc.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* Copyright (c) 2011, Peter Barrett 4 | ** 5 | ** Permission to use, copy, modify, and/or distribute this software for 6 | ** any purpose with or without fee is hereby granted, provided that the 7 | ** above copyright notice and this permission notice appear in all copies. 8 | ** 9 | ** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 | ** WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR 12 | ** BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES 13 | ** OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 14 | ** WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 15 | ** ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 16 | ** SOFTWARE. 17 | */ 18 | 19 | #define CDC_ENABLED 20 | #define HID_ENABLED 21 | 22 | 23 | #ifdef CDC_ENABLED 24 | #define CDC_INTERFACE_COUNT 2 25 | #define CDC_ENPOINT_COUNT 3 26 | #else 27 | #define CDC_INTERFACE_COUNT 0 28 | #define CDC_ENPOINT_COUNT 0 29 | #endif 30 | 31 | #ifdef HID_ENABLED 32 | #define HID_INTERFACE_COUNT 1 33 | #define HID_ENPOINT_COUNT 1 34 | #else 35 | #define HID_INTERFACE_COUNT 0 36 | #define HID_ENPOINT_COUNT 0 37 | #endif 38 | 39 | #define CDC_ACM_INTERFACE 0 // CDC ACM 40 | #define CDC_DATA_INTERFACE 1 // CDC Data 41 | #define CDC_FIRST_ENDPOINT 1 42 | #define CDC_ENDPOINT_ACM (CDC_FIRST_ENDPOINT) // CDC First 43 | #define CDC_ENDPOINT_OUT (CDC_FIRST_ENDPOINT+1) 44 | #define CDC_ENDPOINT_IN (CDC_FIRST_ENDPOINT+2) 45 | 46 | #define HID_INTERFACE (CDC_ACM_INTERFACE + CDC_INTERFACE_COUNT) // HID Interface 47 | #define HID_FIRST_ENDPOINT (CDC_FIRST_ENDPOINT + CDC_ENPOINT_COUNT) 48 | #define HID_ENDPOINT_INT (HID_FIRST_ENDPOINT) 49 | 50 | #define INTERFACE_COUNT (MSC_INTERFACE + MSC_INTERFACE_COUNT) 51 | 52 | #ifdef CDC_ENABLED 53 | #define CDC_RX CDC_ENDPOINT_OUT 54 | #define CDC_TX CDC_ENDPOINT_IN 55 | #endif 56 | 57 | #ifdef HID_ENABLED 58 | #define HID_TX HID_ENDPOINT_INT 59 | #endif 60 | 61 | #define IMANUFACTURER 1 62 | #define IPRODUCT 2 63 | 64 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Gen7-dist/cores/arduino/WMath.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | 3 | /* 4 | Part of the Wiring project - http://wiring.org.co 5 | Copyright (c) 2004-06 Hernando Barragan 6 | Modified 13 August 2006, David A. Mellis for Arduino - http://www.arduino.cc/ 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id$ 24 | */ 25 | 26 | extern "C" { 27 | #include "stdlib.h" 28 | } 29 | 30 | void randomSeed(unsigned int seed) 31 | { 32 | if (seed != 0) { 33 | srandom(seed); 34 | } 35 | } 36 | 37 | long random(long howbig) 38 | { 39 | if (howbig == 0) { 40 | return 0; 41 | } 42 | return random() % howbig; 43 | } 44 | 45 | long random(long howsmall, long howbig) 46 | { 47 | if (howsmall >= howbig) { 48 | return howsmall; 49 | } 50 | long diff = howbig - howsmall; 51 | return random(diff) + howsmall; 52 | } 53 | 54 | long map(long x, long in_min, long in_max, long out_min, long out_max) 55 | { 56 | return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; 57 | } 58 | 59 | unsigned int makeWord(unsigned int w) { return w; } 60 | unsigned int makeWord(unsigned char h, unsigned char l) { return (h << 8) | l; } -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Gen7-dist/cores/arduino/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | init(); 6 | 7 | #if defined(USBCON) 8 | USBDevice.attach(); 9 | #endif 10 | 11 | setup(); 12 | 13 | for (;;) { 14 | loop(); 15 | if (serialEventRun) serialEventRun(); 16 | } 17 | 18 | return 0; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Gen7-dist/cores/arduino/new.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void * operator new(size_t size) 4 | { 5 | return malloc(size); 6 | } 7 | 8 | void operator delete(void * ptr) 9 | { 10 | free(ptr); 11 | } 12 | 13 | int __cxa_guard_acquire(__guard *g) {return !*(char *)(g);}; 14 | void __cxa_guard_release (__guard *g) {*(char *)g = 1;}; 15 | void __cxa_guard_abort (__guard *) {}; 16 | 17 | void __cxa_pure_virtual(void) {}; 18 | 19 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Gen7-dist/cores/arduino/new.h: -------------------------------------------------------------------------------- 1 | /* Header to define new/delete operators as they aren't provided by avr-gcc by default 2 | Taken from http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=59453 3 | */ 4 | 5 | #ifndef NEW_H 6 | #define NEW_H 7 | 8 | #include 9 | 10 | void * operator new(size_t size); 11 | void operator delete(void * ptr); 12 | 13 | __extension__ typedef int __guard __attribute__((mode (__DI__))); 14 | 15 | extern "C" int __cxa_guard_acquire(__guard *); 16 | extern "C" void __cxa_guard_release (__guard *); 17 | extern "C" void __cxa_guard_abort (__guard *); 18 | 19 | extern "C" void __cxa_pure_virtual(void); 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Gen7-dist/cores/arduino/wiring_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | wiring_private.h - Internal header file. 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2005-2006 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | $Id: wiring.h 239 2007-01-12 17:58:39Z mellis $ 23 | */ 24 | 25 | #ifndef WiringPrivate_h 26 | #define WiringPrivate_h 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #include "Arduino.h" 34 | 35 | #ifdef __cplusplus 36 | extern "C"{ 37 | #endif 38 | 39 | #ifndef cbi 40 | #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) 41 | #endif 42 | #ifndef sbi 43 | #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) 44 | #endif 45 | 46 | #define EXTERNAL_INT_0 0 47 | #define EXTERNAL_INT_1 1 48 | #define EXTERNAL_INT_2 2 49 | #define EXTERNAL_INT_3 3 50 | #define EXTERNAL_INT_4 4 51 | #define EXTERNAL_INT_5 5 52 | #define EXTERNAL_INT_6 6 53 | #define EXTERNAL_INT_7 7 54 | 55 | #if defined (SIG_INTERRUPT7) 56 | #define EXTERNAL_NUM_INTERRUPTS 8 57 | #elif defined (SIG_INTERRUPT2) 58 | #define EXTERNAL_NUM_INTERRUPTS 3 59 | #elif defined(__AVR_ATmega32U4__) 60 | #define EXTERNAL_NUM_INTERRUPTS 4 61 | #else 62 | #define EXTERNAL_NUM_INTERRUPTS 2 63 | #endif 64 | 65 | typedef void (*voidFuncPtr)(void); 66 | 67 | #ifdef __cplusplus 68 | } // extern "C" 69 | #endif 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Gen7-dist/cores/arduino/wiring_shift.c: -------------------------------------------------------------------------------- 1 | /* 2 | wiring_shift.c - shiftOut() function 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2005-2006 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | $Id: wiring.c 248 2007-02-03 15:36:30Z mellis $ 23 | */ 24 | 25 | #include "wiring_private.h" 26 | 27 | uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder) { 28 | uint8_t value = 0; 29 | uint8_t i; 30 | 31 | for (i = 0; i < 8; ++i) { 32 | digitalWrite(clockPin, HIGH); 33 | if (bitOrder == LSBFIRST) 34 | value |= digitalRead(dataPin) << i; 35 | else 36 | value |= digitalRead(dataPin) << (7 - i); 37 | digitalWrite(clockPin, LOW); 38 | } 39 | return value; 40 | } 41 | 42 | void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val) 43 | { 44 | uint8_t i; 45 | 46 | for (i = 0; i < 8; i++) { 47 | if (bitOrder == LSBFIRST) 48 | digitalWrite(dataPin, !!(val & (1 << i))); 49 | else 50 | digitalWrite(dataPin, !!(val & (1 << (7 - i)))); 51 | 52 | digitalWrite(clockPin, HIGH); 53 | digitalWrite(clockPin, LOW); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Melzi/boards.txt: -------------------------------------------------------------------------------- 1 | ############################################################## 2 | 3 | atmega1284.name=Melzi W/ ATmega1284p 16mhz 4 | 5 | atmega1284.upload.protocol=arduino 6 | atmega1284.upload.maximum_size=129024 7 | atmega1284.upload.speed=57600 8 | 9 | atmega1284.bootloader.low_fuses=0xD6 10 | atmega1284.bootloader.high_fuses=0xD4 11 | atmega1284.bootloader.extended_fuses=0xFD 12 | atmega1284.bootloader.path=atmega644p 13 | atmega1284.bootloader.file=ATmegaBOOT_1284P.hex 14 | atmega1284.bootloader.unlock_bits=0x3F 15 | atmega1284.bootloader.lock_bits=0x0F 16 | 17 | atmega1284.build.mcu=atmega1284p 18 | atmega1284.build.f_cpu=16000000L 19 | atmega1284.build.core=arduino 20 | atmega1284.build.variant=standard 21 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Melzi/bootloaders/atmega644p/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for ATmegaBOOT 2 | # E.Lins, 18.7.2005 3 | # $Id$ 4 | 5 | 6 | # program name should not be changed... 7 | PROGRAM = ATmegaBOOT_1284P 8 | 9 | # enter the target CPU frequency 10 | AVR_FREQ = 16000000L 11 | 12 | MCU_TARGET = atmega1284p 13 | LDSECTION = --section-start=.text=0x1F800 14 | 15 | OBJ = $(PROGRAM).o 16 | OPTIMIZE = -Os 17 | 18 | DEFS = -DWATCHDOG_MODS -DBAUD_RATE=57600 19 | LIBS = 20 | 21 | CC = avr-gcc 22 | 23 | 24 | # Override is only needed by avr-lib build system. 25 | 26 | override CFLAGS = -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS) 27 | override LDFLAGS = -Wl,$(LDSECTION) 28 | #override LDFLAGS = -Wl,-Map,$(PROGRAM).map,$(LDSECTION) 29 | 30 | OBJCOPY = avr-objcopy 31 | OBJDUMP = avr-objdump 32 | 33 | all: CFLAGS += '-DMAX_TIME_COUNT=16000000L>>1' -DADABOOT 34 | all: $(PROGRAM).hex 35 | 36 | $(PROGRAM).hex: $(PROGRAM).elf 37 | $(OBJCOPY) -j .text -j .data -O ihex $< $@ 38 | 39 | $(PROGRAM).elf: $(OBJ) 40 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) 41 | 42 | $(OBJ): ATmegaBOOT.c 43 | avr-gcc $(CFLAGS) $(LDFLAGS) -c -Wall -mmcu=$(MCU_TARGET) ATmegaBOOT.c -o $(PROGRAM).o 44 | 45 | %.lst: %.elf 46 | $(OBJDUMP) -h -S $< > $@ 47 | 48 | %.srec: %.elf 49 | $(OBJCOPY) -j .text -j .data -O srec $< $@ 50 | 51 | %.bin: %.elf 52 | $(OBJCOPY) -j .text -j .data -O binary $< $@ 53 | 54 | clean: 55 | rm -rf *.o *.elf *.lst *.map *.sym *.lss *.eep *.srec *.bin *.hex 56 | 57 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Melzi/cores/arduino/Client.h: -------------------------------------------------------------------------------- 1 | #ifndef client_h 2 | #define client_h 3 | #include "Print.h" 4 | #include "Stream.h" 5 | #include "IPAddress.h" 6 | 7 | class Client : public Stream { 8 | 9 | public: 10 | virtual int connect(IPAddress ip, uint16_t port) =0; 11 | virtual int connect(const char *host, uint16_t port) =0; 12 | virtual size_t write(uint8_t) =0; 13 | virtual size_t write(const uint8_t *buf, size_t size) =0; 14 | virtual int available() = 0; 15 | virtual int read() = 0; 16 | virtual int read(uint8_t *buf, size_t size) = 0; 17 | virtual int peek() = 0; 18 | virtual void flush() = 0; 19 | virtual void stop() = 0; 20 | virtual uint8_t connected() = 0; 21 | virtual operator bool() = 0; 22 | protected: 23 | uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; 24 | }; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Melzi/cores/arduino/IPAddress.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | IPAddress::IPAddress() 6 | { 7 | memset(_address, 0, sizeof(_address)); 8 | } 9 | 10 | IPAddress::IPAddress(uint8_t first_octet, uint8_t second_octet, uint8_t third_octet, uint8_t fourth_octet) 11 | { 12 | _address[0] = first_octet; 13 | _address[1] = second_octet; 14 | _address[2] = third_octet; 15 | _address[3] = fourth_octet; 16 | } 17 | 18 | IPAddress::IPAddress(uint32_t address) 19 | { 20 | memcpy(_address, &address, sizeof(_address)); 21 | } 22 | 23 | IPAddress::IPAddress(const uint8_t *address) 24 | { 25 | memcpy(_address, address, sizeof(_address)); 26 | } 27 | 28 | IPAddress& IPAddress::operator=(const uint8_t *address) 29 | { 30 | memcpy(_address, address, sizeof(_address)); 31 | return *this; 32 | } 33 | 34 | IPAddress& IPAddress::operator=(uint32_t address) 35 | { 36 | memcpy(_address, (const uint8_t *)&address, sizeof(_address)); 37 | return *this; 38 | } 39 | 40 | bool IPAddress::operator==(const uint8_t* addr) 41 | { 42 | return memcmp(addr, _address, sizeof(_address)) == 0; 43 | } 44 | 45 | size_t IPAddress::printTo(Print& p) const 46 | { 47 | size_t n = 0; 48 | for (int i =0; i < 3; i++) 49 | { 50 | n += p.print(_address[i], DEC); 51 | n += p.print('.'); 52 | } 53 | n += p.print(_address[3], DEC); 54 | return n; 55 | } 56 | 57 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Melzi/cores/arduino/Platform.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __PLATFORM_H__ 3 | #define __PLATFORM_H__ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | typedef unsigned char u8; 12 | typedef unsigned short u16; 13 | typedef unsigned long u32; 14 | 15 | #include "Arduino.h" 16 | 17 | #if defined(USBCON) 18 | #include "USBDesc.h" 19 | #include "USBCore.h" 20 | #include "USBAPI.h" 21 | #endif /* if defined(USBCON) */ 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Melzi/cores/arduino/Printable.h: -------------------------------------------------------------------------------- 1 | /* 2 | Printable.h - Interface class that allows printing of complex types 3 | Copyright (c) 2011 Adrian McEwen. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef Printable_h 21 | #define Printable_h 22 | 23 | #include 24 | 25 | class Print; 26 | 27 | /** The Printable class provides a way for new classes to allow themselves to be printed. 28 | By deriving from Printable and implementing the printTo method, it will then be possible 29 | for users to print out instances of this class by passing them into the usual 30 | Print::print and Print::println methods. 31 | */ 32 | 33 | class Printable 34 | { 35 | public: 36 | virtual size_t printTo(Print& p) const = 0; 37 | }; 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Melzi/cores/arduino/Server.h: -------------------------------------------------------------------------------- 1 | #ifndef server_h 2 | #define server_h 3 | 4 | class Server : public Print { 5 | public: 6 | virtual void begin() =0; 7 | }; 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Melzi/cores/arduino/USBDesc.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* Copyright (c) 2011, Peter Barrett 4 | ** 5 | ** Permission to use, copy, modify, and/or distribute this software for 6 | ** any purpose with or without fee is hereby granted, provided that the 7 | ** above copyright notice and this permission notice appear in all copies. 8 | ** 9 | ** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 | ** WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 | ** WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR 12 | ** BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES 13 | ** OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 14 | ** WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 15 | ** ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 16 | ** SOFTWARE. 17 | */ 18 | 19 | #define CDC_ENABLED 20 | #define HID_ENABLED 21 | 22 | 23 | #ifdef CDC_ENABLED 24 | #define CDC_INTERFACE_COUNT 2 25 | #define CDC_ENPOINT_COUNT 3 26 | #else 27 | #define CDC_INTERFACE_COUNT 0 28 | #define CDC_ENPOINT_COUNT 0 29 | #endif 30 | 31 | #ifdef HID_ENABLED 32 | #define HID_INTERFACE_COUNT 1 33 | #define HID_ENPOINT_COUNT 1 34 | #else 35 | #define HID_INTERFACE_COUNT 0 36 | #define HID_ENPOINT_COUNT 0 37 | #endif 38 | 39 | #define CDC_ACM_INTERFACE 0 // CDC ACM 40 | #define CDC_DATA_INTERFACE 1 // CDC Data 41 | #define CDC_FIRST_ENDPOINT 1 42 | #define CDC_ENDPOINT_ACM (CDC_FIRST_ENDPOINT) // CDC First 43 | #define CDC_ENDPOINT_OUT (CDC_FIRST_ENDPOINT+1) 44 | #define CDC_ENDPOINT_IN (CDC_FIRST_ENDPOINT+2) 45 | 46 | #define HID_INTERFACE (CDC_ACM_INTERFACE + CDC_INTERFACE_COUNT) // HID Interface 47 | #define HID_FIRST_ENDPOINT (CDC_FIRST_ENDPOINT + CDC_ENPOINT_COUNT) 48 | #define HID_ENDPOINT_INT (HID_FIRST_ENDPOINT) 49 | 50 | #define INTERFACE_COUNT (MSC_INTERFACE + MSC_INTERFACE_COUNT) 51 | 52 | #ifdef CDC_ENABLED 53 | #define CDC_RX CDC_ENDPOINT_OUT 54 | #define CDC_TX CDC_ENDPOINT_IN 55 | #endif 56 | 57 | #ifdef HID_ENABLED 58 | #define HID_TX HID_ENDPOINT_INT 59 | #endif 60 | 61 | #define IMANUFACTURER 1 62 | #define IPRODUCT 2 63 | 64 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Melzi/cores/arduino/WMath.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | 3 | /* 4 | Part of the Wiring project - http://wiring.org.co 5 | Copyright (c) 2004-06 Hernando Barragan 6 | Modified 13 August 2006, David A. Mellis for Arduino - http://www.arduino.cc/ 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id$ 24 | */ 25 | 26 | extern "C" { 27 | #include "stdlib.h" 28 | } 29 | 30 | void randomSeed(unsigned int seed) 31 | { 32 | if (seed != 0) { 33 | srandom(seed); 34 | } 35 | } 36 | 37 | long random(long howbig) 38 | { 39 | if (howbig == 0) { 40 | return 0; 41 | } 42 | return random() % howbig; 43 | } 44 | 45 | long random(long howsmall, long howbig) 46 | { 47 | if (howsmall >= howbig) { 48 | return howsmall; 49 | } 50 | long diff = howbig - howsmall; 51 | return random(diff) + howsmall; 52 | } 53 | 54 | long map(long x, long in_min, long in_max, long out_min, long out_max) 55 | { 56 | return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; 57 | } 58 | 59 | unsigned int makeWord(unsigned int w) { return w; } 60 | unsigned int makeWord(unsigned char h, unsigned char l) { return (h << 8) | l; } -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Melzi/cores/arduino/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | init(); 6 | 7 | #if defined(USBCON) 8 | USBDevice.attach(); 9 | #endif 10 | 11 | setup(); 12 | 13 | for (;;) { 14 | loop(); 15 | if (serialEventRun) serialEventRun(); 16 | } 17 | 18 | return 0; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Melzi/cores/arduino/new.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void * operator new(size_t size) 4 | { 5 | return malloc(size); 6 | } 7 | 8 | void operator delete(void * ptr) 9 | { 10 | free(ptr); 11 | } 12 | 13 | int __cxa_guard_acquire(__guard *g) {return !*(char *)(g);}; 14 | void __cxa_guard_release (__guard *g) {*(char *)g = 1;}; 15 | void __cxa_guard_abort (__guard *) {}; 16 | 17 | void __cxa_pure_virtual(void) {}; 18 | 19 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Melzi/cores/arduino/new.h: -------------------------------------------------------------------------------- 1 | /* Header to define new/delete operators as they aren't provided by avr-gcc by default 2 | Taken from http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=59453 3 | */ 4 | 5 | #ifndef NEW_H 6 | #define NEW_H 7 | 8 | #include 9 | 10 | void * operator new(size_t size); 11 | void operator delete(void * ptr); 12 | 13 | __extension__ typedef int __guard __attribute__((mode (__DI__))); 14 | 15 | extern "C" int __cxa_guard_acquire(__guard *); 16 | extern "C" void __cxa_guard_release (__guard *); 17 | extern "C" void __cxa_guard_abort (__guard *); 18 | 19 | extern "C" void __cxa_pure_virtual(void); 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Melzi/cores/arduino/wiring_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | wiring_private.h - Internal header file. 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2005-2006 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | $Id: wiring.h 239 2007-01-12 17:58:39Z mellis $ 23 | */ 24 | 25 | #ifndef WiringPrivate_h 26 | #define WiringPrivate_h 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #include "Arduino.h" 34 | 35 | #ifdef __cplusplus 36 | extern "C"{ 37 | #endif 38 | 39 | #ifndef cbi 40 | #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) 41 | #endif 42 | #ifndef sbi 43 | #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) 44 | #endif 45 | 46 | #define EXTERNAL_INT_0 0 47 | #define EXTERNAL_INT_1 1 48 | #define EXTERNAL_INT_2 2 49 | #define EXTERNAL_INT_3 3 50 | #define EXTERNAL_INT_4 4 51 | #define EXTERNAL_INT_5 5 52 | #define EXTERNAL_INT_6 6 53 | #define EXTERNAL_INT_7 7 54 | 55 | #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) 56 | #define EXTERNAL_NUM_INTERRUPTS 8 57 | #elif defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega644P__) 58 | #define EXTERNAL_NUM_INTERRUPTS 3 59 | #elif defined(__AVR_ATmega32U4__) 60 | #define EXTERNAL_NUM_INTERRUPTS 4 61 | #else 62 | #define EXTERNAL_NUM_INTERRUPTS 2 63 | #endif 64 | 65 | typedef void (*voidFuncPtr)(void); 66 | 67 | #ifdef __cplusplus 68 | } // extern "C" 69 | #endif 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /Arduino/ArduinoAddons/Arduino_1.x.x/hardware/Melzi/cores/arduino/wiring_shift.c: -------------------------------------------------------------------------------- 1 | /* 2 | wiring_shift.c - shiftOut() function 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2005-2006 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | $Id: wiring.c 248 2007-02-03 15:36:30Z mellis $ 23 | */ 24 | 25 | #include "wiring_private.h" 26 | 27 | uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder) { 28 | uint8_t value = 0; 29 | uint8_t i; 30 | 31 | for (i = 0; i < 8; ++i) { 32 | digitalWrite(clockPin, HIGH); 33 | if (bitOrder == LSBFIRST) 34 | value |= digitalRead(dataPin) << i; 35 | else 36 | value |= digitalRead(dataPin) << (7 - i); 37 | digitalWrite(clockPin, LOW); 38 | } 39 | return value; 40 | } 41 | 42 | void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val) 43 | { 44 | uint8_t i; 45 | 46 | for (i = 0; i < 8; i++) { 47 | if (bitOrder == LSBFIRST) 48 | digitalWrite(dataPin, !!(val & (1 << i))); 49 | else 50 | digitalWrite(dataPin, !!(val & (1 << (7 - i)))); 51 | 52 | digitalWrite(clockPin, HIGH); 53 | digitalWrite(clockPin, LOW); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Arduino/Marlin/BlinkM.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BlinkM.cpp - Library for controlling a BlinkM over i2c 3 | Created by Tim Koster, August 21 2013. 4 | */ 5 | #include "Marlin.h" 6 | #ifdef BLINKM 7 | 8 | #if (ARDUINO >= 100) 9 | # include "Arduino.h" 10 | #else 11 | # include "WProgram.h" 12 | #endif 13 | 14 | #include "BlinkM.h" 15 | 16 | void SendColors(byte red, byte grn, byte blu) 17 | { 18 | Wire.begin(); 19 | Wire.beginTransmission(0x09); 20 | Wire.write('o'); //to disable ongoing script, only needs to be used once 21 | Wire.write('n'); 22 | Wire.write(red); 23 | Wire.write(grn); 24 | Wire.write(blu); 25 | Wire.endTransmission(); 26 | } 27 | 28 | #endif //BLINKM 29 | 30 | -------------------------------------------------------------------------------- /Arduino/Marlin/BlinkM.h: -------------------------------------------------------------------------------- 1 | /* 2 | BlinkM.h 3 | Library header file for BlinkM library 4 | */ 5 | #if (ARDUINO >= 100) 6 | # include "Arduino.h" 7 | #else 8 | # include "WProgram.h" 9 | #endif 10 | 11 | #include "Wire.h" 12 | 13 | void SendColors(byte red, byte grn, byte blu); 14 | 15 | -------------------------------------------------------------------------------- /Arduino/Marlin/ConfigurationStore.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_STORE_H 2 | #define CONFIG_STORE_H 3 | 4 | #include "Configuration.h" 5 | 6 | void Config_ResetDefault(); 7 | 8 | #ifndef DISABLE_M503 9 | void Config_PrintSettings(); 10 | #else 11 | FORCE_INLINE void Config_PrintSettings() {} 12 | #endif 13 | 14 | #ifdef EEPROM_SETTINGS 15 | void Config_StoreSettings(); 16 | void Config_RetrieveSettings(); 17 | #else 18 | FORCE_INLINE void Config_StoreSettings() {} 19 | FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_PrintSettings(); } 20 | #endif 21 | 22 | #endif//CONFIG_STORE_H 23 | -------------------------------------------------------------------------------- /Arduino/Marlin/Marlin.ino: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | 3 | /* 4 | Reprap firmware based on Sprinter and grbl. 5 | Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 6 | 7 | This program is free software: you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation, either version 3 of the License, or 10 | (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program. If not, see . 19 | */ 20 | 21 | /* 22 | This firmware is a mashup between Sprinter and grbl. 23 | (https://github.com/kliment/Sprinter) 24 | (https://github.com/simen/grbl/tree) 25 | 26 | It has preliminary support for Matthew Roberts advance algorithm 27 | http://reprap.org/pipermail/reprap-dev/2011-May/003323.html 28 | */ 29 | 30 | /* All the implementation is done in *.cpp files to get better compatibility with avr-gcc without the Arduino IDE */ 31 | /* Use this file to help the Arduino IDE find which Arduino libraries are needed and to keep documentation on GCode */ 32 | 33 | #include "Configuration.h" 34 | #include "pins.h" 35 | 36 | #ifdef ULTRA_LCD 37 | #if defined(LCD_I2C_TYPE_PCF8575) 38 | #include 39 | #include 40 | #elif defined(LCD_I2C_TYPE_MCP23017) || defined(LCD_I2C_TYPE_MCP23008) 41 | #include 42 | #include 43 | #elif defined(DOGLCD) 44 | #include // library for graphics LCD by Oli Kraus (https://code.google.com/p/u8glib/) 45 | #else 46 | #include // library for character LCD 47 | #endif 48 | #endif 49 | 50 | #if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1 51 | #include 52 | #endif 53 | 54 | #if defined(DIGIPOT_I2C) 55 | #include 56 | #endif 57 | -------------------------------------------------------------------------------- /Arduino/Marlin/Marlin.pde: -------------------------------------------------------------------------------- 1 | /* -*- c++ -*- */ 2 | 3 | /* 4 | Reprap firmware based on Sprinter and grbl. 5 | Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm 6 | 7 | This program is free software: you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation, either version 3 of the License, or 10 | (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program. If not, see . 19 | */ 20 | 21 | /* 22 | This firmware is a mashup between Sprinter and grbl. 23 | (https://github.com/kliment/Sprinter) 24 | (https://github.com/simen/grbl/tree) 25 | 26 | It has preliminary support for Matthew Roberts advance algorithm 27 | http://reprap.org/pipermail/reprap-dev/2011-May/003323.html 28 | */ 29 | 30 | /* All the implementation is done in *.cpp files to get better compatibility with avr-gcc without the Arduino IDE */ 31 | /* Use this file to help the Arduino IDE find which Arduino libraries are needed and to keep documentation on GCode */ 32 | 33 | #include "Configuration.h" 34 | #include "pins.h" 35 | 36 | #ifdef ULTRA_LCD 37 | #if defined(LCD_I2C_TYPE_PCF8575) 38 | #include 39 | #include 40 | #elif defined(LCD_I2C_TYPE_MCP23017) || defined(LCD_I2C_TYPE_MCP23008) 41 | #include 42 | #include 43 | #elif defined(DOGLCD) 44 | #include // library for graphics LCD by Oli Kraus (https://code.google.com/p/u8glib/) 45 | #else 46 | #include // library for character LCD 47 | #endif 48 | #endif 49 | 50 | #if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1 51 | #include 52 | #endif 53 | 54 | #if defined(DIGIPOT_I2C) 55 | #include 56 | #endif 57 | -------------------------------------------------------------------------------- /Arduino/Marlin/SdFatUtil.h: -------------------------------------------------------------------------------- 1 | /* Arduino SdFat Library 2 | * Copyright (C) 2008 by William Greiman 3 | * 4 | * This file is part of the Arduino SdFat Library 5 | * 6 | * This Library is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This Library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | 16 | * You should have received a copy of the GNU General Public License 17 | * along with the Arduino SdFat Library. If not, see 18 | * . 19 | */ 20 | #include "Marlin.h" 21 | #ifdef SDSUPPORT 22 | 23 | #ifndef SdFatUtil_h 24 | #define SdFatUtil_h 25 | /** 26 | * \file 27 | * \brief Useful utility functions. 28 | */ 29 | #include "Marlin.h" 30 | #include "MarlinSerial.h" 31 | /** Store and print a string in flash memory.*/ 32 | #define PgmPrint(x) SerialPrint_P(PSTR(x)) 33 | /** Store and print a string in flash memory followed by a CR/LF.*/ 34 | #define PgmPrintln(x) SerialPrintln_P(PSTR(x)) 35 | 36 | namespace SdFatUtil { 37 | int FreeRam(); 38 | void print_P( PGM_P str); 39 | void println_P( PGM_P str); 40 | void SerialPrint_P(PGM_P str); 41 | void SerialPrintln_P(PGM_P str); 42 | } 43 | 44 | using namespace SdFatUtil; // NOLINT 45 | #endif // #define SdFatUtil_h 46 | 47 | 48 | #endif -------------------------------------------------------------------------------- /Arduino/Marlin/SdFile.h: -------------------------------------------------------------------------------- 1 | /* Arduino SdFat Library 2 | * Copyright (C) 2009 by William Greiman 3 | * 4 | * This file is part of the Arduino SdFat Library 5 | * 6 | * This Library is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This Library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with the Arduino SdFat Library. If not, see 18 | * . 19 | */ 20 | /** 21 | * \file 22 | * \brief SdFile class 23 | */ 24 | #include "Marlin.h" 25 | 26 | #ifdef SDSUPPORT 27 | #include "SdBaseFile.h" 28 | #include 29 | #ifndef SdFile_h 30 | #define SdFile_h 31 | //------------------------------------------------------------------------------ 32 | /** 33 | * \class SdFile 34 | * \brief SdBaseFile with Print. 35 | */ 36 | class SdFile : public SdBaseFile, public Print { 37 | public: 38 | SdFile() {} 39 | SdFile(const char* name, uint8_t oflag); 40 | #if ARDUINO >= 100 41 | size_t write(uint8_t b); 42 | #else 43 | void write(uint8_t b); 44 | #endif 45 | 46 | int16_t write(const void* buf, uint16_t nbyte); 47 | void write(const char* str); 48 | void write_P(PGM_P str); 49 | void writeln_P(PGM_P str); 50 | }; 51 | #endif // SdFile_h 52 | 53 | 54 | #endif -------------------------------------------------------------------------------- /Arduino/Marlin/digipot_mcp4451.cpp: -------------------------------------------------------------------------------- 1 | #include "Configuration.h" 2 | 3 | #ifdef DIGIPOT_I2C 4 | #include "Stream.h" 5 | #include "utility/twi.h" 6 | #include "Wire.h" 7 | 8 | // Settings for the I2C based DIGIPOT (MCP4451) on Azteeg X3 Pro 9 | #if MB(5DPRINT) 10 | #define DIGIPOT_I2C_FACTOR 117.96 11 | #define DIGIPOT_I2C_MAX_CURRENT 1.736 12 | #else 13 | #define DIGIPOT_I2C_FACTOR 106.7 14 | #define DIGIPOT_I2C_MAX_CURRENT 2.5 15 | #endif 16 | 17 | static byte current_to_wiper( float current ){ 18 | return byte(ceil(float((DIGIPOT_I2C_FACTOR*current)))); 19 | } 20 | 21 | static void i2c_send(byte addr, byte a, byte b) 22 | { 23 | Wire.beginTransmission(addr); 24 | Wire.write(a); 25 | Wire.write(b); 26 | Wire.endTransmission(); 27 | } 28 | 29 | // This is for the MCP4451 I2C based digipot 30 | void digipot_i2c_set_current( int channel, float current ) 31 | { 32 | current = min( (float) max( current, 0.0f ), DIGIPOT_I2C_MAX_CURRENT); 33 | // these addresses are specific to Azteeg X3 Pro, can be set to others, 34 | // In this case first digipot is at address A0=0, A1= 0, second one is at A0=0, A1= 1 35 | byte addr= 0x2C; // channel 0-3 36 | if(channel >= 4) { 37 | addr= 0x2E; // channel 4-7 38 | channel-= 4; 39 | } 40 | 41 | // Initial setup 42 | i2c_send( addr, 0x40, 0xff ); 43 | i2c_send( addr, 0xA0, 0xff ); 44 | 45 | // Set actual wiper value 46 | byte addresses[4] = { 0x00, 0x10, 0x60, 0x70 }; 47 | i2c_send( addr, addresses[channel], current_to_wiper(current) ); 48 | } 49 | 50 | void digipot_i2c_init() 51 | { 52 | const float digipot_motor_current[] = DIGIPOT_I2C_MOTOR_CURRENTS; 53 | Wire.begin(); 54 | // setup initial currents as defined in Configuration_adv.h 55 | for(int i=0;i<=sizeof(digipot_motor_current)/sizeof(float);i++) { 56 | digipot_i2c_set_current(i, digipot_motor_current[i]); 57 | } 58 | } 59 | #endif 60 | -------------------------------------------------------------------------------- /Arduino/Marlin/motion_control.h: -------------------------------------------------------------------------------- 1 | /* 2 | motion_control.h - high level interface for issuing motion commands 3 | Part of Grbl 4 | 5 | Copyright (c) 2009-2011 Simen Svale Skogsrud 6 | Copyright (c) 2011 Sungeun K. Jeon 7 | 8 | Grbl is free software: you can redistribute it and/or modify 9 | it under the terms of the GNU General Public License as published by 10 | the Free Software Foundation, either version 3 of the License, or 11 | (at your option) any later version. 12 | 13 | Grbl is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with Grbl. If not, see . 20 | */ 21 | 22 | #ifndef motion_control_h 23 | #define motion_control_h 24 | 25 | // Execute an arc in offset mode format. position == current xyz, target == target xyz, 26 | // offset == offset from current xyz, axis_XXX defines circle plane in tool space, axis_linear is 27 | // the direction of helical travel, radius == circle radius, isclockwise boolean. Used 28 | // for vector transformation direction. 29 | void mc_arc(float *position, float *target, float *offset, unsigned char axis_0, unsigned char axis_1, 30 | unsigned char axis_linear, float feed_rate, float radius, unsigned char isclockwise, uint8_t extruder); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /Arduino/Marlin/qr_solve.h: -------------------------------------------------------------------------------- 1 | #include "Configuration.h" 2 | 3 | #ifdef AUTO_BED_LEVELING_GRID 4 | 5 | void daxpy ( int n, double da, double dx[], int incx, double dy[], int incy ); 6 | double ddot ( int n, double dx[], int incx, double dy[], int incy ); 7 | double dnrm2 ( int n, double x[], int incx ); 8 | void dqrank ( double a[], int lda, int m, int n, double tol, int *kr, 9 | int jpvt[], double qraux[] ); 10 | void dqrdc ( double a[], int lda, int n, int p, double qraux[], int jpvt[], 11 | double work[], int job ); 12 | int dqrls ( double a[], int lda, int m, int n, double tol, int *kr, double b[], 13 | double x[], double rsd[], int jpvt[], double qraux[], int itask ); 14 | void dqrlss ( double a[], int lda, int m, int n, int kr, double b[], double x[], 15 | double rsd[], int jpvt[], double qraux[] ); 16 | int dqrsl ( double a[], int lda, int n, int k, double qraux[], double y[], 17 | double qy[], double qty[], double b[], double rsd[], double ab[], int job ); 18 | void dscal ( int n, double sa, double x[], int incx ); 19 | void dswap ( int n, double x[], int incx, double y[], int incy ); 20 | double *qr_solve ( int m, int n, double a[], double b[] ); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Arduino/Marlin/scripts/createSpeedLookupTable.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """ Generate the stepper delay lookup table for Marlin firmware. """ 4 | 5 | import argparse 6 | 7 | __author__ = "Ben Gamari " 8 | __copyright__ = "Copyright 2012, Ben Gamari" 9 | __license__ = "GPL" 10 | 11 | parser = argparse.ArgumentParser(description=__doc__) 12 | parser.add_argument('-f', '--cpu-freq', type=int, default=16, help='CPU clockrate in MHz (default=16)') 13 | parser.add_argument('-d', '--divider', type=int, default=8, help='Timer/counter pre-scale divider (default=8)') 14 | args = parser.parse_args() 15 | 16 | cpu_freq = args.cpu_freq * 1000000 17 | timer_freq = cpu_freq / args.divider 18 | 19 | print "#ifndef SPEED_LOOKUPTABLE_H" 20 | print "#define SPEED_LOOKUPTABLE_H" 21 | print 22 | print '#include "Marlin.h"' 23 | print 24 | 25 | print "const uint16_t speed_lookuptable_fast[256][2] PROGMEM = {" 26 | a = [ timer_freq / ((i*256)+(args.cpu_freq*2)) for i in range(256) ] 27 | b = [ a[i] - a[i+1] for i in range(255) ] 28 | b.append(b[-1]) 29 | for i in range(32): 30 | print " ", 31 | for j in range(8): 32 | print "{%d, %d}," % (a[8*i+j], b[8*i+j]), 33 | print 34 | print "};" 35 | print 36 | 37 | print "const uint16_t speed_lookuptable_slow[256][2] PROGMEM = {" 38 | a = [ timer_freq / ((i*8)+(args.cpu_freq*2)) for i in range(256) ] 39 | b = [ a[i] - a[i+1] for i in range(255) ] 40 | b.append(b[-1]) 41 | for i in range(32): 42 | print " ", 43 | for j in range(8): 44 | print "{%d, %d}," % (a[8*i+j], b[8*i+j]), 45 | print 46 | print "};" 47 | print 48 | 49 | print "#endif" 50 | 51 | -------------------------------------------------------------------------------- /Arduino/Marlin/vector_3.h: -------------------------------------------------------------------------------- 1 | /* 2 | vector_3.cpp - Vector library for bed leveling 3 | Copyright (c) 2012 Lars Brubaker. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | #ifndef VECTOR_3_H 20 | #define VECTOR_3_H 21 | 22 | #ifdef ENABLE_AUTO_BED_LEVELING 23 | class matrix_3x3; 24 | 25 | struct vector_3 26 | { 27 | float x, y, z; 28 | 29 | vector_3(); 30 | vector_3(float x, float y, float z); 31 | 32 | static vector_3 cross(vector_3 a, vector_3 b); 33 | 34 | vector_3 operator+(vector_3 v); 35 | vector_3 operator-(vector_3 v); 36 | void normalize(); 37 | float get_length(); 38 | vector_3 get_normal(); 39 | 40 | void debug(char* title); 41 | 42 | void apply_rotation(matrix_3x3 matrix); 43 | }; 44 | 45 | struct matrix_3x3 46 | { 47 | float matrix[9]; 48 | 49 | static matrix_3x3 create_from_rows(vector_3 row_0, vector_3 row_1, vector_3 row_2); 50 | static matrix_3x3 create_look_at(vector_3 target); 51 | static matrix_3x3 transpose(matrix_3x3 original); 52 | 53 | void set_to_identity(); 54 | 55 | void debug(char* title); 56 | }; 57 | 58 | 59 | void apply_rotation_xyz(matrix_3x3 rotationMatrix, float &x, float& y, float& z); 60 | #endif // ENABLE_AUTO_BED_LEVELING 61 | 62 | #endif // VECTOR_3_H 63 | -------------------------------------------------------------------------------- /Arduino/Marlin/watchdog.cpp: -------------------------------------------------------------------------------- 1 | #include "Marlin.h" 2 | 3 | #ifdef USE_WATCHDOG 4 | #include 5 | 6 | #include "watchdog.h" 7 | #include "ultralcd.h" 8 | 9 | //=========================================================================== 10 | //=============================private variables ============================ 11 | //=========================================================================== 12 | 13 | //=========================================================================== 14 | //=============================functinos ============================ 15 | //=========================================================================== 16 | 17 | 18 | /// intialise watch dog with a 4 sec interrupt time 19 | void watchdog_init() 20 | { 21 | #ifdef WATCHDOG_RESET_MANUAL 22 | //We enable the watchdog timer, but only for the interrupt. 23 | //Take care, as this requires the correct order of operation, with interrupts disabled. See the datasheet of any AVR chip for details. 24 | wdt_reset(); 25 | _WD_CONTROL_REG = _BV(_WD_CHANGE_BIT) | _BV(WDE); 26 | _WD_CONTROL_REG = _BV(WDIE) | WDTO_4S; 27 | #else 28 | wdt_enable(WDTO_4S); 29 | #endif 30 | } 31 | 32 | /// reset watchdog. MUST be called every 1s after init or avr will reset. 33 | void watchdog_reset() 34 | { 35 | wdt_reset(); 36 | } 37 | 38 | //=========================================================================== 39 | //=============================ISR ============================ 40 | //=========================================================================== 41 | 42 | //Watchdog timer interrupt, called if main program blocks >1sec and manual reset is enabled. 43 | #ifdef WATCHDOG_RESET_MANUAL 44 | ISR(WDT_vect) 45 | { 46 | //TODO: This message gets overwritten by the kill() call 47 | LCD_ALERTMESSAGEPGM("ERR:Please Reset");//16 characters so it fits on a 16x2 display 48 | lcd_update(); 49 | SERIAL_ERROR_START; 50 | SERIAL_ERRORLNPGM("Something is wrong, please turn off the printer."); 51 | kill(); //kill blocks 52 | while(1); //wait for user or serial reset 53 | } 54 | #endif//RESET_MANUAL 55 | 56 | #endif//USE_WATCHDOG 57 | -------------------------------------------------------------------------------- /Arduino/Marlin/watchdog.h: -------------------------------------------------------------------------------- 1 | #ifndef WATCHDOG_H 2 | #define WATCHDOG_H 3 | 4 | #include "Marlin.h" 5 | 6 | #ifdef USE_WATCHDOG 7 | // initialize watch dog with a 1 sec interrupt time 8 | void watchdog_init(); 9 | // pad the dog/reset watchdog. MUST be called at least every second after the first watchdog_init or AVR will go into emergency procedures.. 10 | void watchdog_reset(); 11 | #else 12 | //If we do not have a watchdog, then we can have empty functions which are optimized away. 13 | FORCE_INLINE void watchdog_init() {}; 14 | FORCE_INLINE void watchdog_reset() {}; 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DARM 2 | A desktop arm that can write and draw!!! 3 | ![DArm](https://ws3.sinaimg.cn/large/006tKfTcgy1fl730i46jcj30rs0rsmzx.jpg) 4 | The arduino program is base on [Marlin Firmware](https://github.com/MarlinFirmware/Marlin),and we use solidworks to design the Mechanical structure 5 | This project has been competed in one year ago,and now release in the github. 6 | More details[Hackaday](https://hackaday.io/project/28264-darm) 7 | ![writing](https://ws4.sinaimg.cn/large/006tKfTcgy1fl73ryt4ppg30dw0dw7wi.gif) 8 | -------------------------------------------------------------------------------- /SolidWorks/1065_connect.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/1065_connect.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/1235_MainCennect.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/1235_MainCennect.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/15mm_bracket.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/15mm_bracket.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/15mm_bracket_1.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/15mm_bracket_1.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/15mm_bracket_2.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/15mm_bracket_2.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/169_15mm.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/169_15mm.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/189 15mm.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/189 15mm.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/190_6mm.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/190_6mm.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/19155 15mm.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/19155 15mm.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/2047_6mm.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/2047_6mm.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/2523_15mm.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/2523_15mm.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/2GT 16TOOCH.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/2GT 16TOOCH.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/675_cennect.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/675_cennect.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/6807zz.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/6807zz.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/690_connect.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/690_connect.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/8MMLock.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/8MMLock.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/DARM.SLDASM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/DARM.SLDASM -------------------------------------------------------------------------------- /SolidWorks/E3D V1.6 固定上.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/E3D V1.6 固定上.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/E3D V1.6 固定下.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/E3D V1.6 固定下.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/E3D V1.6 风扇罩.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/E3D V1.6 风扇罩.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/GT2 16Tooth.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/GT2 16Tooth.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/GT2 18Tooth.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/GT2 18Tooth.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/Gears_bottom.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/Gears_bottom.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/SS-5GL.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/SS-5GL.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/arm2_corner1.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/arm2_corner1.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/arm2_corner2.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/arm2_corner2.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/arm2_end.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/arm2_end.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/bottom.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/bottom.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/bottomPlate1.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/bottomPlate1.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/bottomPlate2.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/bottomPlate2.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/bottomPlate3.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/bottomPlate3.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/end1.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/end1.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/mainArmGear.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/mainArmGear.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/mainBracket.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/mainBracket.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/mainEndstop.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/mainEndstop.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/newtriangle.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/newtriangle.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/rod_ends.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/rod_ends.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/secondArmGear685.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/secondArmGear685.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/secondEndstop.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/secondEndstop.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/激光座.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/激光座.SLDPRT -------------------------------------------------------------------------------- /SolidWorks/笔夹.SLDPRT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiayuanl/DArm/47ff7ebeffad2b4285c1133d7590f7763f91d3e1/SolidWorks/笔夹.SLDPRT --------------------------------------------------------------------------------