├── .gitignore ├── 00_m1284p_blink ├── .cproject ├── .project └── main.c ├── 00_m1284p_blink_make ├── .cproject ├── .gitignore ├── .project ├── Makefile ├── README.md └── main.c ├── 00_m644p_blink_make ├── .cproject ├── .gitignore ├── .project ├── Makefile ├── README.md └── main.c ├── 01_m1284p_bb00_minimum ├── .cproject ├── .project ├── main.c ├── uart_extd.c └── uart_extd.h ├── 02_m1284p_FATFS_Chang_tst ├── .cproject ├── .project ├── ff │ ├── ccsbcs.c.unicode │ ├── diskio.h │ ├── ff.c │ ├── ff.h │ ├── ffconf.h │ └── integer.h ├── main.c ├── mmc_avr.c ├── uart_extd.c └── uart_extd.h ├── 02_m1284p_FATFS_LFN_Chang_tst ├── .cproject ├── .project ├── ff │ ├── ccsbcs.c │ ├── diskio.h │ ├── ff.c │ ├── ff.h │ ├── ffconf.h │ └── integer.h ├── main.c ├── mmc_avr.c ├── uart_extd.c └── uart_extd.h ├── 03_m1284p_WIZNET_loopback_FATFS_template ├── .cproject ├── .project ├── Application │ └── loopback │ │ ├── loopback.c │ │ └── loopback.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── ff │ ├── ccsbcs.c.unicode │ ├── diskio.h │ ├── ff.c │ ├── ff.h │ ├── ffconf.h │ └── integer.h ├── globals.h ├── main.c ├── mmc_avr.c ├── spi.c ├── spi.h ├── uart_extd.c └── uart_extd.h ├── 03_m1284p_WIZNET_loopback_STATIC_IP ├── .cproject ├── .project ├── Application │ └── loopback │ │ ├── loopback.c │ │ └── loopback.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── globals.c ├── globals.h ├── main.c ├── spi.c ├── spi.h ├── uart_extd.c └── uart_extd.h ├── 04_m1284p_WIZNET_loopback_DHCP ├── .cproject ├── .project ├── Application │ └── loopback │ │ ├── loopback.c │ │ └── loopback.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ └── DHCP │ │ ├── dhcp.c │ │ └── dhcp.h ├── globals.c ├── globals.h ├── main.c ├── spi.c ├── spi.h ├── uart_extd.c └── uart_extd.h ├── 05_m1284p_WIZNET_DNS_client ├── .cproject ├── .project ├── Application │ └── loopback │ │ ├── loopback.c │ │ └── loopback.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ └── DNS │ │ ├── dns.c │ │ └── dns.h ├── main.c ├── spi.c ├── spi.h ├── uart_extd.c └── uart_extd.h ├── 06_m1284p_WIZNET_DNS_SNTP_client ├── .cproject ├── .project ├── Application │ └── loopback │ │ ├── loopback.c │ │ └── loopback.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ ├── DNS │ │ ├── dns.c │ │ └── dns.h │ └── SNTP │ │ ├── sntp.c │ │ └── sntp.h ├── main.c ├── spi.c ├── spi.h ├── uart_extd.c └── uart_extd.h ├── 07_m1284p_WIZNET_telnets_basic ├── .cproject ├── .project ├── Application │ ├── loopback │ │ ├── loopback.c │ │ └── loopback.h │ └── telnet │ │ ├── telnet.c │ │ └── telnet.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── globals.h ├── main.c ├── spi.c ├── spi.h ├── uart_extd.c └── uart_extd.h ├── 08_m1284p_WIZNET_ICMP_aka_ping ├── .cproject ├── .project ├── Application │ ├── PING │ │ ├── ping.c │ │ └── ping.h │ └── loopback │ │ ├── loopback.c │ │ └── loopback.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── main.c ├── spi.c ├── spi.h ├── uart_extd.c └── uart_extd.h ├── 09_m1284p_WIZNET_simple_webserver ├── .cproject ├── .project ├── Application │ ├── loopback │ │ ├── loopback.c │ │ └── loopback.h │ └── webserver_simple │ │ ├── webpages.h │ │ ├── webserver_simple.c │ │ └── webserver_simple.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── globals.h ├── index_wiznetweb.html ├── main.c ├── spi.c ├── spi.h ├── uart_extd.c └── uart_extd.h ├── 10_m1284p_WIZNET_HTTPServer_RAM_pages ├── .cproject ├── .project ├── Application │ ├── loopback │ │ ├── loopback.c │ │ └── loopback.h │ └── webserver_simple │ │ ├── webpages.h │ │ ├── webserver_simple.c │ │ └── webserver_simple.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ └── httpServer │ │ ├── httpParser.c │ │ ├── httpParser.h │ │ ├── httpServer.c │ │ ├── httpServer.h │ │ ├── httpUtil.c │ │ └── httpUtil.h ├── globals.h ├── main.c ├── spi.c ├── spi.h ├── uart_extd.c ├── uart_extd.h ├── userHandler.c ├── userHandler.h └── webpage.h ├── 11_m1284p_WIZNET_HTTPServer_FLASH_pages ├── .cproject ├── .project ├── Application │ ├── loopback │ │ ├── loopback.c │ │ └── loopback.h │ └── webserver_simple │ │ ├── webpages.h │ │ ├── webserver_simple.c │ │ └── webserver_simple.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ └── httpServer_avr │ │ ├── httpParser.c │ │ ├── httpParser.h │ │ ├── httpServer.c │ │ ├── httpServer.h │ │ ├── httpUtil.c │ │ └── httpUtil.h ├── WWW │ ├── bin2hex_v2.py │ ├── brd_wiznet.png │ ├── brd_wiznet_png.h │ ├── favicon.ico │ ├── favicon_ico.h │ ├── m1284p.png │ └── m1284p_png.h ├── clean.bat ├── globals.h ├── main.c ├── spi.c ├── spi.h ├── uart_extd.c ├── uart_extd.h ├── userHandler.c ├── userHandler.h └── webpage.h ├── 11_m644p_WIZNET_HTTPServer_FLASH_pages ├── .cproject ├── .project ├── Application │ ├── loopback │ │ ├── loopback.c │ │ └── loopback.h │ └── webserver_simple │ │ ├── webpages.h │ │ ├── webserver_simple.c │ │ └── webserver_simple.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ └── httpServer_avr │ │ ├── httpParser.c │ │ ├── httpParser.h │ │ ├── httpServer.c │ │ ├── httpServer.h │ │ ├── httpUtil.c │ │ └── httpUtil.h ├── WWW │ ├── bin2hex_v2.py │ ├── brd_wiznet.png │ ├── brd_wiznet_png.h │ ├── favicon.ico │ ├── favicon_ico.h │ ├── m1284p.png │ └── m1284p_png.h ├── clean.bat ├── globals.h ├── main.c ├── spi.c ├── spi.h ├── uart_extd.c ├── uart_extd.h ├── userHandler.c ├── userHandler.h └── webpage.h ├── 12_m1284p_WIZNET_HTTPServer_SDCARD_pages ├── .cproject ├── .project ├── Application │ └── loopback │ │ ├── loopback.c │ │ └── loopback.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ └── httpServer_avr │ │ ├── httpParser.c │ │ ├── httpParser.h │ │ ├── httpServer.c │ │ ├── httpServer.h │ │ ├── httpUtil.c │ │ └── httpUtil.h ├── WWW │ ├── ain.htm │ ├── ain.js │ ├── ain_gaug.htm │ ├── ain_gaug.js │ ├── ajax.js │ ├── bin2hex_v2.py │ ├── brd_wiz.png │ ├── dio.htm │ ├── dio.js │ ├── favicon.ico │ ├── img.htm │ ├── index.htm │ ├── info.htm │ ├── info.js │ ├── m1284p.png │ ├── netinfo.htm │ └── netinfo.js ├── clean.bat ├── ff │ ├── ccsbcs.c.unicode │ ├── diskio.h │ ├── ff.c │ ├── ff.h │ ├── ffconf.h │ └── integer.h ├── globals.h ├── main.c ├── mmc_avr.c ├── spi.c ├── spi.h ├── uart_extd.c ├── uart_extd.h ├── userHandler.c └── userHandler.h ├── 12_m644p_WIZNET_HTTPServer_SDCARD_pages ├── .cproject ├── .project ├── Application │ └── loopback │ │ ├── loopback.c │ │ └── loopback.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ └── httpServer_avr │ │ ├── httpParser.c │ │ ├── httpParser.h │ │ ├── httpServer.c │ │ ├── httpServer.h │ │ ├── httpUtil.c │ │ └── httpUtil.h ├── WWW │ ├── ain.htm │ ├── ain.js │ ├── ain_gaug.htm │ ├── ain_gaug.js │ ├── ajax.js │ ├── bin2hex_v2.py │ ├── brd_wiz.png │ ├── dio.htm │ ├── dio.js │ ├── favicon.ico │ ├── img.htm │ ├── index.htm │ ├── info.htm │ ├── info.js │ ├── m1284p.png │ ├── netinfo.htm │ └── netinfo.js ├── clean.bat ├── ff │ ├── ccsbcs.c.unicode │ ├── diskio.h │ ├── ff.c │ ├── ff.h │ ├── ffconf.h │ └── integer.h ├── globals.h ├── main.c ├── mmc_avr.c ├── spi.c ├── spi.h ├── uart_extd.c ├── uart_extd.h ├── userHandler.c └── userHandler.h ├── 14_m1284p_WIZNET_FTPC_FATFS ├── .cproject ├── .project ├── Application │ └── loopback │ │ ├── loopback.c │ │ └── loopback.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ └── FTPClient_avr │ │ ├── ftpc.c │ │ └── ftpc.h ├── ff │ ├── ccsbcs.c.unicode │ ├── diskio.h │ ├── ff.c │ ├── ff.h │ ├── ffconf.h │ └── integer.h ├── globals.h ├── main.c ├── mmc_avr.c ├── spi.c ├── spi.h ├── uart_extd.c └── uart_extd.h ├── 15_m1284p_WIZNET_FTPD_FATFS ├── .cproject ├── .project ├── Application │ └── loopback │ │ ├── loopback.c │ │ └── loopback.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ └── FTPServer_avr │ │ ├── ftpd.c │ │ ├── ftpd.h │ │ └── stdio_private.h ├── ff │ ├── ccsbcs.c.unicode │ ├── diskio.h │ ├── ff.c │ ├── ff.h │ ├── ffconf.h │ └── integer.h ├── globals.h ├── main.c ├── mmc_avr.c ├── spi.c ├── spi.h ├── uart_extd.c └── uart_extd.h ├── 16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD ├── .cproject ├── .project ├── Application │ └── loopback │ │ ├── loopback.c │ │ └── loopback.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ ├── FTPServer_avr │ │ ├── ftpd.c │ │ ├── ftpd.h │ │ └── stdio_private.h │ └── httpServer_avr │ │ ├── httpParser.c │ │ ├── httpParser.h │ │ ├── httpServer.c │ │ ├── httpServer.h │ │ ├── httpUtil.c │ │ └── httpUtil.h ├── WWW │ ├── ain.htm │ ├── ain.js │ ├── ain_gaug.htm │ ├── ain_gaug.js │ ├── ajax.js │ ├── brd_wiz.png │ ├── dio.htm │ ├── dio.js │ ├── favicon.ico │ ├── img.htm │ ├── index.htm │ ├── info.htm │ ├── info.js │ ├── m1284p.png │ ├── netinfo.htm │ └── netinfo.js ├── ff │ ├── ccsbcs.c.unicode │ ├── diskio.h │ ├── ff.c │ ├── ff.h │ ├── ffconf.h │ └── integer.h ├── globals.h ├── main.c ├── mmc_avr.c ├── spi.c ├── spi.h ├── uart_extd.c ├── uart_extd.h ├── userHandler.c └── userHandler.h ├── 17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD ├── .cproject ├── .project ├── Application │ └── loopback │ │ ├── loopback.c │ │ └── loopback.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ ├── FTPServer_avr │ │ ├── ftpd.c │ │ ├── ftpd.h │ │ └── stdio_private.h │ └── httpServer_avr │ │ ├── httpParser.c │ │ ├── httpParser.h │ │ ├── httpServer.c │ │ ├── httpServer.h │ │ ├── httpUtil.c │ │ └── httpUtil.h ├── WWW │ ├── ain.htm │ ├── ain.js │ ├── ain_gaug.htm │ ├── ain_gaug.js │ ├── ajax.js │ ├── brd_wiz.png │ ├── dio.htm │ ├── dio.js │ ├── favicon.ico │ ├── img.htm │ ├── index.htm │ ├── info.htm │ ├── info.js │ ├── m1284p.png │ ├── netinfo.htm │ └── netinfo.js ├── ff │ ├── ccsbcs.c.unicode │ ├── diskio.h │ ├── ff.c │ ├── ff.h │ ├── ffconf.h │ └── integer.h ├── globals.c ├── globals.h ├── main.c ├── mmc_avr.c ├── spi.c ├── spi.h ├── uart_extd.c ├── uart_extd.h ├── userHandler.c └── userHandler.h ├── 18_m1284p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD ├── .cproject ├── .project ├── 1284BOOT.BIN.bootloaded ├── 1284BOOT.BIN.bootloaded.readme ├── Application │ └── loopback │ │ ├── loopback.c │ │ └── loopback.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ └── FTPServer_avr │ │ ├── ftpd.c │ │ ├── ftpd.h │ │ └── stdio_private.h ├── ff │ ├── ccsbcs.c.unicode │ ├── diskio.h │ ├── ff.c │ ├── ff.h │ ├── ffconf.h │ └── integer.h ├── globals.c ├── globals.h ├── main.c ├── mmc_avr.c ├── spi.c ├── spi.h ├── uart_extd.c └── uart_extd.h ├── 18_m644p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD ├── .cproject ├── .project ├── 644BOOT.BIN.bootloaded ├── 644BOOT.BIN.bootloaded.readme ├── Application │ └── loopback │ │ ├── loopback.c │ │ └── loopback.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ └── FTPServer_avr │ │ ├── ftpd.c │ │ ├── ftpd.h │ │ └── stdio_private.h ├── ff │ ├── ccsbcs.c.unicode │ ├── diskio.h │ ├── ff.c │ ├── ff.h │ ├── ffconf.h │ └── integer.h ├── globals.c ├── globals.h ├── main.c ├── mmc_avr.c ├── spi.c ├── spi.h ├── uart_extd.c └── uart_extd.h ├── 19_m1284p_WIZNET_blynk ├── .cproject ├── .project ├── Application │ └── Blynk │ │ ├── blynk.c │ │ ├── blynk.h │ │ ├── blynkDependency.c │ │ └── blynkDependency.h ├── Blynk_application │ ├── Check out m1284 + W5500 app I've made.txt │ ├── Screenshot_2019-03-18-13-37-20-278_cc.blynk.png │ ├── app1_m1284p_and_W5500_QR.png │ └── app2_m1284p_and_W5500_QR.png ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ └── DNS │ │ ├── dns.c │ │ └── dns.h ├── README.md ├── git_goodies │ └── git_usefull_commands.txt ├── globals.c ├── globals.h ├── main.c ├── spi.c ├── spi.h ├── uart_extd.c └── uart_extd.h ├── 20_m1284p_BTLD_WIZNET_BLYNK_FTPD_FATFS_SDCARD ├── .cproject ├── .project ├── 1284BOOT.BIN.bootloaded ├── 1284BOOT.BIN.bootloaded.readme ├── Application │ ├── Blynk │ │ ├── blynk.c │ │ ├── blynk.h │ │ ├── blynkDependency.c │ │ └── blynkDependency.h │ └── loopback │ │ ├── loopback.c │ │ └── loopback.h ├── Blynk_application │ ├── Check out m1284 + W5500 app I've made.txt │ ├── Screenshot_2019-03-18-13-37-20-278_cc.blynk.png │ ├── app1_m1284p_and_W5500_QR.png │ └── app2_m1284p_and_W5500_QR.png ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ ├── DNS │ │ ├── dns.c │ │ └── dns.h │ └── FTPServer_avr │ │ ├── ftpd.c │ │ ├── ftpd.h │ │ └── stdio_private.h ├── ff │ ├── ccsbcs.c.unicode │ ├── diskio.h │ ├── ff.c │ ├── ff.h │ ├── ffconf.h │ └── integer.h ├── globals.c ├── globals.h ├── main.c ├── mmc_avr.c ├── spi.c ├── spi.h ├── uart_extd.c └── uart_extd.h ├── 21_m1284p_WIZNET_TFTP_client_FATFS ├── .cproject ├── .project ├── Application │ └── loopback │ │ ├── loopback.c │ │ └── loopback.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ └── TFTP │ │ ├── netutil.c │ │ ├── netutil.h │ │ ├── tftp.c │ │ └── tftp.h ├── ff │ ├── ccsbcs.c.unicode │ ├── diskio.h │ ├── ff.c │ ├── ff.h │ ├── ffconf.h │ └── integer.h ├── globals.c ├── globals.h ├── main.c ├── mmc_avr.c ├── spi.c ├── spi.h ├── test_patterns │ ├── ff_lfn.txt │ ├── test.txt │ └── tftpd32.ini ├── uart_extd.c └── uart_extd.h ├── 22_m1284p_WIZNET_MQTT ├── .cproject ├── .project ├── Application │ └── loopback │ │ ├── loopback.c │ │ └── loopback.h ├── Ethernet │ ├── W5500 │ │ ├── w5500.c │ │ └── w5500.h │ ├── socket.c │ ├── socket.h │ ├── wizchip_conf.c │ └── wizchip_conf.h ├── Internet │ └── MQTT │ │ ├── MQTTClient.c │ │ ├── MQTTClient.h │ │ ├── MQTTPacket │ │ └── src │ │ │ ├── MQTTConnect.h │ │ │ ├── MQTTConnectClient.c │ │ │ ├── MQTTConnectServer.c │ │ │ ├── MQTTDeserializePublish.c │ │ │ ├── MQTTFormat.c │ │ │ ├── MQTTFormat.h │ │ │ ├── MQTTPacket.c │ │ │ ├── MQTTPacket.h │ │ │ ├── MQTTPublish.h │ │ │ ├── MQTTSerializePublish.c │ │ │ ├── MQTTSubscribe.h │ │ │ ├── MQTTSubscribeClient.c │ │ │ ├── MQTTSubscribeServer.c │ │ │ ├── MQTTUnsubscribe.h │ │ │ ├── MQTTUnsubscribeClient.c │ │ │ ├── MQTTUnsubscribeServer.c │ │ │ └── StackTrace.h │ │ ├── mqtt_interface.c │ │ └── mqtt_interface.h ├── globals.c ├── globals.h ├── main.c ├── spi.c ├── spi.h ├── uart_extd.c └── uart_extd.h ├── KiCad_M644_breakout_v1.2d ├── .gitignore ├── 3d_terminal_blocks │ ├── 300_2_5.wrl │ └── 300_2_5_wrl_settings.png ├── M644_breakout_v1.2d-a_factory_gerbers │ ├── M644_breakout_v1.2d-B.Mask.gbr │ ├── M644_breakout_v1.2d-B.SilkS.gbr │ ├── M644_breakout_v1.2d-Bottom.gbr │ ├── M644_breakout_v1.2d-Edge.Cuts.gbr │ ├── M644_breakout_v1.2d-F.Mask.gbr │ ├── M644_breakout_v1.2d-F.SilkS.gbr │ ├── M644_breakout_v1.2d-NPTH.drl │ ├── M644_breakout_v1.2d-PTH.drl │ └── M644_breakout_v1.2d-Top.gbr ├── M644_breakout_v1.2d-eagle-import.dcm ├── M644_breakout_v1.2d.kicad_pcb ├── M644_breakout_v1.2d.pretty │ ├── 1X01.kicad_mod │ ├── 1X09-BIG.kicad_mod │ ├── 1X12.kicad_mod │ ├── C0805H.kicad_mod │ ├── CHIPLED_1206.kicad_mod │ ├── DO214AA.kicad_mod │ ├── D_7343-31R.kicad_mod │ ├── L3216C.kicad_mod │ ├── LED3MM.kicad_mod │ ├── ML6.kicad_mod │ ├── QS.kicad_mod │ ├── R0805.kicad_mod │ ├── R0805H.kicad_mod │ ├── SMBJ.kicad_mod │ ├── SW_TACT_SMALL.kicad_mod │ ├── TO220V.kicad_mod │ ├── TQFP44.kicad_mod │ └── W237-102.kicad_mod ├── M644_breakout_v1.2d.pro ├── M644_breakout_v1.2d.sch ├── M644_breakout_v1.2d_factory_gerbers │ ├── M644_breakout_v1.2d.GBL │ ├── M644_breakout_v1.2d.GBS │ ├── M644_breakout_v1.2d.GTL │ ├── M644_breakout_v1.2d.GTO │ ├── M644_breakout_v1.2d.GTS │ ├── M644_breakout_v1.2d.TXT │ ├── M644_breakout_v1.2d.do │ └── M644_breakout_v1.2d.dri ├── M644_breakout_v1.2d_pinmap.kicad_pcb ├── M644_breakout_v1.2d_pinmap.pro ├── Pictures │ ├── M644_breakout_v1.2d-a_bottom.png │ ├── M644_breakout_v1.2d-a_bottom_tiny.png │ ├── M644_breakout_v1.2d-a_top.png │ ├── M644_breakout_v1.2d-a_top_tiny.png │ ├── M644_breakout_v1.2d_bottom.png │ ├── M644_breakout_v1.2d_pinmap.png │ ├── M644_breakout_v1.2d_pinmap_tiny.png │ ├── M644_breakout_v1.2d_schematic.png │ ├── M644_breakout_v1.2d_top.png │ ├── M644_connection_schematic.png │ └── tested_system_photo_01.jpg ├── README.md ├── fp-lib-table └── sym-lib-table ├── README.md ├── README.ru.md ├── bootloader_zevero_sd_m1284p_make ├── .cproject ├── .gitignore ├── .project ├── LICENSE ├── Makefile ├── README.md ├── asmfunc.S ├── bootloader_zevero_sd_m1284p.hex.bootloader ├── diskio.c ├── m1284p_zevero_sd_m1284p_fuses.txt ├── main.c ├── pff │ ├── doc │ │ ├── 00index_p.html │ │ ├── css_e.css │ │ ├── css_p.css │ │ ├── img │ │ │ ├── layers3.png │ │ │ └── rwtest3.png │ │ └── pf │ │ │ ├── appnote.html │ │ │ ├── dinit.html │ │ │ ├── dreadp.html │ │ │ ├── dwritep.html │ │ │ ├── filename.html │ │ │ ├── lseek.html │ │ │ ├── mount.html │ │ │ ├── open.html │ │ │ ├── opendir.html │ │ │ ├── read.html │ │ │ ├── readdir.html │ │ │ ├── sdir.html │ │ │ ├── sfatfs.html │ │ │ ├── sfileinfo.html │ │ │ └── write.html │ └── src │ │ ├── 00readme.txt │ │ ├── diskio.c │ │ ├── diskio.h │ │ ├── integer.h │ │ ├── pff.c │ │ ├── pff.h │ │ └── pffconf.h ├── spi_pins.h └── uart │ ├── uart.c │ └── uart.h └── bootloader_zevero_sd_m644p_make ├── .cproject ├── .gitignore ├── .project ├── LICENSE ├── Makefile ├── README.md ├── asmfunc.S ├── bootloader_zevero_sd_m644p.hex.bootloader ├── diskio.c ├── m644p_zevero_sd_m644p_fuses.txt ├── main.c ├── pff ├── doc │ ├── 00index_p.html │ ├── css_e.css │ ├── css_p.css │ ├── img │ │ ├── layers3.png │ │ └── rwtest3.png │ └── pf │ │ ├── appnote.html │ │ ├── dinit.html │ │ ├── dreadp.html │ │ ├── dwritep.html │ │ ├── filename.html │ │ ├── lseek.html │ │ ├── mount.html │ │ ├── open.html │ │ ├── opendir.html │ │ ├── read.html │ │ ├── readdir.html │ │ ├── sdir.html │ │ ├── sfatfs.html │ │ ├── sfileinfo.html │ │ └── write.html └── src │ ├── 00readme.txt │ ├── diskio.c │ ├── diskio.h │ ├── integer.h │ ├── pff.c │ ├── pff.h │ └── pffconf.h ├── spi_pins.h └── uart ├── uart.c └── uart.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Object files 9 | *.o 10 | *.ko 11 | *.obj 12 | *.elf 13 | 14 | # Libraries 15 | *.lib 16 | *.a 17 | 18 | # Shared objects (inc. Windows DLLs) 19 | *.dll 20 | *.so 21 | *.so.* 22 | *.dylib 23 | 24 | # Executables 25 | *.exe 26 | *.out 27 | *.app 28 | *.i*86 29 | *.x86_64 30 | *.hex 31 | *.HEX 32 | *.bin 33 | *.BIN 34 | 35 | # Temporary GCC build 36 | *.eep 37 | *.lss 38 | *.lst 39 | *.map 40 | *.sym 41 | Release/ 42 | /.dep 43 | 44 | # Eclipse specific 45 | .settings/ 46 | 47 | # Wiznet not used here 48 | W5100/ 49 | W5100S/ 50 | W5200/ 51 | W5300/ 52 | Socket_APIs_V3.0.3.chm 53 | -------------------------------------------------------------------------------- /00_m1284p_blink/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | 00_m1284p_blink 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /00_m1284p_blink_make/.gitignore: -------------------------------------------------------------------------------- 1 | .dep/ -------------------------------------------------------------------------------- /00_m1284p_blink_make/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | 00_m1284p_blink_make 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 24 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 25 | de.innot.avreclipse.core.avrnature 26 | 27 | 28 | -------------------------------------------------------------------------------- /00_m1284p_blink_make/README.md: -------------------------------------------------------------------------------- 1 | Tiny AUX project to test Bootloader Zevero for AtMEGA 1284p 2 | -------------------------------------------------------------------------------- /00_m1284p_blink_make/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * main.c 3 | * 4 | * Created on: 22 нояб. 2018 г. 5 | * Author: maxx 6 | */ 7 | #include 8 | #include 9 | /* 10 | * m1284p minimum template, with one button & one led 11 | */ 12 | 13 | //M644P/M1284p Users LEDS: 14 | //LED1/PORTC.4- m644p/m1284p maxxir 15 | #define led1_conf() DDRC |= (1< 2 | 3 | 00_m644p_blink_make 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 24 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 25 | de.innot.avreclipse.core.avrnature 26 | 27 | 28 | -------------------------------------------------------------------------------- /00_m644p_blink_make/README.md: -------------------------------------------------------------------------------- 1 | Tiny AUX project to test Bootloader Zevero for AtMEGA 644p 2 | -------------------------------------------------------------------------------- /00_m644p_blink_make/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * main.c 3 | * 4 | * Created on: 22 нояб. 2018 г. 5 | * Author: maxx 6 | */ 7 | #include 8 | #include 9 | /* 10 | * m1284p minimum template, with one button & one led 11 | */ 12 | 13 | //M644P/M1284p Users LEDS: 14 | //LED1/PORTC.4- m644p/m1284p maxxir 15 | #define led1_conf() DDRC |= (1< 2 | 3 | 01_m1284p_bb00_minimum 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /02_m1284p_FATFS_Chang_tst/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | 02_m1284p_FATFS_Chang_tst 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /02_m1284p_FATFS_Chang_tst/ff/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _FF_INTEGER 6 | #define _FF_INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* This type MUST be 8 bit */ 16 | typedef unsigned char BYTE; 17 | 18 | /* These types MUST be 16 bit */ 19 | typedef short SHORT; 20 | typedef unsigned short WORD; 21 | typedef unsigned short WCHAR; 22 | 23 | /* These types MUST be 16 bit or 32 bit */ 24 | typedef int INT; 25 | typedef unsigned int UINT; 26 | 27 | /* These types MUST be 32 bit */ 28 | typedef long LONG; 29 | typedef unsigned long DWORD; 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /02_m1284p_FATFS_LFN_Chang_tst/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | 02_m1284p_FATFS_LFN_Chang_tst 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /02_m1284p_FATFS_LFN_Chang_tst/ff/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _FF_INTEGER 6 | #define _FF_INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* This type MUST be 8 bit */ 16 | typedef unsigned char BYTE; 17 | 18 | /* These types MUST be 16 bit */ 19 | typedef short SHORT; 20 | typedef unsigned short WORD; 21 | typedef unsigned short WCHAR; 22 | 23 | /* These types MUST be 16 bit or 32 bit */ 24 | typedef int INT; 25 | typedef unsigned int UINT; 26 | 27 | /* These types MUST be 32 bit */ 28 | typedef long LONG; 29 | typedef unsigned long DWORD; 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /03_m1284p_WIZNET_loopback_FATFS_template/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | 03_m1284p_WIZNET_loopback_FATFS_template 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /03_m1284p_WIZNET_loopback_FATFS_template/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE 2048 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /03_m1284p_WIZNET_loopback_FATFS_template/ff/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _FF_INTEGER 6 | #define _FF_INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* This type MUST be 8 bit */ 16 | typedef unsigned char BYTE; 17 | 18 | /* These types MUST be 16 bit */ 19 | typedef short SHORT; 20 | typedef unsigned short WORD; 21 | typedef unsigned short WCHAR; 22 | 23 | /* These types MUST be 16 bit or 32 bit */ 24 | typedef int INT; 25 | typedef unsigned int UINT; 26 | 27 | /* These types MUST be 32 bit */ 28 | typedef long LONG; 29 | typedef unsigned long DWORD; 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /03_m1284p_WIZNET_loopback_STATIC_IP/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | 03_m1284p_WIZNET_loopback_STATIC_IP 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /03_m1284p_WIZNET_loopback_STATIC_IP/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | #include 10 | #include "../../globals.h" 11 | 12 | /* Loopback test debug message printout enable */ 13 | #define _LOOPBACK_DEBUG_ 14 | 15 | /* DATA_BUF_SIZE define for Loopback example */ 16 | #ifndef LOOPBACK_DATA_BUF_SIZE 17 | #define LOOPBACK_DATA_BUF_SIZE 512 18 | #endif 19 | 20 | /************************/ 21 | /* Select LOOPBACK_MODE */ 22 | /************************/ 23 | #define LOOPBACK_MAIN_NOBLOCK 0 24 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 25 | 26 | 27 | /* TCP server Loopback test example */ 28 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 29 | 30 | /* TCP client Loopback test example */ 31 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 32 | 33 | /* UDP Loopback test example */ 34 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /03_m1284p_WIZNET_loopback_STATIC_IP/globals.c: -------------------------------------------------------------------------------- 1 | /* 2 | * globals.c 3 | * 4 | * Created on: 07 февр. 2019 г. 5 | * Author: maxx 6 | */ 7 | #include "globals.h" 8 | 9 | #ifdef IP_WORK 10 | //NIC metrics for WORK PC 11 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 12 | .ip = {192, 168, 0, 199}, // IP address 13 | .sn = {255, 255, 255, 0}, // Subnet mask 14 | .dns = {8,8,8,8}, // DNS address (google dns) 15 | .gw = {192, 168, 0, 1}, // Gateway address 16 | .dhcp = NETINFO_STATIC}; //Static IP configuration 17 | #else 18 | //NIC metrics for another PC (second IP configuration) 19 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 20 | .ip = {192, 168, 1, 199}, // IP address 21 | .sn = {255, 255, 255, 0}, // Subnet mask 22 | .dns = {8,8,8,8}, // DNS address (google dns) 23 | .gw = {192, 168, 1, 1}, // Gateway address 24 | .dhcp = NETINFO_STATIC}; //Static IP configuration 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /04_m1284p_WIZNET_loopback_DHCP/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | 04_m1284p_WIZNET_loopback_DHCP 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /04_m1284p_WIZNET_loopback_DHCP/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | #include 10 | #include "../../globals.h" 11 | 12 | /* Loopback test debug message printout enable */ 13 | #define _LOOPBACK_DEBUG_ 14 | 15 | /* DATA_BUF_SIZE define for Loopback example */ 16 | #ifndef LOOPBACK_DATA_BUF_SIZE 17 | #define LOOPBACK_DATA_BUF_SIZE 512 18 | #endif 19 | 20 | /************************/ 21 | /* Select LOOPBACK_MODE */ 22 | /************************/ 23 | #define LOOPBACK_MAIN_NOBLOCK 0 24 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 25 | 26 | 27 | /* TCP server Loopback test example */ 28 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 29 | 30 | /* TCP client Loopback test example */ 31 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 32 | 33 | /* UDP Loopback test example */ 34 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /04_m1284p_WIZNET_loopback_DHCP/globals.c: -------------------------------------------------------------------------------- 1 | /* 2 | * globals.c 3 | * 4 | * Created on: 07 февр. 2019 г. 5 | * Author: maxx 6 | */ 7 | #include "globals.h" 8 | 9 | #ifdef IP_WORK 10 | //NIC metrics for WORK PC 11 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 12 | .ip = {192, 168, 0, 199}, // IP address 13 | .sn = {255, 255, 255, 0}, // Subnet mask 14 | .dns = {8,8,8,8}, // DNS address (google dns) 15 | .gw = {192, 168, 0, 1}, // Gateway address 16 | .dhcp = NETINFO_DHCP}; //Static IP configuration 17 | #else 18 | //NIC metrics for another PC (second IP configuration) 19 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 20 | .ip = {192, 168, 1, 199}, // IP address 21 | .sn = {255, 255, 255, 0}, // Subnet mask 22 | .dns = {8,8,8,8}, // DNS address (google dns) 23 | .gw = {192, 168, 1, 1}, // Gateway address 24 | .dhcp = NETINFO_DHCP}; //Static IP configuration 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /04_m1284p_WIZNET_loopback_DHCP/spi.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "spi.h" 3 | #include "globals.h" 4 | 5 | /* 6 | * Initialize SPI bus. 7 | */ 8 | 9 | //~ // From working SPI ENC28J60 driver 10 | //~ #define ENC28J60_CONTROL_PORT PORTB 11 | //~ #define ENC28J60_CONTROL_DDR DDRB 12 | //~ 13 | //~ #define ENC28J60_CONTROL_CS PORTB6 14 | //~ #define ENC28J60_CONTROL_SO PORTB3 15 | //~ #define ENC28J60_CONTROL_SI PORTB2 16 | //~ #define ENC28J60_CONTROL_SCK PORTB1 17 | //~ #define ENC28J60_CONTROL_SS PORTB0 18 | //~ 19 | //~ // set CS to 0 = active 20 | //~ #define CSACTIVE ENC28J60_CONTROL_PORT&=~(1< 2 | 3 | 05_m1284p_WIZNET_DNS_client 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /05_m1284p_WIZNET_DNS_client/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE 2048 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /05_m1284p_WIZNET_DNS_client/spi.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "spi.h" 3 | #include "globals.h" 4 | 5 | /* 6 | * Initialize SPI bus. 7 | */ 8 | 9 | //~ // From working SPI ENC28J60 driver 10 | //~ #define ENC28J60_CONTROL_PORT PORTB 11 | //~ #define ENC28J60_CONTROL_DDR DDRB 12 | //~ 13 | //~ #define ENC28J60_CONTROL_CS PORTB6 14 | //~ #define ENC28J60_CONTROL_SO PORTB3 15 | //~ #define ENC28J60_CONTROL_SI PORTB2 16 | //~ #define ENC28J60_CONTROL_SCK PORTB1 17 | //~ #define ENC28J60_CONTROL_SS PORTB0 18 | //~ 19 | //~ // set CS to 0 = active 20 | //~ #define CSACTIVE ENC28J60_CONTROL_PORT&=~(1< 2 | 3 | 06_m1284p_WIZNET_DNS_SNTP_client 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /06_m1284p_WIZNET_DNS_SNTP_client/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE 2048 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /06_m1284p_WIZNET_DNS_SNTP_client/Internet/SNTP/sntp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/06_m1284p_WIZNET_DNS_SNTP_client/Internet/SNTP/sntp.c -------------------------------------------------------------------------------- /06_m1284p_WIZNET_DNS_SNTP_client/spi.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "spi.h" 3 | #include "globals.h" 4 | 5 | /* 6 | * Initialize SPI bus. 7 | */ 8 | 9 | //~ // From working SPI ENC28J60 driver 10 | //~ #define ENC28J60_CONTROL_PORT PORTB 11 | //~ #define ENC28J60_CONTROL_DDR DDRB 12 | //~ 13 | //~ #define ENC28J60_CONTROL_CS PORTB6 14 | //~ #define ENC28J60_CONTROL_SO PORTB3 15 | //~ #define ENC28J60_CONTROL_SI PORTB2 16 | //~ #define ENC28J60_CONTROL_SCK PORTB1 17 | //~ #define ENC28J60_CONTROL_SS PORTB0 18 | //~ 19 | //~ // set CS to 0 = active 20 | //~ #define CSACTIVE ENC28J60_CONTROL_PORT&=~(1< 2 | 3 | 07_m1284p_WIZNET_telnets_basic 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /07_m1284p_WIZNET_telnets_basic/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE 2048 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /07_m1284p_WIZNET_telnets_basic/Application/telnet/telnet.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/07_m1284p_WIZNET_telnets_basic/Application/telnet/telnet.c -------------------------------------------------------------------------------- /07_m1284p_WIZNET_telnets_basic/Application/telnet/telnet.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/07_m1284p_WIZNET_telnets_basic/Application/telnet/telnet.h -------------------------------------------------------------------------------- /07_m1284p_WIZNET_telnets_basic/globals.h: -------------------------------------------------------------------------------- 1 | /* 2 | * globals.h 3 | * 4 | * Created on: 29 нояб. 2018 г. 5 | * Author: maxx 6 | */ 7 | 8 | #ifndef GLOBALS_H_ 9 | #define GLOBALS_H_ 10 | 11 | #include 12 | #include 13 | #include 14 | #include "avr/wdt.h" // WatchDog 15 | 16 | 17 | #define PRINTF_EN 1 18 | #if PRINTF_EN 19 | #define PRINTF(FORMAT,args...) printf_P(PSTR(FORMAT),##args) 20 | #else 21 | #define PRINTF(...) 22 | #endif 23 | 24 | //#define IP_WORK 25 | 26 | extern unsigned long millis(void); 27 | extern int freeRam (void); 28 | 29 | //M644P/M1284p Users LEDS: 30 | //LED1/PORTC.4- m644p/m1284p maxxir 31 | #define led1_conf() DDRC |= (1< 2 | #include "spi.h" 3 | #include "globals.h" 4 | 5 | /* 6 | * Initialize SPI bus. 7 | */ 8 | 9 | //~ // From working SPI ENC28J60 driver 10 | //~ #define ENC28J60_CONTROL_PORT PORTB 11 | //~ #define ENC28J60_CONTROL_DDR DDRB 12 | //~ 13 | //~ #define ENC28J60_CONTROL_CS PORTB6 14 | //~ #define ENC28J60_CONTROL_SO PORTB3 15 | //~ #define ENC28J60_CONTROL_SI PORTB2 16 | //~ #define ENC28J60_CONTROL_SCK PORTB1 17 | //~ #define ENC28J60_CONTROL_SS PORTB0 18 | //~ 19 | //~ // set CS to 0 = active 20 | //~ #define CSACTIVE ENC28J60_CONTROL_PORT&=~(1< 2 | 3 | 08_m1284p_WIZNET_ICMP_aka_ping 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /08_m1284p_WIZNET_ICMP_aka_ping/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE 2048 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /08_m1284p_WIZNET_ICMP_aka_ping/spi.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "spi.h" 3 | #include "globals.h" 4 | 5 | /* 6 | * Initialize SPI bus. 7 | */ 8 | 9 | //~ // From working SPI ENC28J60 driver 10 | //~ #define ENC28J60_CONTROL_PORT PORTB 11 | //~ #define ENC28J60_CONTROL_DDR DDRB 12 | //~ 13 | //~ #define ENC28J60_CONTROL_CS PORTB6 14 | //~ #define ENC28J60_CONTROL_SO PORTB3 15 | //~ #define ENC28J60_CONTROL_SI PORTB2 16 | //~ #define ENC28J60_CONTROL_SCK PORTB1 17 | //~ #define ENC28J60_CONTROL_SS PORTB0 18 | //~ 19 | //~ // set CS to 0 = active 20 | //~ #define CSACTIVE ENC28J60_CONTROL_PORT&=~(1< 2 | 3 | 09_m1284p_WIZNET_simple_webserver 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /09_m1284p_WIZNET_simple_webserver/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE 2048 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /09_m1284p_WIZNET_simple_webserver/Application/webserver_simple/webpages.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/09_m1284p_WIZNET_simple_webserver/Application/webserver_simple/webpages.h -------------------------------------------------------------------------------- /09_m1284p_WIZNET_simple_webserver/Application/webserver_simple/webserver_simple.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/09_m1284p_WIZNET_simple_webserver/Application/webserver_simple/webserver_simple.c -------------------------------------------------------------------------------- /09_m1284p_WIZNET_simple_webserver/Application/webserver_simple/webserver_simple.h: -------------------------------------------------------------------------------- 1 | #ifndef _WEBSERVER_SIMPLE_H_ 2 | #define _WEBSERVER_SIMPLE_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | #include "../../globals.h" 10 | #include "webpages.h" 11 | 12 | /* Loopback test debug message printout enable */ 13 | #define _WEBSRV_DEBUG_ 14 | 15 | /* DATA_BUF_SIZE define for Loopback example */ 16 | #ifndef WEBSRV_DATA_BUF_SIZE 17 | #define WEBSRV_DATA_BUF_SIZE 2048 18 | #endif 19 | 20 | //Timeout (ms) to close too long opened socket (Help from freeze with work with Chrome browser (keep persistent connection on WIN7 ~ 120 sec)) 21 | #define HTTPD_OPEN_TIMEOUT 3000 22 | 23 | /* WEB SERVER test example */ 24 | int32_t websrv_simple(uint8_t sn, uint8_t* buf, uint16_t port); 25 | 26 | int strindex(char *s,char *t); 27 | 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif //_WEBSERVER_SIMPLE_H_ 34 | -------------------------------------------------------------------------------- /09_m1284p_WIZNET_simple_webserver/globals.h: -------------------------------------------------------------------------------- 1 | /* 2 | * globals.h 3 | * 4 | * Created on: 29 нояб. 2018 г. 5 | * Author: maxx 6 | */ 7 | 8 | #ifndef GLOBALS_H_ 9 | #define GLOBALS_H_ 10 | 11 | #include 12 | #include 13 | #include 14 | #include "avr/wdt.h" // WatchDog 15 | 16 | 17 | #define PRINTF_EN 1 18 | #if PRINTF_EN 19 | #define PRINTF(FORMAT,args...) printf_P(PSTR(FORMAT),##args) 20 | #else 21 | #define PRINTF(...) 22 | #endif 23 | 24 | //#define IP_WORK 25 | 26 | extern unsigned long millis(void); 27 | extern int freeRam (void); 28 | 29 | //M644P/M1284p Users LEDS: 30 | //LED1/PORTC.4- m644p/m1284p maxxir 31 | #define led1_conf() DDRC |= (1< 2 | 3 | 5 | 6 | 7 |

