Initial cut of the open ath9k htc firmware.
[open-ath9k-htc-firmware.git] / target_firmware / magpie_fw_dev / target / init / init.h
1 // @TODO: Should define the memory region later~
2 #define ALLOCRAM_START       ( ((unsigned int)&_fw_image_end) + 4)
3 #define ALLOCRAM_SIZE        ( SYS_RAM_SZIE - ( ALLOCRAM_START - SYS_D_RAM_REGION_0_BASE) - SYS_D_RAM_STACK_SIZE)
4
5 #include "regdump.h"
6
7 #define SBOOT_PATTERN 0x5342
8 #define IS_FLASHBOOT() (((DEBUG_SYSTEM_STATE&~(0x0000ffff))>>16==SBOOT_PATTERN))
9
10 // patch for exception handle
11 void AR6002_fatal_exception_handler_patch(CPU_exception_frame_t *exc_frame);
12 void exception_reset(struct register_dump_s *dump);
13
14 void (* _assfail_ori)(struct register_dump_s *);
15 void HTCMsgRecvHandler_patch(adf_nbuf_t hdr_buf, adf_nbuf_t buffer, void *context);
16 void HTCControlSvcProcessMsg_patch(HTC_ENDPOINT_ID EndpointID, adf_nbuf_t hdr_buf,
17                                    adf_nbuf_t pBuffers, void *arg);
18
19 #if defined(PROJECT_K2)
20
21 #if MOVE_PRINT_TO_RAM
22 extern int fw_cmnos_printf(const char *fmt, ...);
23
24 extern uint16_t u8UsbConfigValue;
25 extern uint16_t u8UsbInterfaceValue;
26 extern uint16_t u8UsbInterfaceAlternateSetting;
27 #endif
28
29 extern void _fw_usb_fw_task(void);
30 extern void _fw_usb_reset_fifo(void);
31
32 #endif
33
34
35 void fatal_exception_func();
36 void init_mem();
37 void wlan_task();