HP85 GPIB Disk Emulator  1.0
HP85GPIBDiskEmulator
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
user_config.h
Go to the documentation of this file.
1 
13 #ifndef _USER_CONFIG_H_
14 #define _USER_CONFIG_H_
15 
16 #define AVR 1
17 #define MEMSPACE
18 
19 #define SYSTEM_TASK_HZ 1000L
20 #define HAVE_HIRES_TIMER 1
21 
22 // FATFS
23 #ifdef AVR
24 
25 #ifndef MMC_SLOW
26 #define MMC_SLOW (500000UL)
27 #endif
28 
29 #ifndef MMC_FAST
30 #define MMC_FAST (5000000UL)
31 #endif
32 #endif // AVR
33 
34 #define NO_SCANF
35 
36 #if !defined(F_CPU)
37 #error F_CPU undefined
38 #endif
39 
40 #include <hardware/cpu.h>
41 
44 #include <stdlib.h>
45 #include <string.h>
46 #include <inttypes.h>
47 #include <stdint.h>
48 #include <stddef.h>
49 #include <stdarg.h>
50 #include <ctype.h>
51 
52 #include <avr/pgmspace.h>
53 #include <avr/portpins.h>
54 #include <avr/io.h>
55 #include <assert.h>
56 #include <avr/interrupt.h>
57 
58 #include "hardware/gpio-1284p.h"
59 #include "hardware/hal.h"
60 
61 #include "hardware/bits.h"
62 #include "hardware/delay.h"
63 #include "hardware/ram.h"
64 
65 #include <util/twi.h>
66 
67 #include "lib/parsing.h"
68 #include "lib/stringsup.h"
69 #include "printf/mathio.h"
70 
71 #define printf(format, args...) printf_P(PSTR(format), ##args)
72 #define snprintf(s, size, format, args...) snprintf_P(s, size, PSTR(format), ##args)
73 #define sprintf(s, format, args...) sprintf_P(s, PSTR(format), ##args)
74 
75 void copyright( void );
76 
77 #include "lib/time.h"
78 #include "lib/timer.h"
79 #include "lib/queue.h"
80 #include "hardware/rtc.h"
81 
82 #include "fatfs.sup/fatfs.h"
83 
84 #ifndef NULL
85 #define NULL ((void *) 0)
86 #endif
87 
88 typedef enum { false, true }
89 bool;
90 
91 #ifndef _SIZE_T
92 #define _SIZE_T
93 typedef unsigned long int size_t;
94 #endif
95 
96 #define Mem_Clear(a) memset(a, 0, sizeof(a))
97 #define Mem_Set(a,b) memset(a, (int) b, sizeof(a))
98 
99 #define UART_DEVICE_CNT 1
101 #include "ram.h"
102 #include "rs232.h"
103 #include "spi.h"
104 #include "rtc.h"
105 // #include "TWI_AVR8.h"
106 
107 #ifdef I2C_SUPPORT
108 #include "i2c.h"
109 #endif
110 
111 #ifdef LCD_SUPPORT
112 // #include "LCD.h"
113 // #include "display/lcd_printf.h"
114 #endif
115 
116 #include "posix/posix.h"
117 
118 #include "gpib/debug.h"
119 
120 #ifdef PORTIO_TESTS
121 #include "portio.h"
122 #endif
123 
124 // sys.c defines alternative safe functions
125 #ifndef free
126 #define free(p) safefree(p)
127 #endif
128 #ifndef calloc
129 #define calloc(n,s) safecalloc(n,s)
130 #endif
131 #ifndef malloc
132 #define malloc(s) safemalloc(s)
133 #endif
134 #endif
fatfs.h
hal.h
spi.h
SPI Driver AVR8.
rs232.h
RS232 Driver AVR8.
stringsup.h
Various string and character functions.
gpio-1284p.h
parsing.h
Various string and character functions.
bits.h
Bit manipulation macros.
ram.h
Memory Utilities and safe free for AVR.
timer.h
timer functions
time.h
Common Linux/POSIX time functions.
copyright
void copyright(void)
cpu.h
Common CPU specific includes for ATEMAGE1284p.
queue.h
Ring buffer code.
delay.h
Extended delay routines for AVR.
size_t
unsigned long int size_t
Definition: user_config.h:93
bool
bool
Definition: user_config.h:88
portio.h
rtc.h
DS1307 RTC Driver AVR8.
mathio.h
Math IO functions, and verious conversion code with floating point support.
posix.h
POSIX wrapper for FatFS.
i2c.h
debug.h