W5500 Simple Web Server


8 |

AVR_maxxir Mega1284p and WIZ5500


9 |
10 | 11 | Uptime: sec 12 |

LED1 OFF 13 |
LED1 ON 14 |

15 | 16 | 17 |

18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /09_m1284p_WIZNET_simple_webserver/spi.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "spi.h" 3 | #include "globals.h" 4 | 5 | /* 6 | * Initialize SPI bus. 7 | */ 8 | 9 | //~ // From working SPI ENC28J60 driver 10 | //~ #define ENC28J60_CONTROL_PORT PORTB 11 | //~ #define ENC28J60_CONTROL_DDR DDRB 12 | //~ 13 | //~ #define ENC28J60_CONTROL_CS PORTB6 14 | //~ #define ENC28J60_CONTROL_SO PORTB3 15 | //~ #define ENC28J60_CONTROL_SI PORTB2 16 | //~ #define ENC28J60_CONTROL_SCK PORTB1 17 | //~ #define ENC28J60_CONTROL_SS PORTB0 18 | //~ 19 | //~ // set CS to 0 = active 20 | //~ #define CSACTIVE ENC28J60_CONTROL_PORT&=~(1< 2 | 3 | 10_m1284p_WIZNET_HTTPServer_RAM_pages 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /10_m1284p_WIZNET_HTTPServer_RAM_pages/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE 2048 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /10_m1284p_WIZNET_HTTPServer_RAM_pages/Application/webserver_simple/webpages.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/10_m1284p_WIZNET_HTTPServer_RAM_pages/Application/webserver_simple/webpages.h -------------------------------------------------------------------------------- /10_m1284p_WIZNET_HTTPServer_RAM_pages/Application/webserver_simple/webserver_simple.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/10_m1284p_WIZNET_HTTPServer_RAM_pages/Application/webserver_simple/webserver_simple.c -------------------------------------------------------------------------------- /10_m1284p_WIZNET_HTTPServer_RAM_pages/Application/webserver_simple/webserver_simple.h: -------------------------------------------------------------------------------- 1 | #ifndef _WEBSERVER_SIMPLE_H_ 2 | #define _WEBSERVER_SIMPLE_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | #include "../../globals.h" 10 | #include "webpages.h" 11 | 12 | /* Loopback test debug message printout enable */ 13 | #define _WEBSRV_DEBUG_ 14 | 15 | /* DATA_BUF_SIZE define for Loopback example */ 16 | #ifndef WEBSRV_DATA_BUF_SIZE 17 | #define WEBSRV_DATA_BUF_SIZE 2048 18 | #endif 19 | 20 | //Timeout (ms) to close too long opened socket (Help from freeze with work with Chrome browser (keep persistent connection on WIN7 ~ 120 sec)) 21 | #define HTTPD_OPEN_TIMEOUT 3000 22 | 23 | /* WEB SERVER test example */ 24 | int32_t websrv_simple(uint8_t sn, uint8_t* buf, uint16_t port); 25 | 26 | int strindex(char *s,char *t); 27 | 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif //_WEBSERVER_SIMPLE_H_ 34 | -------------------------------------------------------------------------------- /10_m1284p_WIZNET_HTTPServer_RAM_pages/Internet/httpServer/httpUtil.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file httpUtil.h 3 | * @brief Header File for HTTP Server Utilities 4 | * @version 1.0 5 | * @date 2014/07/15 6 | * @par Revision 7 | * 2014/07/15 - 1.0 Release 8 | * @author 9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved. 10 | */ 11 | 12 | #ifndef __HTTPUTIL_H__ 13 | #define __HTTPUTIL_H__ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | #include "httpServer.h" 20 | #include "httpParser.h" 21 | 22 | uint8_t http_get_cgi_handler(uint8_t * uri_name, uint8_t * buf, uint32_t * file_len); 23 | uint8_t http_post_cgi_handler(uint8_t * uri_name, st_http_request * p_http_request, uint8_t * buf, uint32_t * file_len); 24 | 25 | uint8_t predefined_get_cgi_processor(uint8_t * uri_name, uint8_t * buf, uint16_t * len); 26 | uint8_t predefined_set_cgi_processor(uint8_t * uri_name, uint8_t * uri, uint8_t * buf, uint16_t * len); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /10_m1284p_WIZNET_HTTPServer_RAM_pages/globals.h: -------------------------------------------------------------------------------- 1 | /* 2 | * globals.h 3 | * 4 | * Created on: 29 нояб. 2018 г. 5 | * Author: maxx 6 | */ 7 | 8 | #ifndef GLOBALS_H_ 9 | #define GLOBALS_H_ 10 | 11 | #include 12 | #include 13 | #include 14 | #include "avr/wdt.h" // WatchDog 15 | 16 | 17 | #define PRINTF_EN 1 18 | #if PRINTF_EN 19 | #define PRINTF(FORMAT,args...) printf_P(PSTR(FORMAT),##args) 20 | #else 21 | #define PRINTF(...) 22 | #endif 23 | 24 | //#define IP_WORK 25 | 26 | //SPI CLOCK 4 or 8Mhz 27 | #define SPI_4_MHZ 28 | //#define SPI_8_MHZ 29 | 30 | extern unsigned long millis(void); 31 | extern int freeRam (void); 32 | 33 | //M644P/M1284p Users LEDS: 34 | //LED1/PORTC.4- m644p/m1284p maxxir 35 | #define led1_conf() DDRC |= (1< 2 | 3 | 11_m1284p_WIZNET_HTTPServer_FLASH_pages 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /11_m1284p_WIZNET_HTTPServer_FLASH_pages/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE 2048 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /11_m1284p_WIZNET_HTTPServer_FLASH_pages/Application/webserver_simple/webpages.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/11_m1284p_WIZNET_HTTPServer_FLASH_pages/Application/webserver_simple/webpages.h -------------------------------------------------------------------------------- /11_m1284p_WIZNET_HTTPServer_FLASH_pages/Application/webserver_simple/webserver_simple.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/11_m1284p_WIZNET_HTTPServer_FLASH_pages/Application/webserver_simple/webserver_simple.c -------------------------------------------------------------------------------- /11_m1284p_WIZNET_HTTPServer_FLASH_pages/Application/webserver_simple/webserver_simple.h: -------------------------------------------------------------------------------- 1 | #ifndef _WEBSERVER_SIMPLE_H_ 2 | #define _WEBSERVER_SIMPLE_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | #include "../../globals.h" 10 | #include "webpages.h" 11 | 12 | /* Loopback test debug message printout enable */ 13 | #define _WEBSRV_DEBUG_ 14 | 15 | /* DATA_BUF_SIZE define for Loopback example */ 16 | #ifndef WEBSRV_DATA_BUF_SIZE 17 | #define WEBSRV_DATA_BUF_SIZE 2048 18 | #endif 19 | 20 | //Timeout (ms) to close too long opened socket (Help from freeze with work with Chrome browser (keep persistent connection on WIN7 ~ 120 sec)) 21 | #define HTTPD_OPEN_TIMEOUT 3000 22 | 23 | /* WEB SERVER test example */ 24 | int32_t websrv_simple(uint8_t sn, uint8_t* buf, uint16_t port); 25 | 26 | int strindex(char *s,char *t); 27 | 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif //_WEBSERVER_SIMPLE_H_ 34 | -------------------------------------------------------------------------------- /11_m1284p_WIZNET_HTTPServer_FLASH_pages/Internet/httpServer_avr/httpUtil.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file httpUtil.h 3 | * @brief Header File for HTTP Server Utilities 4 | * @version 1.0 5 | * @date 2014/07/15 6 | * @par Revision 7 | * 2014/07/15 - 1.0 Release 8 | * @author 9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved. 10 | */ 11 | 12 | #ifndef __HTTPUTIL_H__ 13 | #define __HTTPUTIL_H__ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | #include "httpServer.h" 20 | #include "httpParser.h" 21 | 22 | uint8_t http_get_cgi_handler(uint8_t * uri_name, uint8_t * buf, uint32_t * file_len); 23 | uint8_t http_post_cgi_handler(uint8_t * uri_name, st_http_request * p_http_request, uint8_t * buf, uint32_t * file_len); 24 | 25 | uint8_t predefined_get_cgi_processor(uint8_t * uri_name, uint8_t * buf, uint16_t * len); 26 | uint8_t predefined_set_cgi_processor(uint8_t * uri_name, uint8_t * uri, uint8_t * buf, uint16_t * len); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /11_m1284p_WIZNET_HTTPServer_FLASH_pages/WWW/brd_wiznet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/11_m1284p_WIZNET_HTTPServer_FLASH_pages/WWW/brd_wiznet.png -------------------------------------------------------------------------------- /11_m1284p_WIZNET_HTTPServer_FLASH_pages/WWW/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/11_m1284p_WIZNET_HTTPServer_FLASH_pages/WWW/favicon.ico -------------------------------------------------------------------------------- /11_m1284p_WIZNET_HTTPServer_FLASH_pages/WWW/m1284p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/11_m1284p_WIZNET_HTTPServer_FLASH_pages/WWW/m1284p.png -------------------------------------------------------------------------------- /11_m1284p_WIZNET_HTTPServer_FLASH_pages/clean.bat: -------------------------------------------------------------------------------- 1 | del *.b#* 2 | del *.s#* 3 | pause 4 | -------------------------------------------------------------------------------- /11_m644p_WIZNET_HTTPServer_FLASH_pages/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11_m644p_WIZNET_HTTPServer_FLASH_pages 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /11_m644p_WIZNET_HTTPServer_FLASH_pages/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE 2048 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /11_m644p_WIZNET_HTTPServer_FLASH_pages/Application/webserver_simple/webpages.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/11_m644p_WIZNET_HTTPServer_FLASH_pages/Application/webserver_simple/webpages.h -------------------------------------------------------------------------------- /11_m644p_WIZNET_HTTPServer_FLASH_pages/Application/webserver_simple/webserver_simple.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/11_m644p_WIZNET_HTTPServer_FLASH_pages/Application/webserver_simple/webserver_simple.c -------------------------------------------------------------------------------- /11_m644p_WIZNET_HTTPServer_FLASH_pages/Application/webserver_simple/webserver_simple.h: -------------------------------------------------------------------------------- 1 | #ifndef _WEBSERVER_SIMPLE_H_ 2 | #define _WEBSERVER_SIMPLE_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | #include "../../globals.h" 10 | #include "webpages.h" 11 | 12 | /* Loopback test debug message printout enable */ 13 | #define _WEBSRV_DEBUG_ 14 | 15 | /* DATA_BUF_SIZE define for Loopback example */ 16 | #ifndef WEBSRV_DATA_BUF_SIZE 17 | #define WEBSRV_DATA_BUF_SIZE 2048 18 | #endif 19 | 20 | //Timeout (ms) to close too long opened socket (Help from freeze with work with Chrome browser (keep persistent connection on WIN7 ~ 120 sec)) 21 | #define HTTPD_OPEN_TIMEOUT 3000 22 | 23 | /* WEB SERVER test example */ 24 | int32_t websrv_simple(uint8_t sn, uint8_t* buf, uint16_t port); 25 | 26 | int strindex(char *s,char *t); 27 | 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif //_WEBSERVER_SIMPLE_H_ 34 | -------------------------------------------------------------------------------- /11_m644p_WIZNET_HTTPServer_FLASH_pages/Internet/httpServer_avr/httpUtil.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file httpUtil.h 3 | * @brief Header File for HTTP Server Utilities 4 | * @version 1.0 5 | * @date 2014/07/15 6 | * @par Revision 7 | * 2014/07/15 - 1.0 Release 8 | * @author 9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved. 10 | */ 11 | 12 | #ifndef __HTTPUTIL_H__ 13 | #define __HTTPUTIL_H__ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | #include "httpServer.h" 20 | #include "httpParser.h" 21 | 22 | uint8_t http_get_cgi_handler(uint8_t * uri_name, uint8_t * buf, uint32_t * file_len); 23 | uint8_t http_post_cgi_handler(uint8_t * uri_name, st_http_request * p_http_request, uint8_t * buf, uint32_t * file_len); 24 | 25 | uint8_t predefined_get_cgi_processor(uint8_t * uri_name, uint8_t * buf, uint16_t * len); 26 | uint8_t predefined_set_cgi_processor(uint8_t * uri_name, uint8_t * uri, uint8_t * buf, uint16_t * len); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /11_m644p_WIZNET_HTTPServer_FLASH_pages/WWW/brd_wiznet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/11_m644p_WIZNET_HTTPServer_FLASH_pages/WWW/brd_wiznet.png -------------------------------------------------------------------------------- /11_m644p_WIZNET_HTTPServer_FLASH_pages/WWW/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/11_m644p_WIZNET_HTTPServer_FLASH_pages/WWW/favicon.ico -------------------------------------------------------------------------------- /11_m644p_WIZNET_HTTPServer_FLASH_pages/WWW/m1284p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/11_m644p_WIZNET_HTTPServer_FLASH_pages/WWW/m1284p.png -------------------------------------------------------------------------------- /11_m644p_WIZNET_HTTPServer_FLASH_pages/clean.bat: -------------------------------------------------------------------------------- 1 | del *.b#* 2 | del *.s#* 3 | pause 4 | -------------------------------------------------------------------------------- /12_m1284p_WIZNET_HTTPServer_SDCARD_pages/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12_m1284p_WIZNET_HTTPServer_SDCARD_pages 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /12_m1284p_WIZNET_HTTPServer_SDCARD_pages/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE 2048 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /12_m1284p_WIZNET_HTTPServer_SDCARD_pages/Internet/httpServer_avr/httpUtil.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file httpUtil.h 3 | * @brief Header File for HTTP Server Utilities 4 | * @version 1.0 5 | * @date 2014/07/15 6 | * @par Revision 7 | * 2014/07/15 - 1.0 Release 8 | * @author 9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved. 10 | */ 11 | 12 | #ifndef __HTTPUTIL_H__ 13 | #define __HTTPUTIL_H__ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | #include "httpServer.h" 20 | #include "httpParser.h" 21 | 22 | uint8_t http_get_cgi_handler(uint8_t * uri_name, uint8_t * buf, uint32_t * file_len); 23 | uint8_t http_post_cgi_handler(uint8_t * uri_name, st_http_request * p_http_request, uint8_t * buf, uint32_t * file_len); 24 | 25 | uint8_t predefined_get_cgi_processor(uint8_t * uri_name, uint8_t * buf, uint16_t * len); 26 | uint8_t predefined_set_cgi_processor(uint8_t * uri_name, uint8_t * uri, uint8_t * buf, uint16_t * len); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /12_m1284p_WIZNET_HTTPServer_SDCARD_pages/WWW/ain.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server Analog Input 6 | 7 | 8 | 9 | 11 | 13 | 30 | 31 | 32 | 33 |
34 | 35 | 36 |
37 | 38 |
39 | 40 |
41 |
42 | 43 | 44 | -------------------------------------------------------------------------------- /12_m1284p_WIZNET_HTTPServer_SDCARD_pages/WWW/ain.js: -------------------------------------------------------------------------------- 1 | function AinCallback(o) 2 | { 3 | var pin = o.ain_p; 4 | $('txtain_v'+pin).value = o.ain_v; 5 | AinDrawgraph(o); 6 | } 7 | function getAin(o) 8 | { 9 | var p = o.attributes['pin'].value; 10 | var oUpdate; 11 | setTimeout(function() 12 | { 13 | oUpdate = new AJAX('get_ain'+p+'.cgi', 14 | function(t) 15 | { 16 | try 17 | { 18 | eval(t); 19 | } 20 | catch(e) 21 | { 22 | alert(e); 23 | } 24 | } 25 | ); 26 | oUpdate.doGet(); 27 | } 28 | , 300); 29 | } 30 | function AinDrawgraph(o) 31 | { 32 | var pin = o.ain_p; 33 | var val = o.ain_v; 34 | $('ain_v'+pin).style.width = val*500/1023+'px'; 35 | } 36 | function getAin6_update() 37 | { 38 | var oUpdate; 39 | setTimeout(function() 40 | { 41 | oUpdate = new AJAX('get_ain6.cgi', 42 | function(t) 43 | { 44 | try 45 | { 46 | eval(t); 47 | } 48 | catch(e) 49 | { 50 | alert(e); 51 | } 52 | } 53 | ); 54 | oUpdate.doGet(); 55 | } 56 | , 300); setTimeout('getAin6_update()', 500); 57 | } 58 | -------------------------------------------------------------------------------- /12_m1284p_WIZNET_HTTPServer_SDCARD_pages/WWW/ain_gaug.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server Analog Input Gauge 6 | 7 | 8 | 9 | 11 | 13 | 15 | 16 | 17 | 18 |
19 | 20 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /12_m1284p_WIZNET_HTTPServer_SDCARD_pages/WWW/ajax.js: -------------------------------------------------------------------------------- 1 | function AJAX(a, e) 2 | { 3 | var c = d(); 4 | c.onreadystatechange = b; 5 | function d() 6 | { 7 | if(window.XMLHttpRequest) 8 | { 9 | return new XMLHttpRequest() 10 | } 11 | else 12 | { 13 | if(window.ActiveXObject) 14 | { 15 | return new ActiveXObject("Microsoft.XMLHTTP") 16 | } 17 | } 18 | } 19 | function b() 20 | { 21 | if(c.readyState==4) 22 | { 23 | if(c.status==200) 24 | { 25 | if(e) 26 | { 27 | e(c.responseText) 28 | } 29 | } 30 | } 31 | } 32 | this.doGet = function() 33 | { 34 | c.open("GET", a, true); c.send(null) 35 | }; 36 | this.doPost = function(f) 37 | { 38 | c.open("POST", a, true); 39 | c.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 40 | c.setRequestHeader("ISAJAX", "yes"); 41 | c.send(f) 42 | } 43 | } 44 | function $(a) 45 | { 46 | return document.getElementById(a) 47 | } 48 | function $$(a) 49 | { 50 | return document.getElementsByName(a) 51 | } 52 | function $$_ie(a, c) 53 | { 54 | if(!a) 55 | { 56 | a = "*" 57 | } 58 | var b = document.getElementsByTagName(a); 59 | var e = []; for(var d = 0; d 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server Digital I/O v1.1 6 | 7 | 9 | 11 | 12 | 13 | 14 | 15 | 16 |

LED1: unknown..

17 | 18 |
19 | 20 |
21 |
22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /12_m1284p_WIZNET_HTTPServer_SDCARD_pages/WWW/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/12_m1284p_WIZNET_HTTPServer_SDCARD_pages/WWW/favicon.ico -------------------------------------------------------------------------------- /12_m1284p_WIZNET_HTTPServer_SDCARD_pages/WWW/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server 6 | 7 | 8 | 9 | 10 |
11 | W5500-AtMEGA1284p Web Server Demopage 12 |

13 | Network Information
14 | Base64 Image Data
15 |
16 | Board Schematic
17 | Mounting Scheme
18 |
19 | Ex1> Digital I/O
20 | Ex2> Analog Input
21 | Ex3> Analog Input: Google Gauge Chart
22 |
23 | Device Information
24 | 25 | 26 | -------------------------------------------------------------------------------- /12_m1284p_WIZNET_HTTPServer_SDCARD_pages/WWW/info.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Device Info 6 | 7 | 9 | 11 | 12 | 13 | 14 |
15 | W5500-AtMEGA1284p Device Information 16 |

17 |

..

18 | 19 | -------------------------------------------------------------------------------- /12_m1284p_WIZNET_HTTPServer_SDCARD_pages/WWW/info.js: -------------------------------------------------------------------------------- 1 | function getInfo() 2 | { 3 | var oUpdate; 4 | setTimeout(function() 5 | { 6 | oUpdate = new AJAX('get_info.cgi', function(t) 7 | { 8 | try 9 | { 10 | //*eval(t); 11 | document.getElementById('info_txt').innerHTML = t; 12 | } 13 | catch(e) 14 | { 15 | alert(e); 16 | } 17 | } 18 | ); oUpdate.doGet(); 19 | } 20 | , 300); setTimeout('getInfo()', 3000); 21 | } 22 | -------------------------------------------------------------------------------- /12_m1284p_WIZNET_HTTPServer_SDCARD_pages/WWW/m1284p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/12_m1284p_WIZNET_HTTPServer_SDCARD_pages/WWW/m1284p.png -------------------------------------------------------------------------------- /12_m1284p_WIZNET_HTTPServer_SDCARD_pages/WWW/netinfo.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server Network Info 6 | 7 | 10 | 12 | 14 | 15 | 16 | 17 |
18 | W5500-AtMEGA1284p Web Server Network Information 19 |

20 | 21 |
    22 |
  • 23 | 24 |
  • 25 | 26 |
  • 27 | 28 |
  • 29 | 30 |
  • 31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /12_m1284p_WIZNET_HTTPServer_SDCARD_pages/WWW/netinfo.js: -------------------------------------------------------------------------------- 1 | function NetinfoCallback(o) 2 | { 3 | $('txtmac').value = o.mac; 4 | $('txtip').value = o.ip; 5 | $('txtgw').value = o.gw; 6 | $('txtsn').value = o.sn; 7 | $('txtdns').value = o.dns; 8 | if(typeof(window.external)!='undefined') 9 | { 10 | obj = $$_ie('input', 'dhcp'); 11 | } 12 | else 13 | { 14 | obj = $$('dhcp'); 15 | } 16 | } 17 | function getNetinfo() 18 | { 19 | var oUpdate; 20 | setTimeout(function() 21 | { 22 | oUpdate = new AJAX('get_netinfo.cgi', function(t) 23 | { 24 | try 25 | { 26 | eval(t); 27 | } 28 | catch(e) 29 | { 30 | alert(e); 31 | } 32 | } 33 | ); 34 | oUpdate.doGet(); 35 | } 36 | , 1500); 37 | } 38 | -------------------------------------------------------------------------------- /12_m1284p_WIZNET_HTTPServer_SDCARD_pages/clean.bat: -------------------------------------------------------------------------------- 1 | del *.b#* 2 | del *.s#* 3 | pause 4 | -------------------------------------------------------------------------------- /12_m1284p_WIZNET_HTTPServer_SDCARD_pages/ff/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _FF_INTEGER 6 | #define _FF_INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* This type MUST be 8 bit */ 16 | typedef unsigned char BYTE; 17 | 18 | /* These types MUST be 16 bit */ 19 | typedef short SHORT; 20 | typedef unsigned short WORD; 21 | typedef unsigned short WCHAR; 22 | 23 | /* These types MUST be 16 bit or 32 bit */ 24 | typedef int INT; 25 | typedef unsigned int UINT; 26 | 27 | /* These types MUST be 32 bit */ 28 | typedef long LONG; 29 | typedef unsigned long DWORD; 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /12_m644p_WIZNET_HTTPServer_SDCARD_pages/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12_m644p_WIZNET_HTTPServer_SDCARD_pages 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /12_m644p_WIZNET_HTTPServer_SDCARD_pages/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE 2048 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /12_m644p_WIZNET_HTTPServer_SDCARD_pages/Internet/httpServer_avr/httpUtil.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file httpUtil.h 3 | * @brief Header File for HTTP Server Utilities 4 | * @version 1.0 5 | * @date 2014/07/15 6 | * @par Revision 7 | * 2014/07/15 - 1.0 Release 8 | * @author 9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved. 10 | */ 11 | 12 | #ifndef __HTTPUTIL_H__ 13 | #define __HTTPUTIL_H__ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | #include "httpServer.h" 20 | #include "httpParser.h" 21 | 22 | uint8_t http_get_cgi_handler(uint8_t * uri_name, uint8_t * buf, uint32_t * file_len); 23 | uint8_t http_post_cgi_handler(uint8_t * uri_name, st_http_request * p_http_request, uint8_t * buf, uint32_t * file_len); 24 | 25 | uint8_t predefined_get_cgi_processor(uint8_t * uri_name, uint8_t * buf, uint16_t * len); 26 | uint8_t predefined_set_cgi_processor(uint8_t * uri_name, uint8_t * uri, uint8_t * buf, uint16_t * len); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /12_m644p_WIZNET_HTTPServer_SDCARD_pages/WWW/ain.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server Analog Input 6 | 7 | 8 | 9 | 11 | 13 | 30 | 31 | 32 | 33 |
34 | 35 | 36 |
37 | 38 |
39 | 40 |
41 |
42 | 43 | 44 | -------------------------------------------------------------------------------- /12_m644p_WIZNET_HTTPServer_SDCARD_pages/WWW/ain.js: -------------------------------------------------------------------------------- 1 | function AinCallback(o) 2 | { 3 | var pin = o.ain_p; 4 | $('txtain_v'+pin).value = o.ain_v; 5 | AinDrawgraph(o); 6 | } 7 | function getAin(o) 8 | { 9 | var p = o.attributes['pin'].value; 10 | var oUpdate; 11 | setTimeout(function() 12 | { 13 | oUpdate = new AJAX('get_ain'+p+'.cgi', 14 | function(t) 15 | { 16 | try 17 | { 18 | eval(t); 19 | } 20 | catch(e) 21 | { 22 | alert(e); 23 | } 24 | } 25 | ); 26 | oUpdate.doGet(); 27 | } 28 | , 300); 29 | } 30 | function AinDrawgraph(o) 31 | { 32 | var pin = o.ain_p; 33 | var val = o.ain_v; 34 | $('ain_v'+pin).style.width = val*500/1023+'px'; 35 | } 36 | function getAin6_update() 37 | { 38 | var oUpdate; 39 | setTimeout(function() 40 | { 41 | oUpdate = new AJAX('get_ain6.cgi', 42 | function(t) 43 | { 44 | try 45 | { 46 | eval(t); 47 | } 48 | catch(e) 49 | { 50 | alert(e); 51 | } 52 | } 53 | ); 54 | oUpdate.doGet(); 55 | } 56 | , 300); setTimeout('getAin6_update()', 500); 57 | } 58 | -------------------------------------------------------------------------------- /12_m644p_WIZNET_HTTPServer_SDCARD_pages/WWW/ain_gaug.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server Analog Input Gauge 6 | 7 | 8 | 9 | 11 | 13 | 15 | 16 | 17 | 18 |
19 | 20 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /12_m644p_WIZNET_HTTPServer_SDCARD_pages/WWW/ajax.js: -------------------------------------------------------------------------------- 1 | function AJAX(a, e) 2 | { 3 | var c = d(); 4 | c.onreadystatechange = b; 5 | function d() 6 | { 7 | if(window.XMLHttpRequest) 8 | { 9 | return new XMLHttpRequest() 10 | } 11 | else 12 | { 13 | if(window.ActiveXObject) 14 | { 15 | return new ActiveXObject("Microsoft.XMLHTTP") 16 | } 17 | } 18 | } 19 | function b() 20 | { 21 | if(c.readyState==4) 22 | { 23 | if(c.status==200) 24 | { 25 | if(e) 26 | { 27 | e(c.responseText) 28 | } 29 | } 30 | } 31 | } 32 | this.doGet = function() 33 | { 34 | c.open("GET", a, true); c.send(null) 35 | }; 36 | this.doPost = function(f) 37 | { 38 | c.open("POST", a, true); 39 | c.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 40 | c.setRequestHeader("ISAJAX", "yes"); 41 | c.send(f) 42 | } 43 | } 44 | function $(a) 45 | { 46 | return document.getElementById(a) 47 | } 48 | function $$(a) 49 | { 50 | return document.getElementsByName(a) 51 | } 52 | function $$_ie(a, c) 53 | { 54 | if(!a) 55 | { 56 | a = "*" 57 | } 58 | var b = document.getElementsByTagName(a); 59 | var e = []; for(var d = 0; d 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server Digital I/O v1.1 6 | 7 | 9 | 11 | 12 | 13 | 14 | 15 | 16 |

LED1: unknown..

17 | 18 |
19 | 20 |
21 |
22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /12_m644p_WIZNET_HTTPServer_SDCARD_pages/WWW/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/12_m644p_WIZNET_HTTPServer_SDCARD_pages/WWW/favicon.ico -------------------------------------------------------------------------------- /12_m644p_WIZNET_HTTPServer_SDCARD_pages/WWW/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server 6 | 7 | 8 | 9 | 10 |
11 | W5500-AtMEGA1284p Web Server Demopage 12 |

13 | Network Information
14 | Base64 Image Data
15 |
16 | Board Schematic
17 | Mounting Scheme
18 |
19 | Ex1> Digital I/O
20 | Ex2> Analog Input
21 | Ex3> Analog Input: Google Gauge Chart
22 |
23 | Device Information
24 | 25 | 26 | -------------------------------------------------------------------------------- /12_m644p_WIZNET_HTTPServer_SDCARD_pages/WWW/info.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Device Info 6 | 7 | 9 | 11 | 12 | 13 | 14 |
15 | W5500-AtMEGA1284p Device Information 16 |

17 |

..

18 | 19 | -------------------------------------------------------------------------------- /12_m644p_WIZNET_HTTPServer_SDCARD_pages/WWW/info.js: -------------------------------------------------------------------------------- 1 | function getInfo() 2 | { 3 | var oUpdate; 4 | setTimeout(function() 5 | { 6 | oUpdate = new AJAX('get_info.cgi', function(t) 7 | { 8 | try 9 | { 10 | //*eval(t); 11 | document.getElementById('info_txt').innerHTML = t; 12 | } 13 | catch(e) 14 | { 15 | alert(e); 16 | } 17 | } 18 | ); oUpdate.doGet(); 19 | } 20 | , 300); setTimeout('getInfo()', 3000); 21 | } 22 | -------------------------------------------------------------------------------- /12_m644p_WIZNET_HTTPServer_SDCARD_pages/WWW/m1284p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/12_m644p_WIZNET_HTTPServer_SDCARD_pages/WWW/m1284p.png -------------------------------------------------------------------------------- /12_m644p_WIZNET_HTTPServer_SDCARD_pages/WWW/netinfo.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server Network Info 6 | 7 | 10 | 12 | 14 | 15 | 16 | 17 |
18 | W5500-AtMEGA1284p Web Server Network Information 19 |

20 | 21 |
    22 |
  • 23 | 24 |
  • 25 | 26 |
  • 27 | 28 |
  • 29 | 30 |
  • 31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /12_m644p_WIZNET_HTTPServer_SDCARD_pages/WWW/netinfo.js: -------------------------------------------------------------------------------- 1 | function NetinfoCallback(o) 2 | { 3 | $('txtmac').value = o.mac; 4 | $('txtip').value = o.ip; 5 | $('txtgw').value = o.gw; 6 | $('txtsn').value = o.sn; 7 | $('txtdns').value = o.dns; 8 | if(typeof(window.external)!='undefined') 9 | { 10 | obj = $$_ie('input', 'dhcp'); 11 | } 12 | else 13 | { 14 | obj = $$('dhcp'); 15 | } 16 | } 17 | function getNetinfo() 18 | { 19 | var oUpdate; 20 | setTimeout(function() 21 | { 22 | oUpdate = new AJAX('get_netinfo.cgi', function(t) 23 | { 24 | try 25 | { 26 | eval(t); 27 | } 28 | catch(e) 29 | { 30 | alert(e); 31 | } 32 | } 33 | ); 34 | oUpdate.doGet(); 35 | } 36 | , 1500); 37 | } 38 | -------------------------------------------------------------------------------- /12_m644p_WIZNET_HTTPServer_SDCARD_pages/clean.bat: -------------------------------------------------------------------------------- 1 | del *.b#* 2 | del *.s#* 3 | pause 4 | -------------------------------------------------------------------------------- /12_m644p_WIZNET_HTTPServer_SDCARD_pages/ff/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _FF_INTEGER 6 | #define _FF_INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* This type MUST be 8 bit */ 16 | typedef unsigned char BYTE; 17 | 18 | /* These types MUST be 16 bit */ 19 | typedef short SHORT; 20 | typedef unsigned short WORD; 21 | typedef unsigned short WCHAR; 22 | 23 | /* These types MUST be 16 bit or 32 bit */ 24 | typedef int INT; 25 | typedef unsigned int UINT; 26 | 27 | /* These types MUST be 32 bit */ 28 | typedef long LONG; 29 | typedef unsigned long DWORD; 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /14_m1284p_WIZNET_FTPC_FATFS/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14_m1284p_WIZNET_FTPC_FATFS 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /14_m1284p_WIZNET_FTPC_FATFS/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE 2048 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /14_m1284p_WIZNET_FTPC_FATFS/ff/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _FF_INTEGER 6 | #define _FF_INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* This type MUST be 8 bit */ 16 | typedef unsigned char BYTE; 17 | 18 | /* These types MUST be 16 bit */ 19 | typedef short SHORT; 20 | typedef unsigned short WORD; 21 | typedef unsigned short WCHAR; 22 | 23 | /* These types MUST be 16 bit or 32 bit */ 24 | typedef int INT; 25 | typedef unsigned int UINT; 26 | 27 | /* These types MUST be 32 bit */ 28 | typedef long LONG; 29 | typedef unsigned long DWORD; 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /14_m1284p_WIZNET_FTPC_FATFS/spi.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "spi.h" 3 | #include "globals.h" 4 | 5 | /* 6 | * Initialize SPI bus. 7 | */ 8 | 9 | //~ // From working SPI ENC28J60 driver 10 | //~ #define ENC28J60_CONTROL_PORT PORTB 11 | //~ #define ENC28J60_CONTROL_DDR DDRB 12 | //~ 13 | //~ #define ENC28J60_CONTROL_CS PORTB6 14 | //~ #define ENC28J60_CONTROL_SO PORTB3 15 | //~ #define ENC28J60_CONTROL_SI PORTB2 16 | //~ #define ENC28J60_CONTROL_SCK PORTB1 17 | //~ #define ENC28J60_CONTROL_SS PORTB0 18 | //~ 19 | //~ // set CS to 0 = active 20 | //~ #define CSACTIVE ENC28J60_CONTROL_PORT&=~(1< 2 | 3 | 15_m1284p_WIZNET_FTPD_FATFS 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /15_m1284p_WIZNET_FTPD_FATFS/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE 2048 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /15_m1284p_WIZNET_FTPD_FATFS/ff/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _FF_INTEGER 6 | #define _FF_INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* This type MUST be 8 bit */ 16 | typedef unsigned char BYTE; 17 | 18 | /* These types MUST be 16 bit */ 19 | typedef short SHORT; 20 | typedef unsigned short WORD; 21 | typedef unsigned short WCHAR; 22 | 23 | /* These types MUST be 16 bit or 32 bit */ 24 | typedef int INT; 25 | typedef unsigned int UINT; 26 | 27 | /* These types MUST be 32 bit */ 28 | typedef long LONG; 29 | typedef unsigned long DWORD; 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /15_m1284p_WIZNET_FTPD_FATFS/spi.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "spi.h" 3 | #include "globals.h" 4 | 5 | /* 6 | * Initialize SPI bus. 7 | */ 8 | 9 | //~ // From working SPI ENC28J60 driver 10 | //~ #define ENC28J60_CONTROL_PORT PORTB 11 | //~ #define ENC28J60_CONTROL_DDR DDRB 12 | //~ 13 | //~ #define ENC28J60_CONTROL_CS PORTB6 14 | //~ #define ENC28J60_CONTROL_SO PORTB3 15 | //~ #define ENC28J60_CONTROL_SI PORTB2 16 | //~ #define ENC28J60_CONTROL_SCK PORTB1 17 | //~ #define ENC28J60_CONTROL_SS PORTB0 18 | //~ 19 | //~ // set CS to 0 = active 20 | //~ #define CSACTIVE ENC28J60_CONTROL_PORT&=~(1< 2 | 3 | 16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE 2048 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD/Internet/httpServer_avr/httpUtil.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file httpUtil.h 3 | * @brief Header File for HTTP Server Utilities 4 | * @version 1.0 5 | * @date 2014/07/15 6 | * @par Revision 7 | * 2014/07/15 - 1.0 Release 8 | * @author 9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved. 10 | */ 11 | 12 | #ifndef __HTTPUTIL_H__ 13 | #define __HTTPUTIL_H__ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | #include "httpServer.h" 20 | #include "httpParser.h" 21 | 22 | uint8_t http_get_cgi_handler(uint8_t * uri_name, uint8_t * buf, uint32_t * file_len); 23 | uint8_t http_post_cgi_handler(uint8_t * uri_name, st_http_request * p_http_request, uint8_t * buf, uint32_t * file_len); 24 | 25 | uint8_t predefined_get_cgi_processor(uint8_t * uri_name, uint8_t * buf, uint16_t * len); 26 | uint8_t predefined_set_cgi_processor(uint8_t * uri_name, uint8_t * uri, uint8_t * buf, uint16_t * len); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/ain.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server Analog Input 6 | 7 | 8 | 9 | 11 | 13 | 30 | 31 | 32 | 33 |
34 | 35 | 36 |
37 | 38 |
39 | 40 |
41 |
42 | 43 | 44 | -------------------------------------------------------------------------------- /16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/ain.js: -------------------------------------------------------------------------------- 1 | function AinCallback(o) 2 | { 3 | var pin = o.ain_p; 4 | $('txtain_v'+pin).value = o.ain_v; 5 | AinDrawgraph(o); 6 | } 7 | function getAin(o) 8 | { 9 | var p = o.attributes['pin'].value; 10 | var oUpdate; 11 | setTimeout(function() 12 | { 13 | oUpdate = new AJAX('get_ain'+p+'.cgi', 14 | function(t) 15 | { 16 | try 17 | { 18 | eval(t); 19 | } 20 | catch(e) 21 | { 22 | alert(e); 23 | } 24 | } 25 | ); 26 | oUpdate.doGet(); 27 | } 28 | , 300); 29 | } 30 | function AinDrawgraph(o) 31 | { 32 | var pin = o.ain_p; 33 | var val = o.ain_v; 34 | $('ain_v'+pin).style.width = val*500/1023+'px'; 35 | } 36 | function getAin6_update() 37 | { 38 | var oUpdate; 39 | setTimeout(function() 40 | { 41 | oUpdate = new AJAX('get_ain6.cgi', 42 | function(t) 43 | { 44 | try 45 | { 46 | eval(t); 47 | } 48 | catch(e) 49 | { 50 | alert(e); 51 | } 52 | } 53 | ); 54 | oUpdate.doGet(); 55 | } 56 | , 300); setTimeout('getAin6_update()', 500); 57 | } 58 | -------------------------------------------------------------------------------- /16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/ain_gaug.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server Analog Input Gauge 6 | 7 | 8 | 9 | 11 | 13 | 15 | 16 | 17 | 18 |
19 | 20 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/ajax.js: -------------------------------------------------------------------------------- 1 | function AJAX(a, e) 2 | { 3 | var c = d(); 4 | c.onreadystatechange = b; 5 | function d() 6 | { 7 | if(window.XMLHttpRequest) 8 | { 9 | return new XMLHttpRequest() 10 | } 11 | else 12 | { 13 | if(window.ActiveXObject) 14 | { 15 | return new ActiveXObject("Microsoft.XMLHTTP") 16 | } 17 | } 18 | } 19 | function b() 20 | { 21 | if(c.readyState==4) 22 | { 23 | if(c.status==200) 24 | { 25 | if(e) 26 | { 27 | e(c.responseText) 28 | } 29 | } 30 | } 31 | } 32 | this.doGet = function() 33 | { 34 | c.open("GET", a, true); c.send(null) 35 | }; 36 | this.doPost = function(f) 37 | { 38 | c.open("POST", a, true); 39 | c.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 40 | c.setRequestHeader("ISAJAX", "yes"); 41 | c.send(f) 42 | } 43 | } 44 | function $(a) 45 | { 46 | return document.getElementById(a) 47 | } 48 | function $$(a) 49 | { 50 | return document.getElementsByName(a) 51 | } 52 | function $$_ie(a, c) 53 | { 54 | if(!a) 55 | { 56 | a = "*" 57 | } 58 | var b = document.getElementsByTagName(a); 59 | var e = []; for(var d = 0; d 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server Digital I/O v1.1 6 | 7 | 9 | 11 | 12 | 13 | 14 | 15 | 16 |

LED1: unknown..

17 | 18 |
19 | 20 |
21 |
22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/favicon.ico -------------------------------------------------------------------------------- /16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server 6 | 7 | 8 | 9 | 10 |
11 | W5500-AtMEGA1284p Web Server Demopage 12 |

13 | Network Information
14 | Base64 Image Data
15 |
16 | Board Schematic
17 | Mounting Scheme
18 |
19 | Ex1> Digital I/O
20 | Ex2> Analog Input
21 | Ex3> Analog Input: Google Gauge Chart
22 |
23 | Device Information
24 | 25 | 26 | -------------------------------------------------------------------------------- /16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/info.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Device Info 6 | 7 | 9 | 11 | 12 | 13 | 14 |
15 | W5500-AtMEGA1284p Device Information 16 |

17 |

..

18 | 19 | -------------------------------------------------------------------------------- /16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/info.js: -------------------------------------------------------------------------------- 1 | function getInfo() 2 | { 3 | var oUpdate; 4 | setTimeout(function() 5 | { 6 | oUpdate = new AJAX('get_info.cgi', function(t) 7 | { 8 | try 9 | { 10 | //*eval(t); 11 | document.getElementById('info_txt').innerHTML = t; 12 | } 13 | catch(e) 14 | { 15 | alert(e); 16 | } 17 | } 18 | ); oUpdate.doGet(); 19 | } 20 | , 300); setTimeout('getInfo()', 3000); 21 | } 22 | -------------------------------------------------------------------------------- /16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/m1284p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/m1284p.png -------------------------------------------------------------------------------- /16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/netinfo.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server Network Info 6 | 7 | 10 | 12 | 14 | 15 | 16 | 17 |
18 | W5500-AtMEGA1284p Web Server Network Information 19 |

20 | 21 |
    22 |
  • 23 | 24 |
  • 25 | 26 |
  • 27 | 28 |
  • 29 | 30 |
  • 31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/netinfo.js: -------------------------------------------------------------------------------- 1 | function NetinfoCallback(o) 2 | { 3 | $('txtmac').value = o.mac; 4 | $('txtip').value = o.ip; 5 | $('txtgw').value = o.gw; 6 | $('txtsn').value = o.sn; 7 | $('txtdns').value = o.dns; 8 | if(typeof(window.external)!='undefined') 9 | { 10 | obj = $$_ie('input', 'dhcp'); 11 | } 12 | else 13 | { 14 | obj = $$('dhcp'); 15 | } 16 | } 17 | function getNetinfo() 18 | { 19 | var oUpdate; 20 | setTimeout(function() 21 | { 22 | oUpdate = new AJAX('get_netinfo.cgi', function(t) 23 | { 24 | try 25 | { 26 | eval(t); 27 | } 28 | catch(e) 29 | { 30 | alert(e); 31 | } 32 | } 33 | ); 34 | oUpdate.doGet(); 35 | } 36 | , 1500); 37 | } 38 | -------------------------------------------------------------------------------- /16_m1284p_WIZNET_HTTPD_FTPD_FATFS_SDCARD/ff/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _FF_INTEGER 6 | #define _FF_INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* This type MUST be 8 bit */ 16 | typedef unsigned char BYTE; 17 | 18 | /* These types MUST be 16 bit */ 19 | typedef short SHORT; 20 | typedef unsigned short WORD; 21 | typedef unsigned short WCHAR; 22 | 23 | /* These types MUST be 16 bit or 32 bit */ 24 | typedef int INT; 25 | typedef unsigned int UINT; 26 | 27 | /* These types MUST be 32 bit */ 28 | typedef long LONG; 29 | typedef unsigned long DWORD; 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE 2048 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/Internet/httpServer_avr/httpUtil.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file httpUtil.h 3 | * @brief Header File for HTTP Server Utilities 4 | * @version 1.0 5 | * @date 2014/07/15 6 | * @par Revision 7 | * 2014/07/15 - 1.0 Release 8 | * @author 9 | * \n\n @par Copyright (C) 1998 - 2014 WIZnet. All rights reserved. 10 | */ 11 | 12 | #ifndef __HTTPUTIL_H__ 13 | #define __HTTPUTIL_H__ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | #include "httpServer.h" 20 | #include "httpParser.h" 21 | 22 | uint8_t http_get_cgi_handler(uint8_t * uri_name, uint8_t * buf, uint32_t * file_len); 23 | uint8_t http_post_cgi_handler(uint8_t * uri_name, st_http_request * p_http_request, uint8_t * buf, uint32_t * file_len); 24 | 25 | uint8_t predefined_get_cgi_processor(uint8_t * uri_name, uint8_t * buf, uint16_t * len); 26 | uint8_t predefined_set_cgi_processor(uint8_t * uri_name, uint8_t * uri, uint8_t * buf, uint16_t * len); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/ain.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server Analog Input 6 | 7 | 8 | 9 | 11 | 13 | 30 | 31 | 32 | 33 |
34 | 35 | 36 |
37 | 38 |
39 | 40 |
41 |
42 | 43 | 44 | -------------------------------------------------------------------------------- /17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/ain.js: -------------------------------------------------------------------------------- 1 | function AinCallback(o) 2 | { 3 | var pin = o.ain_p; 4 | $('txtain_v'+pin).value = o.ain_v; 5 | AinDrawgraph(o); 6 | } 7 | function getAin(o) 8 | { 9 | var p = o.attributes['pin'].value; 10 | var oUpdate; 11 | setTimeout(function() 12 | { 13 | oUpdate = new AJAX('get_ain'+p+'.cgi', 14 | function(t) 15 | { 16 | try 17 | { 18 | eval(t); 19 | } 20 | catch(e) 21 | { 22 | alert(e); 23 | } 24 | } 25 | ); 26 | oUpdate.doGet(); 27 | } 28 | , 300); 29 | } 30 | function AinDrawgraph(o) 31 | { 32 | var pin = o.ain_p; 33 | var val = o.ain_v; 34 | $('ain_v'+pin).style.width = val*500/1023+'px'; 35 | } 36 | function getAin6_update() 37 | { 38 | var oUpdate; 39 | setTimeout(function() 40 | { 41 | oUpdate = new AJAX('get_ain6.cgi', 42 | function(t) 43 | { 44 | try 45 | { 46 | eval(t); 47 | } 48 | catch(e) 49 | { 50 | alert(e); 51 | } 52 | } 53 | ); 54 | oUpdate.doGet(); 55 | } 56 | , 300); setTimeout('getAin6_update()', 500); 57 | } 58 | -------------------------------------------------------------------------------- /17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/ain_gaug.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server Analog Input Gauge 6 | 7 | 8 | 9 | 11 | 13 | 15 | 16 | 17 | 18 |
19 | 20 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/brd_wiz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/brd_wiz.png -------------------------------------------------------------------------------- /17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/dio.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server Digital I/O v1.1 6 | 7 | 9 | 11 | 12 | 13 | 14 | 15 | 16 |

LED1: unknown..

17 | 18 |
19 | 20 |
21 |
22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/favicon.ico -------------------------------------------------------------------------------- /17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server 6 | 7 | 8 | 9 | 10 |
11 | W5500-AtMEGA1284p Web Server Demopage 12 |

13 | Network Information
14 | Base64 Image Data
15 |
16 | Board Schematic
17 | Mounting Scheme
18 |
19 | Ex1> Digital I/O
20 | Ex2> Analog Input
21 | Ex3> Analog Input: Google Gauge Chart
22 |
23 | Device Information
24 | 25 | 26 | -------------------------------------------------------------------------------- /17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/info.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Device Info 6 | 7 | 9 | 11 | 12 | 13 | 14 |
15 | W5500-AtMEGA1284p Device Information 16 |

17 |

..

18 | 19 | -------------------------------------------------------------------------------- /17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/info.js: -------------------------------------------------------------------------------- 1 | function getInfo() 2 | { 3 | var oUpdate; 4 | setTimeout(function() 5 | { 6 | oUpdate = new AJAX('get_info.cgi', function(t) 7 | { 8 | try 9 | { 10 | //*eval(t); 11 | document.getElementById('info_txt').innerHTML = t; 12 | } 13 | catch(e) 14 | { 15 | alert(e); 16 | } 17 | } 18 | ); oUpdate.doGet(); 19 | } 20 | , 300); setTimeout('getInfo()', 3000); 21 | } 22 | -------------------------------------------------------------------------------- /17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/m1284p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/m1284p.png -------------------------------------------------------------------------------- /17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/netinfo.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W5500-AtMEGA1284p Web Server Network Info 6 | 7 | 10 | 12 | 14 | 15 | 16 | 17 |
18 | W5500-AtMEGA1284p Web Server Network Information 19 |

20 | 21 |
    22 |
  • 23 | 24 |
  • 25 | 26 |
  • 27 | 28 |
  • 29 | 30 |
  • 31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/WWW/netinfo.js: -------------------------------------------------------------------------------- 1 | function NetinfoCallback(o) 2 | { 3 | $('txtmac').value = o.mac; 4 | $('txtip').value = o.ip; 5 | $('txtgw').value = o.gw; 6 | $('txtsn').value = o.sn; 7 | $('txtdns').value = o.dns; 8 | if(typeof(window.external)!='undefined') 9 | { 10 | obj = $$_ie('input', 'dhcp'); 11 | } 12 | else 13 | { 14 | obj = $$('dhcp'); 15 | } 16 | } 17 | function getNetinfo() 18 | { 19 | var oUpdate; 20 | setTimeout(function() 21 | { 22 | oUpdate = new AJAX('get_netinfo.cgi', function(t) 23 | { 24 | try 25 | { 26 | eval(t); 27 | } 28 | catch(e) 29 | { 30 | alert(e); 31 | } 32 | } 33 | ); 34 | oUpdate.doGet(); 35 | } 36 | , 1500); 37 | } 38 | -------------------------------------------------------------------------------- /17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/ff/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _FF_INTEGER 6 | #define _FF_INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* This type MUST be 8 bit */ 16 | typedef unsigned char BYTE; 17 | 18 | /* These types MUST be 16 bit */ 19 | typedef short SHORT; 20 | typedef unsigned short WORD; 21 | typedef unsigned short WCHAR; 22 | 23 | /* These types MUST be 16 bit or 32 bit */ 24 | typedef int INT; 25 | typedef unsigned int UINT; 26 | 27 | /* These types MUST be 32 bit */ 28 | typedef long LONG; 29 | typedef unsigned long DWORD; 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /17_m1284p_BTLD_WIZNET_HTTPD_FTPD_FATFS_SDCARD/globals.c: -------------------------------------------------------------------------------- 1 | /* 2 | * globals.c 3 | * 4 | * Created on: 07 февр. 2019 г. 5 | * Author: maxx 6 | */ 7 | #include "globals.h" 8 | 9 | #ifdef IP_WORK 10 | //NIC metrics for WORK PC 11 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 12 | .ip = {192, 168, 0, 199}, // IP address 13 | .sn = {255, 255, 255, 0}, // Subnet mask 14 | .dns = {8,8,8,8}, // DNS address (google dns) 15 | .gw = {192, 168, 0, 1}, // Gateway address 16 | .dhcp = NETINFO_STATIC}; //Static IP configuration 17 | #else 18 | //NIC metrics for another PC (second IP configuration) 19 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 20 | .ip = {192, 168, 1, 199}, // IP address 21 | .sn = {255, 255, 255, 0}, // Subnet mask 22 | .dns = {8,8,8,8}, // DNS address (google dns) 23 | .gw = {192, 168, 1, 1}, // Gateway address 24 | .dhcp = NETINFO_STATIC}; //Static IP configuration 25 | #endif 26 | 27 | //FTPD user-pass 28 | #ifdef FTPD_AUTH_EN 29 | const char ftpd_user[] = "user1234"; 30 | const char ftpd_pass[] = "open_sesame"; 31 | #endif 32 | -------------------------------------------------------------------------------- /18_m1284p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | 18_m1284p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /18_m1284p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD/1284BOOT.BIN.bootloaded: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/18_m1284p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD/1284BOOT.BIN.bootloaded -------------------------------------------------------------------------------- /18_m1284p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD/1284BOOT.BIN.bootloaded.readme: -------------------------------------------------------------------------------- 1 | Synopsis: 2 | 1284BOOT.BIN.bootloaded - precompiled binary for use with bootloader zevero for m1284p 3 | 4 | IP specs in this binary: 5 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 6 | .ip = {192, 168, 0, 199}, // IP address 7 | .sn = {255, 255, 255, 0}, // Subnet mask 8 | .dns = {8,8,8,8}, // DNS address (google dns) 9 | .gw = {192, 168, 0, 1}, // Gateway address 10 | .dhcp = NETINFO_STATIC}; //Static IP configuration 11 | 12 | How to use: 13 | Just copy 1284BOOT.BIN.bootloaded to root SD-card (FAT32 FS) as 1284BOOT.BIN, 14 | then insert SD-card into m1284p system (with bootloader zevero flashed before), 15 | and reboot m1284p system. 16 | 17 | maxxir 18 | 23.03.2019 10:27:11 19 | -------------------------------------------------------------------------------- /18_m1284p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | #include "../../globals.h" 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE ETH_LOOPBACK_MAX_BUF_SIZE 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /18_m1284p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD/ff/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _FF_INTEGER 6 | #define _FF_INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* This type MUST be 8 bit */ 16 | typedef unsigned char BYTE; 17 | 18 | /* These types MUST be 16 bit */ 19 | typedef short SHORT; 20 | typedef unsigned short WORD; 21 | typedef unsigned short WCHAR; 22 | 23 | /* These types MUST be 16 bit or 32 bit */ 24 | typedef int INT; 25 | typedef unsigned int UINT; 26 | 27 | /* These types MUST be 32 bit */ 28 | typedef long LONG; 29 | typedef unsigned long DWORD; 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /18_m1284p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD/globals.c: -------------------------------------------------------------------------------- 1 | /* 2 | * globals.c 3 | * 4 | * Created on: 07 февр. 2019 г. 5 | * Author: maxx 6 | */ 7 | #include "globals.h" 8 | 9 | #ifdef IP_WORK 10 | //NIC metrics for WORK PC 11 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 12 | .ip = {192, 168, 0, 199}, // IP address 13 | .sn = {255, 255, 255, 0}, // Subnet mask 14 | .dns = {8,8,8,8}, // DNS address (google dns) 15 | .gw = {192, 168, 0, 1}, // Gateway address 16 | .dhcp = NETINFO_STATIC}; //Static IP configuration 17 | #else 18 | //NIC metrics for another PC (second IP configuration) 19 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 20 | .ip = {192, 168, 1, 199}, // IP address 21 | .sn = {255, 255, 255, 0}, // Subnet mask 22 | .dns = {8,8,8,8}, // DNS address (google dns) 23 | .gw = {192, 168, 1, 1}, // Gateway address 24 | .dhcp = NETINFO_STATIC}; //Static IP configuration 25 | #endif 26 | 27 | //FTPD user-pass 28 | #ifdef FTPD_AUTH_EN 29 | const char ftpd_user[] = "user1234"; 30 | const char ftpd_pass[] = "open_sesame"; 31 | #endif 32 | -------------------------------------------------------------------------------- /18_m644p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | 18_m644p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /18_m644p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD/644BOOT.BIN.bootloaded: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/18_m644p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD/644BOOT.BIN.bootloaded -------------------------------------------------------------------------------- /18_m644p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD/644BOOT.BIN.bootloaded.readme: -------------------------------------------------------------------------------- 1 | Synopsis: 2 | 644BOOT.BIN.bootloaded - precompiled binary for use with bootloader zevero for m644p 3 | 4 | IP specs in this binary: 5 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 6 | .ip = {192, 168, 1, 199}, // IP address 7 | .sn = {255, 255, 255, 0}, // Subnet mask 8 | .dns = {8,8,8,8}, // DNS address (google dns) 9 | .gw = {192, 168, 1, 1}, // Gateway address 10 | .dhcp = NETINFO_STATIC}; //Static IP configuration 11 | 12 | How to use: 13 | Just copy 644BOOT.BIN.bootloaded to root SD-card (FAT32 FS) as 644BOOT.BIN, 14 | then insert SD-card into m644p system (with bootloader zevero flashed before), 15 | and reboot m644p system. 16 | 17 | maxxir 18 | 23.03.2019 10:34:30 19 | -------------------------------------------------------------------------------- /18_m644p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | #include "../../globals.h" 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE ETH_LOOPBACK_MAX_BUF_SIZE 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /18_m644p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD/ff/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _FF_INTEGER 6 | #define _FF_INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* This type MUST be 8 bit */ 16 | typedef unsigned char BYTE; 17 | 18 | /* These types MUST be 16 bit */ 19 | typedef short SHORT; 20 | typedef unsigned short WORD; 21 | typedef unsigned short WCHAR; 22 | 23 | /* These types MUST be 16 bit or 32 bit */ 24 | typedef int INT; 25 | typedef unsigned int UINT; 26 | 27 | /* These types MUST be 32 bit */ 28 | typedef long LONG; 29 | typedef unsigned long DWORD; 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /18_m644p_BTLD_WIZNET_LOOPBACK_FTPD_FATFS_SDCARD/globals.c: -------------------------------------------------------------------------------- 1 | /* 2 | * globals.c 3 | * 4 | * Created on: 07 февр. 2019 г. 5 | * Author: maxx 6 | */ 7 | #include "globals.h" 8 | 9 | #ifdef IP_WORK 10 | //NIC metrics for WORK PC 11 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 12 | .ip = {192, 168, 0, 199}, // IP address 13 | .sn = {255, 255, 255, 0}, // Subnet mask 14 | .dns = {8,8,8,8}, // DNS address (google dns) 15 | .gw = {192, 168, 0, 1}, // Gateway address 16 | .dhcp = NETINFO_STATIC}; //Static IP configuration 17 | #else 18 | //NIC metrics for another PC (second IP configuration) 19 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 20 | .ip = {192, 168, 1, 199}, // IP address 21 | .sn = {255, 255, 255, 0}, // Subnet mask 22 | .dns = {8,8,8,8}, // DNS address (google dns) 23 | .gw = {192, 168, 1, 1}, // Gateway address 24 | .dhcp = NETINFO_STATIC}; //Static IP configuration 25 | #endif 26 | 27 | //FTPD user-pass 28 | #ifdef FTPD_AUTH_EN 29 | const char ftpd_user[] = "user1234"; 30 | const char ftpd_pass[] = "open_sesame"; 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /19_m1284p_WIZNET_blynk/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19_m1284p_WIZNET_blynk 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /19_m1284p_WIZNET_blynk/Application/Blynk/blynkDependency.h: -------------------------------------------------------------------------------- 1 | #ifndef _WIZNET_BLYNK_DEPENDENCY_H_ 2 | #define _WIZNET_BLYNK_DEPENDENCY_H_ 3 | 4 | #include 5 | #include "blynk.h" 6 | 7 | //////////////////////////////////////////////////////////////// 8 | typedef enum { // Pin mode; directions 9 | INPUT, 10 | OUTPUT, 11 | INPUT_PULLUP 12 | }pinmode_dir; 13 | 14 | typedef enum {false = 0, true = !false} Boolian; 15 | 16 | #define HIGH 1 17 | #define LOW 0 18 | //////////////////////////////////////////////////////////////// 19 | 20 | uint8_t digitalRead(uint8_t pin); 21 | void digitalWrite(uint8_t pin, uint8_t val); 22 | 23 | uint16_t analogRead(uint8_t pin); 24 | void analogWrite(uint8_t pin, uint8_t val); 25 | 26 | uint16_t virtualRead(uint8_t pin); 27 | void virtualWrite(uint8_t pin, uint16_t val); 28 | 29 | void pinMode(uint8_t pin, pinmode_dir dir); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /19_m1284p_WIZNET_blynk/Blynk_application/Check out m1284 + W5500 app I've made.txt: -------------------------------------------------------------------------------- 1 | Hey, 2 | 3 | I've made m1284 + W5500 app. You are welcome to try it out! 4 | 5 | To start using it: 6 | 1. Download Blynk App: http://j.mp/blynk_Android or http://j.mp/blynk_iOS 7 | 2. Touch the QR-code icon and point the camera to the code below 8 | 3. Enjoy my app! 9 | -------------------------------------------------------------------------------- /19_m1284p_WIZNET_blynk/Blynk_application/Screenshot_2019-03-18-13-37-20-278_cc.blynk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/19_m1284p_WIZNET_blynk/Blynk_application/Screenshot_2019-03-18-13-37-20-278_cc.blynk.png -------------------------------------------------------------------------------- /19_m1284p_WIZNET_blynk/Blynk_application/app1_m1284p_and_W5500_QR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/19_m1284p_WIZNET_blynk/Blynk_application/app1_m1284p_and_W5500_QR.png -------------------------------------------------------------------------------- /19_m1284p_WIZNET_blynk/Blynk_application/app2_m1284p_and_W5500_QR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/19_m1284p_WIZNET_blynk/Blynk_application/app2_m1284p_and_W5500_QR.png -------------------------------------------------------------------------------- /19_m1284p_WIZNET_blynk/README.md: -------------------------------------------------------------------------------- 1 | # AtMega1284p+W5500 IOT Blynk application 2 | 3 | I’ve made porting from W5500_EVB(NXP LPC13xx + W5500) to AtMega1284p+W5500 custom board. 4 | 5 | This is NO Arduino. Used C language project with WIZNET native sockets API , only for experienced programmers. 6 | 7 | Building in Eclipse Kepler with AVR-Eclipse plugin and avr-gcc 4.9.2 toolchain. 8 | 9 | I made correction blynk.h/blynk.c to match BLYNK protocol 0.6.0, 10 | because original W5500_EVB project based on BLYNK 0.2.1. 11 | 12 | Tested and worked: 13 | 14 | GPIO IN-OUT, Analog READ-WRITE, Virtual IN-OUT, PUSH values, PUSH messages, blynk_syncAll(). 15 | -------------------------------------------------------------------------------- /19_m1284p_WIZNET_blynk/globals.c: -------------------------------------------------------------------------------- 1 | /* 2 | * globals.c 3 | * 4 | * Created on: 07 февр. 2019 г. 5 | * Author: maxx 6 | */ 7 | #include "globals.h" 8 | 9 | #ifdef IP_WORK 10 | //NIC metrics for WORK PC 11 | uint8_t DNS_2nd[4] = {192, 168, 0, 1}; // Secondary DNS server IP 12 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 13 | .ip = {192, 168, 0, 199}, // IP address 14 | .sn = {255, 255, 255, 0}, // Subnet mask 15 | .dns = {8,8,8,8}, // DNS address (google dns) 16 | .gw = {192, 168, 0, 1}, // Gateway address 17 | .dhcp = NETINFO_STATIC}; //Static IP configuration 18 | #else 19 | //NIC metrics for another PC (second IP configuration) 20 | uint8_t DNS_2nd[4] = {192, 168, 1, 1}; // Secondary DNS server IP 21 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 22 | .ip = {192, 168, 1, 199}, // IP address 23 | .sn = {255, 255, 255, 0}, // Subnet mask 24 | .dns = {8,8,8,8}, // DNS address (google dns) 25 | .gw = {192, 168, 1, 1}, // Gateway address 26 | .dhcp = NETINFO_STATIC}; //Static IP configuration 27 | #endif 28 | 29 | //My auth token for my android test application "m1284 + W5500": 30 | uint8_t auth[] = "add_your_own_token_here"; // You should get your own Auth Token in the BLYNK App 31 | -------------------------------------------------------------------------------- /19_m1284p_WIZNET_blynk/spi.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "spi.h" 3 | #include "globals.h" 4 | 5 | /* 6 | * Initialize SPI bus. 7 | */ 8 | 9 | //~ // From working SPI ENC28J60 driver 10 | //~ #define ENC28J60_CONTROL_PORT PORTB 11 | //~ #define ENC28J60_CONTROL_DDR DDRB 12 | //~ 13 | //~ #define ENC28J60_CONTROL_CS PORTB6 14 | //~ #define ENC28J60_CONTROL_SO PORTB3 15 | //~ #define ENC28J60_CONTROL_SI PORTB2 16 | //~ #define ENC28J60_CONTROL_SCK PORTB1 17 | //~ #define ENC28J60_CONTROL_SS PORTB0 18 | //~ 19 | //~ // set CS to 0 = active 20 | //~ #define CSACTIVE ENC28J60_CONTROL_PORT&=~(1< 2 | 3 | 20_m1284p_BTLD_WIZNET_BLYNK_FTPD_FATFS_SDCARD 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /20_m1284p_BTLD_WIZNET_BLYNK_FTPD_FATFS_SDCARD/1284BOOT.BIN.bootloaded: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/20_m1284p_BTLD_WIZNET_BLYNK_FTPD_FATFS_SDCARD/1284BOOT.BIN.bootloaded -------------------------------------------------------------------------------- /20_m1284p_BTLD_WIZNET_BLYNK_FTPD_FATFS_SDCARD/1284BOOT.BIN.bootloaded.readme: -------------------------------------------------------------------------------- 1 | Synopsis: 2 | 1284BOOT.BIN.bootloaded - precompiled binary for use with bootloader zevero for m1284p 3 | 4 | IP specs in this binary: 5 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 6 | .ip = {192, 168, 0, 199}, // IP address 7 | .sn = {255, 255, 255, 0}, // Subnet mask 8 | .dns = {8,8,8,8}, // DNS address (google dns) 9 | .gw = {192, 168, 0, 1}, // Gateway address 10 | .dhcp = NETINFO_STATIC}; //Static IP configuration 11 | 12 | How to use: 13 | Just copy 1284BOOT.BIN.bootloaded to root SD-card (FAT32 FS) as 1284BOOT.BIN, 14 | then insert SD-card into m1284p system (with bootloader zevero flashed before), 15 | and reboot m1284p system. 16 | 17 | maxxir 18 | 23.03.2019 10:27:11 19 | -------------------------------------------------------------------------------- /20_m1284p_BTLD_WIZNET_BLYNK_FTPD_FATFS_SDCARD/Application/Blynk/blynkDependency.h: -------------------------------------------------------------------------------- 1 | #ifndef _WIZNET_BLYNK_DEPENDENCY_H_ 2 | #define _WIZNET_BLYNK_DEPENDENCY_H_ 3 | 4 | #include 5 | #include "blynk.h" 6 | 7 | //////////////////////////////////////////////////////////////// 8 | typedef enum { // Pin mode; directions 9 | INPUT, 10 | OUTPUT, 11 | INPUT_PULLUP 12 | }pinmode_dir; 13 | 14 | typedef enum {false = 0, true = !false} Boolian; 15 | 16 | #define HIGH 1 17 | #define LOW 0 18 | //////////////////////////////////////////////////////////////// 19 | 20 | uint8_t digitalRead(uint8_t pin); 21 | void digitalWrite(uint8_t pin, uint8_t val); 22 | 23 | uint16_t analogRead(uint8_t pin); 24 | void analogWrite(uint8_t pin, uint8_t val); 25 | 26 | uint16_t virtualRead(uint8_t pin); 27 | void virtualWrite(uint8_t pin, uint16_t val); 28 | 29 | void pinMode(uint8_t pin, pinmode_dir dir); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /20_m1284p_BTLD_WIZNET_BLYNK_FTPD_FATFS_SDCARD/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | #include "../../globals.h" 10 | /* Loopback test debug message printout enable */ 11 | #define _LOOPBACK_DEBUG_ 12 | 13 | /* DATA_BUF_SIZE define for Loopback example */ 14 | #ifndef DATA_BUF_SIZE 15 | #define DATA_BUF_SIZE ETH_LOOPBACK_MAX_BUF_SIZE 16 | #endif 17 | 18 | /************************/ 19 | /* Select LOOPBACK_MODE */ 20 | /************************/ 21 | #define LOOPBACK_MAIN_NOBLOCK 0 22 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 23 | 24 | 25 | /* TCP server Loopback test example */ 26 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 27 | 28 | /* TCP client Loopback test example */ 29 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 30 | 31 | /* UDP Loopback test example */ 32 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /20_m1284p_BTLD_WIZNET_BLYNK_FTPD_FATFS_SDCARD/Blynk_application/Check out m1284 + W5500 app I've made.txt: -------------------------------------------------------------------------------- 1 | Hey, 2 | 3 | I've made m1284 + W5500 app. You are welcome to try it out! 4 | 5 | To start using it: 6 | 1. Download Blynk App: http://j.mp/blynk_Android or http://j.mp/blynk_iOS 7 | 2. Touch the QR-code icon and point the camera to the code below 8 | 3. Enjoy my app! 9 | -------------------------------------------------------------------------------- /20_m1284p_BTLD_WIZNET_BLYNK_FTPD_FATFS_SDCARD/Blynk_application/Screenshot_2019-03-18-13-37-20-278_cc.blynk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/20_m1284p_BTLD_WIZNET_BLYNK_FTPD_FATFS_SDCARD/Blynk_application/Screenshot_2019-03-18-13-37-20-278_cc.blynk.png -------------------------------------------------------------------------------- /20_m1284p_BTLD_WIZNET_BLYNK_FTPD_FATFS_SDCARD/Blynk_application/app1_m1284p_and_W5500_QR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/20_m1284p_BTLD_WIZNET_BLYNK_FTPD_FATFS_SDCARD/Blynk_application/app1_m1284p_and_W5500_QR.png -------------------------------------------------------------------------------- /20_m1284p_BTLD_WIZNET_BLYNK_FTPD_FATFS_SDCARD/Blynk_application/app2_m1284p_and_W5500_QR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/20_m1284p_BTLD_WIZNET_BLYNK_FTPD_FATFS_SDCARD/Blynk_application/app2_m1284p_and_W5500_QR.png -------------------------------------------------------------------------------- /20_m1284p_BTLD_WIZNET_BLYNK_FTPD_FATFS_SDCARD/ff/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _FF_INTEGER 6 | #define _FF_INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* This type MUST be 8 bit */ 16 | typedef unsigned char BYTE; 17 | 18 | /* These types MUST be 16 bit */ 19 | typedef short SHORT; 20 | typedef unsigned short WORD; 21 | typedef unsigned short WCHAR; 22 | 23 | /* These types MUST be 16 bit or 32 bit */ 24 | typedef int INT; 25 | typedef unsigned int UINT; 26 | 27 | /* These types MUST be 32 bit */ 28 | typedef long LONG; 29 | typedef unsigned long DWORD; 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /21_m1284p_WIZNET_TFTP_client_FATFS/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21_m1284p_WIZNET_TFTP_client_FATFS 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /21_m1284p_WIZNET_TFTP_client_FATFS/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | #include 10 | #include "../../globals.h" 11 | 12 | /* Loopback test debug message printout enable */ 13 | #define _LOOPBACK_DEBUG_ 14 | 15 | /* DATA_BUF_SIZE define for Loopback example */ 16 | #ifndef DATA_BUF_SIZE 17 | #define DATA_BUF_SIZE 2048 18 | #endif 19 | 20 | /************************/ 21 | /* Select LOOPBACK_MODE */ 22 | /************************/ 23 | #define LOOPBACK_MAIN_NOBLOCK 0 24 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 25 | 26 | 27 | /* TCP server Loopback test example */ 28 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 29 | 30 | /* TCP client Loopback test example */ 31 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 32 | 33 | /* UDP Loopback test example */ 34 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /21_m1284p_WIZNET_TFTP_client_FATFS/Internet/TFTP/netutil.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __NETUTIL_H__ 3 | #define __NETUTIL_H__ 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #include 10 | 11 | #define SYSTEM_LITTLE_ENDIAN 12 | 13 | int8_t* inet_ntoa(uint32_t addr); 14 | int8_t* inet_ntoa_pad(uint32_t addr); 15 | uint32_t inet_addr(uint8_t* addr); 16 | uint16_t swaps(uint16_t i); 17 | uint32_t swapl(uint32_t l); 18 | uint16_t htons(uint16_t hostshort); 19 | uint32_t htonl(uint32_t hostlong); 20 | uint32_t ntohs(uint16_t netshort); 21 | uint32_t ntohl(uint32_t netlong); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /21_m1284p_WIZNET_TFTP_client_FATFS/ff/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _FF_INTEGER 6 | #define _FF_INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* This type MUST be 8 bit */ 16 | typedef unsigned char BYTE; 17 | 18 | /* These types MUST be 16 bit */ 19 | typedef short SHORT; 20 | typedef unsigned short WORD; 21 | typedef unsigned short WCHAR; 22 | 23 | /* These types MUST be 16 bit or 32 bit */ 24 | typedef int INT; 25 | typedef unsigned int UINT; 26 | 27 | /* These types MUST be 32 bit */ 28 | typedef long LONG; 29 | typedef unsigned long DWORD; 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /21_m1284p_WIZNET_TFTP_client_FATFS/globals.c: -------------------------------------------------------------------------------- 1 | /* 2 | * globals.c 3 | * 4 | * Created on: 07 февр. 2019 г. 5 | * Author: maxx 6 | */ 7 | #include "globals.h" 8 | 9 | #ifdef IP_WORK 10 | //NIC metrics for WORK PC 11 | uint8_t DNS_2nd[4] = {192, 168, 0, 1}; // Secondary DNS server IP 12 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 13 | .ip = {192, 168, 0, 199}, // IP address 14 | .sn = {255, 255, 255, 0}, // Subnet mask 15 | .dns = {8,8,8,8}, // DNS address (google dns) 16 | .gw = {192, 168, 0, 1}, // Gateway address 17 | .dhcp = NETINFO_STATIC}; //Static IP configuration 18 | //PC TFTP server IP 19 | uint8_t tftp_destip[4] = {192, 168, 0, 100}; 20 | #else 21 | //NIC metrics for another PC (second IP configuration) 22 | uint8_t DNS_2nd[4] = {192, 168, 1, 1}; // Secondary DNS server IP 23 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 24 | .ip = {192, 168, 1, 199}, // IP address 25 | .sn = {255, 255, 255, 0}, // Subnet mask 26 | .dns = {8,8,8,8}, // DNS address (google dns) 27 | .gw = {192, 168, 1, 1}, // Gateway address 28 | .dhcp = NETINFO_STATIC}; //Static IP configuration 29 | //PC TFTP server IP 30 | uint8_t tftp_destip[4] = {192, 168, 1, 81}; 31 | #endif 32 | -------------------------------------------------------------------------------- /21_m1284p_WIZNET_TFTP_client_FATFS/spi.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "spi.h" 3 | #include "globals.h" 4 | 5 | /* 6 | * Initialize SPI bus. 7 | */ 8 | 9 | //~ // From working SPI ENC28J60 driver 10 | //~ #define ENC28J60_CONTROL_PORT PORTB 11 | //~ #define ENC28J60_CONTROL_DDR DDRB 12 | //~ 13 | //~ #define ENC28J60_CONTROL_CS PORTB6 14 | //~ #define ENC28J60_CONTROL_SO PORTB3 15 | //~ #define ENC28J60_CONTROL_SI PORTB2 16 | //~ #define ENC28J60_CONTROL_SCK PORTB1 17 | //~ #define ENC28J60_CONTROL_SS PORTB0 18 | //~ 19 | //~ // set CS to 0 = active 20 | //~ #define CSACTIVE ENC28J60_CONTROL_PORT&=~(1< 2 | 3 | 22_m1284p_WIZNET_MQTT 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | de.innot.avreclipse.core.avrnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /22_m1284p_WIZNET_MQTT/Application/loopback/loopback.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOOPBACK_H_ 2 | #define _LOOPBACK_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | #include 10 | #include "../../globals.h" 11 | 12 | /* Loopback test debug message printout enable */ 13 | #define _LOOPBACK_DEBUG_ 14 | 15 | /* DATA_BUF_SIZE define for Loopback example */ 16 | #ifndef LOOPBACK_DATA_BUF_SIZE 17 | #define LOOPBACK_DATA_BUF_SIZE 512 18 | #endif 19 | 20 | /************************/ 21 | /* Select LOOPBACK_MODE */ 22 | /************************/ 23 | #define LOOPBACK_MAIN_NOBLOCK 0 24 | #define LOOPBACK_MODE LOOPBACK_MAIN_NOBLOCK 25 | 26 | 27 | /* TCP server Loopback test example */ 28 | int32_t loopback_tcps(uint8_t sn, uint8_t* buf, uint16_t port); 29 | 30 | /* TCP client Loopback test example */ 31 | int32_t loopback_tcpc(uint8_t sn, uint8_t* buf, uint8_t* destip, uint16_t destport); 32 | 33 | /* UDP Loopback test example */ 34 | int32_t loopback_udps(uint8_t sn, uint8_t* buf, uint16_t port); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /22_m1284p_WIZNET_MQTT/Internet/MQTT/mqtt_interface.h: -------------------------------------------------------------------------------- 1 | #ifndef __MQTT_INTERFACE_H_ 2 | #define __MQTT_INTERFACE_H_ 3 | 4 | #include 5 | #include "../../globals.h" 6 | 7 | typedef struct Timer Timer; 8 | 9 | struct Timer 10 | { 11 | uint32_t systick_period; 12 | uint32_t end_time; 13 | }; 14 | 15 | typedef struct Network Network; 16 | 17 | struct Network 18 | { 19 | int32_t my_socket; 20 | int32_t (*mqttread) (Network*, uint8_t*, int32_t, int32_t); 21 | int32_t (*mqttwrite) (Network*, uint8_t*, int32_t, int32_t); 22 | void (*disconnect) (Network*); 23 | }; 24 | 25 | void InitTimer(Timer*); 26 | /* 27 | void MilliTimer_Handler(void); 28 | */ 29 | 30 | int8_t expired(Timer*); 31 | void countdown_ms(Timer*, uint32_t); 32 | void countdown(Timer*, uint32_t); 33 | int32_t left_ms(Timer*); 34 | 35 | int32_t w5500_read(Network*, uint8_t*, int32_t, int32_t); 36 | int32_t w5500_write(Network*, uint8_t*, int32_t, int32_t); 37 | void w5500_disconnect(Network*); 38 | void NewNetwork(Network*); 39 | 40 | int32_t ConnectNetwork(Network*, uint8_t*, uint16_t); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /22_m1284p_WIZNET_MQTT/globals.c: -------------------------------------------------------------------------------- 1 | /* 2 | * globals.c 3 | * 4 | * Created on: 07 февр. 2019 г. 5 | * Author: maxx 6 | */ 7 | #include "globals.h" 8 | 9 | #ifdef IP_WORK 10 | //NIC metrics for WORK PC 11 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 12 | .ip = {192, 168, 0, 199}, // IP address 13 | .sn = {255, 255, 255, 0}, // Subnet mask 14 | .dns = {8,8,8,8}, // DNS address (google dns) 15 | .gw = {192, 168, 0, 1}, // Gateway address 16 | .dhcp = NETINFO_STATIC}; //Static IP configuration 17 | uint8_t MQTT_targetIP[4] = {192, 168, 0, 100}; // IP брокера MQTT 18 | 19 | #else 20 | //NIC metrics for another PC (second IP configuration) 21 | wiz_NetInfo netInfo = { .mac = {0x00, 0x08, 0xdc, 0xab, 0xcd, 0xef}, // Mac address 22 | .ip = {192, 168, 1, 199}, // IP address 23 | .sn = {255, 255, 255, 0}, // Subnet mask 24 | .dns = {8,8,8,8}, // DNS address (google dns) 25 | .gw = {192, 168, 1, 1}, // Gateway address 26 | .dhcp = NETINFO_STATIC}; //Static IP configuration 27 | uint8_t MQTT_targetIP[4] = {192, 168, 1, 81}; // IP брокера MQTT 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /22_m1284p_WIZNET_MQTT/spi.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "spi.h" 3 | #include "globals.h" 4 | 5 | /* 6 | * Initialize SPI bus. 7 | */ 8 | 9 | //~ // From working SPI ENC28J60 driver 10 | //~ #define ENC28J60_CONTROL_PORT PORTB 11 | //~ #define ENC28J60_CONTROL_DDR DDRB 12 | //~ 13 | //~ #define ENC28J60_CONTROL_CS PORTB6 14 | //~ #define ENC28J60_CONTROL_SO PORTB3 15 | //~ #define ENC28J60_CONTROL_SI PORTB2 16 | //~ #define ENC28J60_CONTROL_SCK PORTB1 17 | //~ #define ENC28J60_CONTROL_SS PORTB0 18 | //~ 19 | //~ // set CS to 0 = active 20 | //~ #define CSACTIVE ENC28J60_CONTROL_PORT&=~(1< 15 | 16 | #### This is my own custom board looks like: 17 | 18 | m1284p 3D top 19 | 20 | #### Pinmap board (Sanguino notation): 21 | 22 | m1284p pinmap 23 | 24 | ## Author 25 | * **Ibragimov Maksim aka maxxir** 26 | 08/04/2019 27 | -------------------------------------------------------------------------------- /KiCad_M644_breakout_v1.2d/fp-lib-table: -------------------------------------------------------------------------------- 1 | (fp_lib_table 2 | (lib (name M644_breakout_v1.2d)(type KiCad)(uri "$(KIPRJMOD)/M644_breakout_v1.2d.pretty")(options "")(descr "")) 3 | ) 4 | -------------------------------------------------------------------------------- /KiCad_M644_breakout_v1.2d/sym-lib-table: -------------------------------------------------------------------------------- 1 | (sym_lib_table 2 | (lib (name M644_breakout_v1.2d-eagle-import)(type Legacy)(uri ${KIPRJMOD}/M644_breakout_v1.2d-eagle-import.lib)(options "")(descr "")) 3 | ) 4 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m1284p_make/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.eps 3 | *.bak 4 | *.a 5 | *.bin 6 | *.elf 7 | *.hex 8 | *.lst 9 | *.map 10 | /nbproject -------------------------------------------------------------------------------- /bootloader_zevero_sd_m1284p_make/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | bootloader_zevero_sd_m1284p_make 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 24 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 25 | de.innot.avreclipse.core.avrnature 26 | 27 | 28 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m1284p_make/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, zevero 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m1284p_make/m1284p_zevero_sd_m1284p_fuses.txt: -------------------------------------------------------------------------------- 1 | 3) Working FUSE for M1284 (with bootloader Zevero-SD) 2 | I.e - Arduino Bootloader to Flash from SD Card: https://github.com/zevero/avr_boot 3 | 4 | PS. SET FUSES: 5 | ============== 6 | LOW = 0xFF 7 | HIGH = 0xDA 8 | EXTD = 0xFD 9 | ======================================== 10 | It means: 11 | Ext. XTAL High FREQ START-UP 16K CK + 65ms 12 | JTAG DISABLED 13 | BROWN-OUT 2.7V ON 14 | BOOT-LOADER ENABLED 15 | BOOT Flash Section Size = 2048 words; Boot Start address = 0xF800 16 | ========================================= 17 | 18 | AVRDUDE arguments: 19 | -U lfuse:w:0xff:m -U hfuse:w:0xda:m -U efuse:w:0xfd:m 20 | 21 | Full commands to write from console: 22 | avrdude -Pusb -cavrispmkii -patmega1284p -B5 -U lfuse:w:0xff:m -U hfuse:w:0xda:m -U efuse:w:0xfd:m 23 | 24 | 25 | Detection avrdude CPU: B5 (5us bit clock period for programmer SPI) - VERY IMPORTANT (1Mhz CPU M1284p FREQ DEFAULT) 26 | avrdude -Pusb -cavrispmkii -patmega1284p -B5 27 | 28 | Check m1284p fuse here: 29 | http://eleccelerator.com/fusecalc/fusecalc.php?chip=atmega1284p 30 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m1284p_make/pff/doc/css_p.css: -------------------------------------------------------------------------------- 1 | body {margin: 8px; background-color: #ffecf0; font-color: black; font-family: serif; line-height: 133%; max-width: 1024px;} 2 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m1284p_make/pff/doc/img/layers3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/bootloader_zevero_sd_m1284p_make/pff/doc/img/layers3.png -------------------------------------------------------------------------------- /bootloader_zevero_sd_m1284p_make/pff/doc/img/rwtest3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/bootloader_zevero_sd_m1284p_make/pff/doc/img/rwtest3.png -------------------------------------------------------------------------------- /bootloader_zevero_sd_m1284p_make/pff/doc/pf/filename.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Petit FatFs - Path Names 10 | 11 | 12 | 13 | 14 |
15 |

Format of the path names

16 |

The path name format on the Petit FatFs module is similer to MS-DOS as follows.

17 |
"[/]directory/file"
18 |

The Petit FatFs module supports only 8.3 format file name. The sub-directories are separated with a /. The path name is terminated with a nul character, control character or white space. Heading spaces are ignored and skipped. When _USE_LCC == 1, lower case characters are allowed for the path name.

19 |

The Petit FatFs module does not have a concept of current directory like OS oriented file system. All objects on the volume are always specified in full path name following from the root directory. Heading separator is ignored and it can be exist or omitted.

20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m1284p_make/pff/doc/pf/sdir.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Petit FatFs - DIR 10 | 11 | 12 | 13 | 14 |
15 |

DIR

16 |

The DIR structure is used for the work area to read a directory by pf_oepndir, pf_readdir function.

17 |
18 | typedef struct {
19 |     WORD    index;     /* Current read/write index number */
20 |     BYTE*   fn;        /* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */
21 |     CLUST   sclust;    /* Table start cluster (0:Static table) */
22 |     CLUST   clust;     /* Current cluster */
23 |     DWORD   sect;      /* Current sector */
24 | } DIR;
25 | 
26 |
27 | 28 |

Return

29 | 30 | 31 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m1284p_make/pff/src/diskio.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------- 2 | / PFF - Low level disk interface modlue include file (C)ChaN, 2014 3 | /-----------------------------------------------------------------------*/ 4 | 5 | #ifndef _DISKIO_DEFINED 6 | #define _DISKIO_DEFINED 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | #include "integer.h" 13 | 14 | 15 | /* Status of Disk Functions */ 16 | typedef BYTE DSTATUS; 17 | 18 | 19 | /* Results of Disk Functions */ 20 | typedef enum { 21 | RES_OK = 0, /* 0: Function succeeded */ 22 | RES_ERROR, /* 1: Disk error */ 23 | RES_NOTRDY, /* 2: Not ready */ 24 | RES_PARERR /* 3: Invalid parameter */ 25 | } DRESULT; 26 | 27 | 28 | /*---------------------------------------*/ 29 | /* Prototypes for disk control functions */ 30 | 31 | DSTATUS disk_initialize (void); 32 | DRESULT disk_readp (BYTE* buff, DWORD sector, UINT offser, UINT count); 33 | DRESULT disk_writep (const BYTE* buff, DWORD sc); 34 | 35 | #define STA_NOINIT 0x01 /* Drive not initialized */ 36 | #define STA_NODISK 0x02 /* No medium in the drive */ 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif /* _DISKIO_DEFINED */ 43 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m1284p_make/pff/src/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _FF_INTEGER 6 | #define _FF_INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* This type MUST be 8 bit */ 16 | typedef unsigned char BYTE; 17 | 18 | /* These types MUST be 16 bit */ 19 | typedef short SHORT; 20 | typedef unsigned short WORD; 21 | typedef unsigned short WCHAR; 22 | 23 | /* These types MUST be 16 bit or 32 bit */ 24 | typedef int INT; 25 | typedef unsigned int UINT; 26 | 27 | /* These types MUST be 32 bit */ 28 | typedef long LONG; 29 | typedef unsigned long DWORD; 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m1284p_make/uart/uart.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | /* 5 | ** This is a simple set of UART routines for debug purposes 6 | ** It's Tx only and the baud rate is fixed (see UART_init) 7 | */ 8 | 9 | // Just enable the UART Tx and set baud rate for 38400 on 3.6864MHz (STK500) 10 | void UART_init(void); 11 | // The classic Tx one character routine 12 | void UART_put(uint8_t c); 13 | // classic Tx a C-string routine (string in PROGMEM) 14 | void UART_puts(const char * str); 15 | // this expect the first parameter to be a string in dlash (that is PSTR()) 16 | // and then the second to be a value to print out in hex. typically used in 17 | // the form UART_putsP(PSTR("SecPerClus = "), SecPerClus) 18 | void UART_putsP(const char * str, uint16_t n); 19 | // Just outputs "\r\n" 20 | void UART_newline(void); 21 | // used in printing a 2 digit hex number, outputs one of the two nibbles 22 | // the parameter is expected to be 0..F 23 | void UART_putnibble(uint8_t c); 24 | // print both nibbles of an 8 bit hex number 25 | void UART_puthex(uint8_t c); 26 | // print both bytes of a 16 bit hex number 27 | void UART_puthex16(uint16_t n); 28 | // print both bytes of a 32 bit hex number 29 | void UART_puthex32(uint32_t n); 30 | // dump the 512 bytes at the given address in the form: 31 | // CD BF 10 E0 A0 E6 B0 E0 E4 E5 F0 E0 02 C0 05 90 Ϳ ������� � � 32 | void UART_dumpsector(uint8_t * Buff); 33 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m644p_make/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.eps 3 | *.bak 4 | *.a 5 | *.bin 6 | *.elf 7 | *.hex 8 | *.lst 9 | *.map 10 | /nbproject -------------------------------------------------------------------------------- /bootloader_zevero_sd_m644p_make/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | bootloader_zevero_sd_m644p_make 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 24 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 25 | de.innot.avreclipse.core.avrnature 26 | 27 | 28 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m644p_make/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, zevero 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m644p_make/m644p_zevero_sd_m644p_fuses.txt: -------------------------------------------------------------------------------- 1 | 3) Working FUSE for M644p (with bootloader Zevero-SD) 2 | I.e - Arduino Bootloader to Flash from SD Card: https://github.com/zevero/avr_boot 3 | 4 | PS. SET FUSES: 5 | ============== 6 | LOW = 0xFF 7 | HIGH = 0xDA 8 | EXTD = 0xFD 9 | ======================================== 10 | It means: 11 | Ext. XTAL High FREQ START-UP 16K CK + 65ms 12 | JTAG DISABLED 13 | BROWN-OUT 2.7V ON 14 | BOOT-LOADER ENABLED 15 | BOOT Flash Section Size = 2048 words (4096 bytes); Boot Start address = 0x7800 words (0xF000 bytes) 16 | ========================================= 17 | 18 | AVRDUDE arguments: 19 | -U lfuse:w:0xff:m -U hfuse:w:0xda:m -U efuse:w:0xfd:m 20 | 21 | Full commands to write from console: 22 | avrdude -Pusb -cavrispmkii -patmega644p -B5 -U lfuse:w:0xff:m -U hfuse:w:0xda:m -U efuse:w:0xfd:m 23 | 24 | 25 | Detection avrdude CPU: B5 (5us bit clock period for programmer SPI) - VERY IMPORTANT (1Mhz CPU M1284p/M644p FREQ DEFAULT) 26 | avrdude -Pusb -cavrispmkii -patmega644p -B5 27 | 28 | Check m644p fuse here: 29 | http://eleccelerator.com/fusecalc/fusecalc.php?chip=atmega644p 30 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m644p_make/pff/doc/css_p.css: -------------------------------------------------------------------------------- 1 | body {margin: 8px; background-color: #ffecf0; font-color: black; font-family: serif; line-height: 133%; max-width: 1024px;} 2 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m644p_make/pff/doc/img/layers3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/bootloader_zevero_sd_m644p_make/pff/doc/img/layers3.png -------------------------------------------------------------------------------- /bootloader_zevero_sd_m644p_make/pff/doc/img/rwtest3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maxxir/m1284p_wiz5500/1dfac62bb25d987d0865a2dfa95e43f67f14cb95/bootloader_zevero_sd_m644p_make/pff/doc/img/rwtest3.png -------------------------------------------------------------------------------- /bootloader_zevero_sd_m644p_make/pff/doc/pf/filename.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Petit FatFs - Path Names 10 | 11 | 12 | 13 | 14 |
15 |

Format of the path names

16 |

The path name format on the Petit FatFs module is similer to MS-DOS as follows.

17 |
"[/]directory/file"
18 |

The Petit FatFs module supports only 8.3 format file name. The sub-directories are separated with a /. The path name is terminated with a nul character, control character or white space. Heading spaces are ignored and skipped. When _USE_LCC == 1, lower case characters are allowed for the path name.

19 |

The Petit FatFs module does not have a concept of current directory like OS oriented file system. All objects on the volume are always specified in full path name following from the root directory. Heading separator is ignored and it can be exist or omitted.

20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m644p_make/pff/doc/pf/sdir.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Petit FatFs - DIR 10 | 11 | 12 | 13 | 14 |
15 |

DIR

16 |

The DIR structure is used for the work area to read a directory by pf_oepndir, pf_readdir function.

17 |
18 | typedef struct {
19 |     WORD    index;     /* Current read/write index number */
20 |     BYTE*   fn;        /* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */
21 |     CLUST   sclust;    /* Table start cluster (0:Static table) */
22 |     CLUST   clust;     /* Current cluster */
23 |     DWORD   sect;      /* Current sector */
24 | } DIR;
25 | 
26 |
27 | 28 |

Return

29 | 30 | 31 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m644p_make/pff/src/diskio.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------- 2 | / PFF - Low level disk interface modlue include file (C)ChaN, 2014 3 | /-----------------------------------------------------------------------*/ 4 | 5 | #ifndef _DISKIO_DEFINED 6 | #define _DISKIO_DEFINED 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | #include "integer.h" 13 | 14 | 15 | /* Status of Disk Functions */ 16 | typedef BYTE DSTATUS; 17 | 18 | 19 | /* Results of Disk Functions */ 20 | typedef enum { 21 | RES_OK = 0, /* 0: Function succeeded */ 22 | RES_ERROR, /* 1: Disk error */ 23 | RES_NOTRDY, /* 2: Not ready */ 24 | RES_PARERR /* 3: Invalid parameter */ 25 | } DRESULT; 26 | 27 | 28 | /*---------------------------------------*/ 29 | /* Prototypes for disk control functions */ 30 | 31 | DSTATUS disk_initialize (void); 32 | DRESULT disk_readp (BYTE* buff, DWORD sector, UINT offser, UINT count); 33 | DRESULT disk_writep (const BYTE* buff, DWORD sc); 34 | 35 | #define STA_NOINIT 0x01 /* Drive not initialized */ 36 | #define STA_NODISK 0x02 /* No medium in the drive */ 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif /* _DISKIO_DEFINED */ 43 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m644p_make/pff/src/integer.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------*/ 2 | /* Integer type definitions for FatFs module */ 3 | /*-------------------------------------------*/ 4 | 5 | #ifndef _FF_INTEGER 6 | #define _FF_INTEGER 7 | 8 | #ifdef _WIN32 /* FatFs development platform */ 9 | 10 | #include 11 | #include 12 | 13 | #else /* Embedded platform */ 14 | 15 | /* This type MUST be 8 bit */ 16 | typedef unsigned char BYTE; 17 | 18 | /* These types MUST be 16 bit */ 19 | typedef short SHORT; 20 | typedef unsigned short WORD; 21 | typedef unsigned short WCHAR; 22 | 23 | /* These types MUST be 16 bit or 32 bit */ 24 | typedef int INT; 25 | typedef unsigned int UINT; 26 | 27 | /* These types MUST be 32 bit */ 28 | typedef long LONG; 29 | typedef unsigned long DWORD; 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /bootloader_zevero_sd_m644p_make/uart/uart.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | /* 5 | ** This is a simple set of UART routines for debug purposes 6 | ** It's Tx only and the baud rate is fixed (see UART_init) 7 | */ 8 | 9 | // Just enable the UART Tx and set baud rate for 38400 on 3.6864MHz (STK500) 10 | void UART_init(void); 11 | // The classic Tx one character routine 12 | void UART_put(uint8_t c); 13 | // classic Tx a C-string routine (string in PROGMEM) 14 | void UART_puts(const char * str); 15 | // this expect the first parameter to be a string in dlash (that is PSTR()) 16 | // and then the second to be a value to print out in hex. typically used in 17 | // the form UART_putsP(PSTR("SecPerClus = "), SecPerClus) 18 | void UART_putsP(const char * str, uint16_t n); 19 | // Just outputs "\r\n" 20 | void UART_newline(void); 21 | // used in printing a 2 digit hex number, outputs one of the two nibbles 22 | // the parameter is expected to be 0..F 23 | void UART_putnibble(uint8_t c); 24 | // print both nibbles of an 8 bit hex number 25 | void UART_puthex(uint8_t c); 26 | // print both bytes of a 16 bit hex number 27 | void UART_puthex16(uint16_t n); 28 | // print both bytes of a 32 bit hex number 29 | void UART_puthex32(uint32_t n); 30 | // dump the 512 bytes at the given address in the form: 31 | // CD BF 10 E0 A0 E6 B0 E0 E4 E5 F0 E0 02 C0 05 90 Ϳ ������� � � 32 | void UART_dumpsector(uint8_t * Buff); 33 | --------------------------------------------------------------------------------