mirror of
https://github.com/mist-devel/mist-firmware.git
synced 2026-04-17 00:15:25 +00:00
gcc 5.2.0 warnings fix
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "cdc_enumerate.h"
|
||||
#include "cdc_control.h"
|
||||
#include "hardware.h"
|
||||
|
||||
9
config.c
9
config.c
@@ -1,9 +1,12 @@
|
||||
// config.c
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "errors.h"
|
||||
#include "hardware.h"
|
||||
#include "mmc.h"
|
||||
#include "boot.h"
|
||||
#include "fat.h"
|
||||
#include "osd.h"
|
||||
#include "fpga.h"
|
||||
@@ -12,10 +15,8 @@
|
||||
#include "firmware.h"
|
||||
#include "menu.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "user_io.h"
|
||||
#include "usb/usb.h"
|
||||
|
||||
configTYPE config;
|
||||
fileTYPE file;
|
||||
|
||||
2
fat.c
2
fat.c
@@ -39,11 +39,11 @@ JB:
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
//#include <ctype.h>
|
||||
#include "mmc.h"
|
||||
#include "fat.h"
|
||||
#include "swap.h"
|
||||
#include "usb.h"
|
||||
#include "fpga.h"
|
||||
|
||||
int tolower(int c);
|
||||
|
||||
|
||||
@@ -25,10 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "fat.h"
|
||||
#include "firmware.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define __noinline
|
||||
#endif
|
||||
|
||||
/* polynomial 0xEDB88320 */
|
||||
const unsigned long crc32_table[256] =
|
||||
{
|
||||
@@ -163,7 +159,7 @@ char *GetFirmwareVersion(fileTYPE *file, char *name) {
|
||||
#define GCC_OPTIMZES_TOO_MUCH
|
||||
|
||||
#pragma section_code_init
|
||||
RAMFUNC __noinline void WriteFirmware(fileTYPE *file, char *name)
|
||||
RAMFUNC void WriteFirmware(fileTYPE *file, char *name)
|
||||
{
|
||||
unsigned long read_size;
|
||||
unsigned long i;
|
||||
|
||||
4
fpga.c
4
fpga.c
@@ -37,8 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "config.h"
|
||||
#include "boot.h"
|
||||
#include "osd.h"
|
||||
|
||||
#include "fpga.h"
|
||||
#include "tos.h"
|
||||
|
||||
#define CMD_HDRID 0xAACA
|
||||
|
||||
@@ -614,7 +614,7 @@ char BootPrint(const char *text)
|
||||
{
|
||||
if(!minimig_v1()) {
|
||||
iprintf("%s\n", text);
|
||||
return; // TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned char c1, c2, c3, c4;
|
||||
|
||||
1
fpga.h
1
fpga.h
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "rafile.h"
|
||||
|
||||
void fpga_init(char *name);
|
||||
unsigned char ConfigureFpga(char *) RAMFUNC;
|
||||
void SendFile(RAFile *file);
|
||||
void SendFileEncrypted(RAFile *file,unsigned char *key,int keysize);
|
||||
|
||||
@@ -17,11 +17,13 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include "AT91SAM7S256.h"
|
||||
#include "stdio.h"
|
||||
#include "hardware.h"
|
||||
#include "user_io.h"
|
||||
#include "xmodem.h"
|
||||
#include "ikbd.h"
|
||||
|
||||
uint8_t rstval = 0;
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
|
||||
#define VBL AT91C_PIO_PA7
|
||||
|
||||
char mmc_inserted(void);
|
||||
void USART_Init(unsigned long baudrate);
|
||||
void USART_Write(unsigned char c);
|
||||
unsigned char USART_Read(void);
|
||||
@@ -81,7 +82,12 @@ void DisableIO(void);
|
||||
|
||||
void hexdump(void *data, uint16_t size, uint16_t offset);
|
||||
#define DEBUG_FUNC_IN()
|
||||
|
||||
#define DEBUG_FUNC_OUT()
|
||||
|
||||
#ifdef __GNUC__
|
||||
void __init_hardware(void);
|
||||
#endif
|
||||
|
||||
// minimig reset stuff
|
||||
#define SPI_RST_USR 0x1
|
||||
#define SPI_RST_CPU 0x2
|
||||
|
||||
2
main.c
2
main.c
@@ -56,7 +56,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "usb.h"
|
||||
#include "debug.h"
|
||||
#include "mist_cfg.h"
|
||||
|
||||
#include "cdc_enumerate.h"
|
||||
|
||||
const char version[] = {"$VER:ATH" VDATE};
|
||||
|
||||
|
||||
1
menu.h
1
menu.h
@@ -114,7 +114,6 @@ void InsertFloppy(adfTYPE *drive);
|
||||
void HandleUI(void);
|
||||
void PrintDirectory(void);
|
||||
void ScrollLongName(void);
|
||||
void ErrorMessage(const char *message, unsigned char code);
|
||||
void InfoMessage(char *message);
|
||||
void ShowSplash();
|
||||
void HideSplash();
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "mist_cfg.h"
|
||||
#include "user_io.h"
|
||||
#include "usb/usb.h"
|
||||
#include "usb/hid.h"
|
||||
|
||||
//// mist_ini_parse() ////
|
||||
void mist_ini_parse()
|
||||
|
||||
4
spi.h
4
spi.h
@@ -39,6 +39,7 @@ RAMFUNC void spi_block_read(char *addr);
|
||||
RAMFUNC void spi_read(char *addr, uint16_t len);
|
||||
void spi_block_write(char *addr);
|
||||
void spi_write(char *addr, uint16_t len);
|
||||
void spi_block(unsigned short num);
|
||||
|
||||
/* OSD related SPI functions */
|
||||
void spi_osd_cmd_cont(unsigned char cmd);
|
||||
@@ -54,7 +55,8 @@ void spi_osd_cmd32le(unsigned char cmd, unsigned long parm);
|
||||
void spi_uio_cmd_cont(unsigned char cmd);
|
||||
void spi_uio_cmd(unsigned char cmd);
|
||||
void spi_uio_cmd8(unsigned char cmd, unsigned char parm);
|
||||
|
||||
void spi_uio_cmd8_cont(unsigned char cmd, unsigned char parm);
|
||||
|
||||
/* spi functions for max3421 */
|
||||
#define spi_max_start() { *AT91C_PIOA_CODR = USB_SEL; }
|
||||
#define spi_max_end() { spi_wait4xfer_end(); *AT91C_PIOA_SODR = USB_SEL; }
|
||||
|
||||
3
tos.c
3
tos.c
@@ -8,6 +8,9 @@
|
||||
#include "fpga.h"
|
||||
#include "cdc_control.h"
|
||||
#include "debug.h"
|
||||
#include "user_io.h"
|
||||
#include "mmc.h"
|
||||
#include "ikbd.h"
|
||||
|
||||
#define CONFIG_FILENAME "MIST CFG"
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "max3421e.h"
|
||||
#include "hardware.h"
|
||||
#include "tos.h"
|
||||
#include "user_io.h"
|
||||
|
||||
#define MAX_FRAMELEN 1536
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "string.h"
|
||||
#include "usb.h"
|
||||
#include "max3421e.h"
|
||||
#include "timer.h"
|
||||
@@ -163,7 +164,7 @@ void joystick_key_map(char *s) {
|
||||
// fill sequentially the available mapping slots, stopping at first empty one
|
||||
if(!joy_key_map[i].mask) {
|
||||
joy_key_map[i].modifier = 0;
|
||||
for(j=0;j<7;j++)
|
||||
for(j=0;j<6;j++)
|
||||
joy_key_map[i].keys[j] = 0;
|
||||
count = 0;
|
||||
token = strtok (s, ",");
|
||||
|
||||
@@ -109,6 +109,6 @@ void virtual_joystick_remap(char *);
|
||||
void joystick_key_map_init(void);
|
||||
void joystick_key_map(char *);
|
||||
|
||||
|
||||
void joy_key_map_init(void);
|
||||
|
||||
#endif // HID_H
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
#include "pl2303.h"
|
||||
#include "max3421e.h"
|
||||
#include "user_io.h"
|
||||
#include "timer.h"
|
||||
|
||||
// list of supported vid/pid pairs
|
||||
static const supported_devices[][2] = {
|
||||
static const unsigned short supported_devices[][2] = {
|
||||
{ 0x067b, 0x2303 }, // Prolific
|
||||
{ 0x0557, 0x2008 }, // ATEN International Co., Ltd UC-232A Serial
|
||||
{ 0x0547, 0x2008 }, // ATEN
|
||||
@@ -149,7 +150,7 @@ void pl2303_settings(uint32_t rate, uint8_t bits, uint8_t parity, uint8_t stop)
|
||||
}
|
||||
|
||||
static int8_t pl2303_tx_dev(usb_device_t *dev, uint8_t *data, uint8_t len) {
|
||||
if(!dev) return;
|
||||
if(!dev) return USB_ERROR_NO_SUCH_DEVICE;
|
||||
|
||||
usb_pl2303_info_t *info = &(dev->pl2303_info);
|
||||
|
||||
|
||||
@@ -83,6 +83,7 @@ typedef struct {
|
||||
#define USB_ERROR_INVALID_MAX_PKT_SIZE 0xDA
|
||||
#define USB_DEV_CONFIG_ERROR_DEVICE_NOT_SUPPORTED 0xDB
|
||||
#define USB_ERROR_CONFIGURAION_SIZE_MISMATCH 0xDC
|
||||
#define USB_ERROR_NO_SUCH_DEVICE 0xDE
|
||||
#define USB_ERROR_TRANSFER_TIMEOUT 0xFF
|
||||
|
||||
struct usb_device_entry;
|
||||
@@ -257,5 +258,6 @@ uint8_t usb_in_transfer( usb_device_t *, ep_t *ep, uint16_t *nbytesptr, uint8_t*
|
||||
uint8_t usb_out_transfer( usb_device_t *, ep_t *ep, uint16_t nbytes, uint8_t* data );
|
||||
uint8_t usb_release_device(uint8_t parent, uint8_t port);
|
||||
usb_device_t *usb_get_devices();
|
||||
|
||||
uint8_t usb_configure(uint8_t parent, uint8_t port, bool lowspeed);
|
||||
|
||||
#endif // USB_H
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#include "AT91SAM7S256.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "hardware.h"
|
||||
#include "osd.h"
|
||||
|
||||
#include "user_io.h"
|
||||
#include "archie.h"
|
||||
#include "cdc_control.h"
|
||||
@@ -14,6 +15,9 @@
|
||||
#include "fat.h"
|
||||
#include "spi.h"
|
||||
#include "mist_cfg.h"
|
||||
#include "mmc.h"
|
||||
#include "tos.h"
|
||||
#include "errors.h"
|
||||
|
||||
// up to 16 key can be remapped
|
||||
#define MAX_REMAP 16
|
||||
|
||||
Reference in New Issue
Block a user