/* * globals.h * * Created on: 29 нояб. 2018 г. * Author: maxx */ #ifndef GLOBALS_H_ #define GLOBALS_H_ #include #include #include #include "avr/wdt.h" // WatchDog //******************************* Fat FS declare related: BEGIN #include "string.h" #include "ff.h" #include "diskio.h" #include "integer.h" //#include "Internet/httpServer_avr/httpParser.h" FATFS Fatfs; //File system object for each logical drive. >= 2 //static FIL File; //File object. there are _FS_LOCK file objects available, >= 2 //******************************* Fat FS declare related: END //Should not use here //#define HTTPD_MAX_BUF_SIZE 2048 //For Mega1284p(16kb RAM)/Mega2560(8kb RAM) //#define HTTPD_MAX_BUF_SIZE MAX_URI_SIZE+10 //For Mega644p(4kb RAM)/Mega128(4kb RAM) (ie. 512+10=522 bytes look at httpParser.h <_st_http_request> definition) //FTP Server IP (look at ) extern uint8_t FTP_SRV_destip[4]; //#define _MAX_SS_FTP 1500 //FTP buffer 2048 bytes - For Mega1284p(16kb RAM)/Mega2560(8kb RAM) - actually wasteful RAM resources #define _MAX_SS_FTP 512 //FTP buffer 512 bytes - For Mega644p(4kb RAM)/Mega128(4kb RAM) - this is enough #define PRINTF_EN 1 #if PRINTF_EN #define PRINTF(FORMAT,args...) printf_P(PSTR(FORMAT),##args) #else #define PRINTF(...) #endif //#define IP_WORK //SPI CLOCK 4 or 8Mhz #define SPI_4_MHZ //#define SPI_8_MHZ extern unsigned long millis(void); extern int freeRam (void); extern char uart0_receive(void); extern void uart0_rx_flash(void); extern void ls_dir(char* path); //M644P/M1284p Users LEDS: //LED1/PORTC.4- m644p/m1284p maxxir #define led1_conf() DDRC |= (1<