Changeset ef4c461 in rtems


Ignore:
Timestamp:
Oct 9, 2014, 8:35:10 PM (5 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
a38ced2
Parents:
e160e41
git-author:
Joel Sherrill <joel.sherrill@…> (10/09/14 20:35:10)
git-committer:
Joel Sherrill <joel.sherrill@…> (10/10/14 15:17:33)
Message:

arm/nds: Warning clean up

This patch eliminates most of the warnings in this BSP but attempts
very little clean up. This BSP includes copies of a lot of code
from free NDS libraries and modifications should be kept to a minimum.

Location:
c/src
Files:
1 added
32 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/nds/Makefile.am

    re160e41 ref4c461  
    1616
    1717nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
     18nodist_include_bsp_HEADERS += irq/irq.h
    1819DISTCLEANFILES = include/bspopts.h
    1920noinst_PROGRAMS =
  • c/src/lib/libbsp/arm/nds/block/block.c

    re160e41 ref4c461  
    11/*
    22 * RTEMS for Nintendo DS flash driver.
    3  *
     3 */
     4
     5/*
    46 * Copyright (c) 2008 by Matthieu Bucchianeri <mbucchia@gmail.com>
    57 *
     
    1820#include <disc.h>
    1921
    20 bool
     22static bool
    2123nds_flash_probe (int minor)
    2224{
     
    2426}
    2527
    26 void
     28static void
    2729nds_flash_initialize (int minor)
    2830{
     
    4446}
    4547
    46 void
     48static void
    4749nds_flash_read_reg (int minor, int reg, uint16_t * value)
    4850{
     
    5052}
    5153
    52 void
     54static void
    5355nds_flash_write_reg (int minor, int reg, uint16_t value)
    5456{
     
    5658}
    5759
    58 void
     60static void
    5961nds_flash_read_block (int minor, uint32_t block_size,
    6062                      rtems_blkdev_sg_buffer * bufs,
     
    6466}
    6567
    66 void
     68static void
    6769nds_flash_write_block (int minor, uint32_t block_size,
    6870                       rtems_blkdev_sg_buffer * bufs,
     
    7274}
    7375
    74 int
     76static int
    7577nds_flash_control (int minor, uint32_t cmd, void *arg)
    7678{
     
    7981}
    8082
    81 rtems_status_code
     83static rtems_status_code
    8284nds_flash_io_speed (int minor, uint16_t mode)
    8385{
  • c/src/lib/libbsp/arm/nds/console/console.c

    re160e41 ref4c461  
    3333/* from NDS support library */
    3434extern void consolePrintChar(char c);
    35 void
     35static void
    3636nds_putch (char c)
    3737{
     
    4444static volatile char ch = 0;
    4545
     46void console_push (char c); /* used in touchscreen.c */
     47
    4648void
    4749console_push (char c)
     
    5052}
    5153
    52 int
     54static int
    5355nds_getch (void)
    5456{
  • c/src/lib/libbsp/arm/nds/coproc/coproc.c

    re160e41 ref4c461  
    118118        if (!is_recording && my_IPC->record)
    119119          {
    120             StartRecording(my_IPC->record_buffer, my_IPC->record_length_max);
     120            StartRecording((u8 *)my_IPC->record_buffer, my_IPC->record_length_max);
    121121            is_recording = 1;
    122122          }
  • c/src/lib/libbsp/arm/nds/include/bsp.h

    re160e41 ref4c461  
    2424#include <rtems/clockdrv.h>
    2525
    26   struct rtems_bsdnet_ifconfig;
     26struct rtems_bsdnet_ifconfig;
    2727
    28   int
    29     rtems_wifi_driver_attach (struct rtems_bsdnet_ifconfig *config,
     28int rtems_wifi_driver_attach (struct rtems_bsdnet_ifconfig *config,
    3029                              int attach);
    3130
     
    3534#define RTC_DRIVER_TABLE_ENTRY \
    3635    { rtc_initialize, NULL, NULL, NULL, NULL, NULL }
    37   extern rtems_device_driver rtc_initialize (rtems_device_major_number major,
    38                                              rtems_device_minor_number minor,
    39                                              void *arg);
     36extern rtems_device_driver rtc_initialize (rtems_device_major_number major,
     37                                           rtems_device_minor_number minor,
     38                                           void *arg);
    4039
    4140#ifdef __cplusplus
  • c/src/lib/libbsp/arm/nds/irq/irq.c

    re160e41 ref4c461  
    11/*
    22 * RTEMS for Nintendo DS interrupt manager.
    3  *
     3 */
     4
     5/*
    46 * Copyright (c) 2008 by Matthieu Bucchianeri <mbucchia@gmail.com>
    57 *
     
    1214#include <bsp.h>
    1315#include <rtems/irq.h>
     16#include <bsp/irq.h>
    1417#include <nds.h>
    1518
     
    1720 * this function check that the value given for the irq line is valid.
    1821 */
    19 
    2022static int
    2123isValidInterrupt (int irq)
     
    2931 * initialize the irq management.
    3032 */
    31 
    3233void
    3334BSP_rtems_irq_mngt_init (void)
     
    4142 * install a irq handler.
    4243 */
    43 
    4444int
    4545BSP_install_rtems_irq_handler (const rtems_irq_connect_data * irq)
     
    6868 * return the handler hooked to the given irq.
    6969 */
    70 
    7170int
    7271BSP_get_current_rtems_irq_handler (rtems_irq_connect_data * irq)
     
    7877 * remove & disable given irq.
    7978 */
    80 
    8179int
    8280BSP_remove_rtems_irq_handler (const rtems_irq_connect_data * irq)
  • c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_efa2.c

    re160e41 ref4c461  
    165165bool return OUT:  true if NAND is idle
    166166-----------------------------------------------------------------*/
    167 bool _EFA2_clearStatus (void)
     167static bool _EFA2_clearStatus (void)
    168168{
    169169        // tbd: currently there is no write support, so always return
     
    177177bool return OUT:  true if the correct NAND chip is found
    178178-----------------------------------------------------------------*/
    179 bool _EFA2_isInserted (void)
     179static bool _EFA2_isInserted (void)
    180180{
    181181        _EFA2_clearStatus();
     
    192192bool return OUT: true if successful
    193193-----------------------------------------------------------------*/
    194 bool _EFA2_readSectors (u32 sector, u32 numSecs, void* buffer)
     194static bool _EFA2_readSectors (u32 sector, u32 numSecs, void* buffer)
    195195{
    196196        int  i;
     
    266266bool return OUT: true if successful
    267267-----------------------------------------------------------------*/
    268 bool _EFA2_writeSectors (u32 sector, u8 numSecs, void* buffer)
     268static bool _EFA2_writeSectors (u32 sector, u8 numSecs, void* buffer)
    269269{
    270270        // Upto now I focused on reading NAND, write operations
     
    277277unload the EFA2 interface
    278278-----------------------------------------------------------------*/
    279 bool _EFA2_shutdown(void)
     279static bool _EFA2_shutdown(void)
    280280{
    281281        return _EFA2_clearStatus();
     
    287287otherwise returns false
    288288-----------------------------------------------------------------*/
    289 bool _EFA2_startUp(void)
     289static bool _EFA2_startUp(void)
    290290{
    291291        _EFA2_global_unlock();
  • c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_fcsr.c

    re160e41 ref4c461  
    7474bool return OUT:  true if a GBA FC card is inserted
    7575-----------------------------------------------------------------*/
    76 bool _FCSR_isInserted (void)
     76static bool _FCSR_isInserted (void)
    7777{
    7878        bool flagFoundFileSys = false;
     
    102102bool return OUT:  always true for GBA FC
    103103-----------------------------------------------------------------*/
    104 bool _FCSR_clearStatus (void)
     104static bool _FCSR_clearStatus (void)
    105105{
    106106        return true;
     
    117117bool return OUT: true if successful
    118118-----------------------------------------------------------------*/
    119 bool _FCSR_readSectors (u32 sector, u32 numSectors, void* buffer)
     119static bool _FCSR_readSectors (u32 sector, u32 numSectors, void* buffer)
    120120{
    121121        int i;
     
    185185bool return OUT: true if successful
    186186-----------------------------------------------------------------*/
    187 bool _FCSR_writeSectors (u32 sector, u8 numSectors, void* buffer)
     187static bool _FCSR_writeSectors (u32 sector, u8 numSectors, void* buffer)
    188188{
    189189        int i;
     
    224224unload the Flash Cart interface
    225225-----------------------------------------------------------------*/
    226 bool _FCSR_shutdown(void)
     226static bool _FCSR_shutdown(void)
    227227{
    228228        int i;
     
    246246otherwise returns false
    247247-----------------------------------------------------------------*/
    248 bool _FCSR_startUp(void)
     248static bool _FCSR_startUp(void)
    249249{
    250250        bool flagFoundFileSys = false;
  • c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_m3cf.c

    re160e41 ref4c461  
    7979
    8080
    81 bool _M3CF_startup(void) {
     81static bool _M3CF_startup(void) {
    8282        _M3_changeMode (M3_MODE_MEDIA);
    8383        return _CF_startup (&_M3CF_Registers);
  • c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_m3sd.c

    re160e41 ref4c461  
    239239}
    240240
    241 bool _M3SD_cmd_6byte_response (u8* responseBuffer, u8 command, u32 data) {
     241static bool _M3SD_cmd_6byte_response (u8* responseBuffer, u8 command, u32 data) {
    242242        _M3SD_sendCommand (command, data);
    243243        return _M3SD_getResponse (responseBuffer, 6);
    244244}
    245245
    246 bool _M3SD_cmd_17byte_response (u8* responseBuffer, u8 command, u32 data) {
     246static bool _M3SD_cmd_17byte_response (u8* responseBuffer, u8 command, u32 data) {
    247247        _M3SD_sendCommand (command, data);
    248248        return _M3SD_getResponse (responseBuffer, 17);
     
    390390// Functions needed for the external interface
    391391
    392 bool _M3SD_startUp (void) {
     392static bool _M3SD_startUp (void) {
    393393        _M3SD_unlock();
    394394        return _M3SD_initCard();
    395395}
    396396
    397 bool _M3SD_isInserted (void) {
     397static bool _M3SD_isInserted (void) {
    398398        u8 responseBuffer [6];
    399399        // Make sure the card receives the command
     
    412412}
    413413
    414 bool _M3SD_readSectors (u32 sector, u32 numSectors, void* buffer) {
     414static bool _M3SD_readSectors (u32 sector, u32 numSectors, void* buffer) {
    415415        u32 i;
    416416        u8* dest = (u8*) buffer;
     
    448448}
    449449
    450 bool _M3SD_writeSectors (u32 sector, u32 numSectors, const void* buffer) {
     450static bool _M3SD_writeSectors (u32 sector, u32 numSectors, const void* buffer) {
    451451        u8 crc[8];
    452452        u8 responseBuffer[6];
     
    496496}
    497497
    498 bool _M3SD_clearStatus (void) {
     498static bool _M3SD_clearStatus (void) {
    499499        return _M3SD_initCard ();
    500500}
    501501
    502 bool _M3SD_shutdown (void) {
     502static bool _M3SD_shutdown (void) {
    503503        _M3_changeMode (M3_MODE_ROM);
    504504        return true;
  • c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_mpcf.c

    re160e41 ref4c461  
    8282otherwise returns false
    8383-----------------------------------------------------------------*/
    84 bool _MPCF_startup(void) {
     84static bool _MPCF_startup(void) {
    8585        return _CF_startup(&_MPCF_Registers);
    8686}
  • c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_njsd.c

    re160e41 ref4c461  
    385385}
    386386
    387 bool _NJSD_cmd_6byte_response (u8* responseBuffer, u8 command, u32 data) {
     387static bool _NJSD_cmd_6byte_response (u8* responseBuffer, u8 command, u32 data) {
    388388        return _NJSD_sendCMDR (SD_CLK_167KHz, responseBuffer, SD_RSP_48, command, data);
    389389}
    390390
    391 bool _NJSD_cmd_17byte_response (u8* responseBuffer, u8 command, u32 data) {
     391static bool _NJSD_cmd_17byte_response (u8* responseBuffer, u8 command, u32 data) {
    392392        return _NJSD_sendCMDR (SD_CLK_167KHz, responseBuffer, SD_RSP_136, command, data);
    393393}
     
    414414
    415415
    416 bool _NJSD_isInserted(void) {
     416static bool _NJSD_isInserted(void) {
    417417        u8 responseBuffer [8];
    418418        _NJSD_sendCMDR (SD_CLK_167KHz, responseBuffer, SD_RSP_48, SEND_STATUS, 0);
     
    425425}
    426426
    427 bool _NJSD_clearStatus (void) {
     427static bool _NJSD_clearStatus (void) {
    428428        return _NJSD_reset();
    429429}
    430430
    431 bool _NJSD_shutdown(void) {
     431static bool _NJSD_shutdown(void) {
    432432        return _NJSD_clearStatus();
    433433}
    434434
    435 bool _NJSD_startup(void) {
     435static bool _NJSD_startup(void) {
    436436        if (! _NJSD_init(0xA0406000) ) {
    437437                return false;
     
    444444
    445445
    446 bool _NJSD_writeSectors (u32 sector, u32 numSectors, const void* buffer) {
     446static bool _NJSD_writeSectors (u32 sector, u32 numSectors, const void* buffer) {
    447447        u8 crc[8];
    448448        u32 offset = sector * BYTES_PER_READ;
     
    462462
    463463#ifdef _IO_ALLOW_UNALIGNED
    464 bool _NJSD_readSectors (u32 sector, u32 numSectors, void* buffer) {
     464static bool _NJSD_readSectors (u32 sector, u32 numSectors, void* buffer) {
    465465        u32 tmp[BYTES_PER_READ>>2];
    466466        int i;
  • c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_nmmc.c

    re160e41 ref4c461  
    162162// Neo MMC driver functions
    163163
    164 bool _NMMC_isInserted(void)     {
     164static bool _NMMC_isInserted(void)      {
    165165        int i;
    166166
     
    184184}
    185185
    186 bool _NMMC_clearStatus (void) {
     186static bool _NMMC_clearStatus (void) {
    187187        u32 i;
    188188
     
    207207}
    208208
    209 bool _NMMC_shutdown(void) {
     209static bool _NMMC_shutdown(void) {
    210210        return _NMMC_clearStatus();
    211211}
    212212
    213 bool _NMMC_startUp(void) {
     213static bool _NMMC_startUp(void) {
    214214        int i;
    215215        int transSpeed;
     
    256256
    257257
    258 bool _NMMC_writeSectors (u32 sector, u32 totalSecs, const void* buffer)
     258static bool _NMMC_writeSectors (u32 sector, u32 totalSecs, const void* buffer)
    259259{
    260260        u32 i;
     
    303303}
    304304
    305 bool _NMMC_readSectors (u32 sector, u32 totalSecs, void* buffer)
     305static bool _NMMC_readSectors (u32 sector, u32 totalSecs, void* buffer)
    306306{
    307307        u32 i;
  • c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_sccf.c

    re160e41 ref4c461  
    6666
    6767
    68 bool _SCCF_startup(void) {
     68static bool _SCCF_startup(void) {
    6969        _SC_changeMode (SC_MODE_MEDIA);
    7070        return _CF_startup(&_SCCF_Registers);
  • c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_scsd.c

    re160e41 ref4c461  
    195195        u16 temp;
    196196        do {
     197                (void) temp; /* avoid set but not used warning */
    197198                temp = REG_SCSD_CMD;
    198199        } while (numClocks--);
    199200}
    200201
    201 bool _SCSD_cmd_6byte_response (u8* responseBuffer, u8 command, u32 data) {
     202static bool _SCSD_cmd_6byte_response (u8* responseBuffer, u8 command, u32 data) {
    202203        _SCSD_sendCommand (command, data);
    203204        return _SCSD_getResponse (responseBuffer, 6);
    204205}
    205206
    206 bool _SCSD_cmd_17byte_response (u8* responseBuffer, u8 command, u32 data) {
     207static bool _SCSD_cmd_17byte_response (u8* responseBuffer, u8 command, u32 data) {
    207208        _SCSD_sendCommand (command, data);
    208209        return _SCSD_getResponse (responseBuffer, 17);
     
    274275// Functions needed for the external interface
    275276
    276 bool _SCSD_startUp (void) {
     277static bool _SCSD_startUp (void) {
    277278        _SCSD_unlock();
    278279        return _SCSD_initCard();
    279280}
    280281
    281 bool _SCSD_isInserted (void) {
     282static bool _SCSD_isInserted (void) {
    282283        u8 responseBuffer [6];
    283284
     
    297298}
    298299
    299 bool _SCSD_readSectors (u32 sector, u32 numSectors, void* buffer) {
     300static bool _SCSD_readSectors (u32 sector, u32 numSectors, void* buffer) {
    300301        u32 i;
    301302        u8* dest = (u8*) buffer;
     
    333334}
    334335
    335 bool _SCSD_writeSectors (u32 sector, u32 numSectors, const void* buffer) {
     336static bool _SCSD_writeSectors (u32 sector, u32 numSectors, const void* buffer) {
    336337        u16 crc[4];     // One per data line
    337338        u8 responseBuffer[6];
     
    377378}
    378379
    379 bool _SCSD_clearStatus (void) {
     380static bool _SCSD_clearStatus (void) {
    380381        return _SCSD_initCard ();
    381382}
    382383
    383 bool _SCSD_shutdown (void) {
     384static bool _SCSD_shutdown (void) {
    384385        _SC_changeMode (SC_MODE_RAM_RO);
    385386        return true;
  • c/src/lib/libbsp/arm/nds/libnds/source/arm7/touch.c

    re160e41 ref4c461  
    4141
    4242//---------------------------------------------------------------------------------
    43 u8 CheckStylus(void){
     43static u8 CheckStylus(void){
    4444//---------------------------------------------------------------------------------
    4545
     
    134134
    135135//---------------------------------------------------------------------------------
    136 int16 readTouchValue(uint32 command, int16 *dist_max, u8 *err){
     136static int16 readTouchValue(uint32 command, int16 *dist_max, u8 *err){
    137137//---------------------------------------------------------------------------------
    138138        int16 values[5];
     
    225225
    226226//---------------------------------------------------------------------------------
    227 void UpdateRange(uint8 *this_range, int16 last_dist_max, u8 data_error, u8 tsc_touched){
     227static void UpdateRange(uint8 *this_range, int16 last_dist_max, u8 data_error, u8 tsc_touched){
    228228//---------------------------------------------------------------------------------
    229229        //range_counter_1 = counter_0x380A98C
  • c/src/lib/libbsp/arm/nds/libnds/source/arm9/boxtest.c

    re160e41 ref4c461  
    3030#include <nds/arm9/video.h>
    3131#include <nds/arm9/videoGL.h>
     32
     33/*
     34 * Prototypes
     35 *
     36 * NOTE: This code appears to be externally available test code.
     37 */
     38void BoxTest_Asynch(v16 x, v16 y, v16 z, v16 width, v16 height, v16 depth);
     39int BoxTestf(float x, float y, float z, float width, float height, float depth);
     40void BoxTestf_Asynch(float x, float y, float z, float width, float height, float depth);
     41int BoxTestResult(void);
     42int BoxTest(v16 x, v16 y, v16 z, v16 width, v16 height, v16 depth);
    3243
    3344//---------------------------------------------------------------------------------
  • c/src/lib/libbsp/arm/nds/libnds/source/arm9/console.c

    re160e41 ref4c461  
    174174}
    175175//---------------------------------------------------------------------------------
    176 int con_write(struct _reent *r,int fd,const char *ptr,int len) {
     176static int con_write(struct _reent *r,int fd,const char *ptr,int len) {
    177177//---------------------------------------------------------------------------------
    178178
  • c/src/lib/libbsp/arm/nds/libnds/source/arm9/gurumeditation.c

    re160e41 ref4c461  
    3636
    3737//---------------------------------------------------------------------------------
    38 unsigned long ARMShift(unsigned long value,unsigned char shift) {
     38static unsigned long ARMShift(unsigned long value,unsigned char shift) {
    3939//---------------------------------------------------------------------------------
    4040        // no shift at all
     
    7878
    7979//---------------------------------------------------------------------------------
    80 u32 getExceptionAddress( u32 opcodeAddress, u32 thumbState) {
     80static u32 getExceptionAddress( u32 opcodeAddress, u32 thumbState) {
    8181//---------------------------------------------------------------------------------
    8282
  • c/src/lib/libbsp/arm/nds/libnds/source/arm9/initSystem.c

    re160e41 ref4c461  
    3636#include <time.h>
    3737
     38/*
     39 * Prototypes
     40 *
     41 * NOTE: Called from start.S
     42 */
     43void initSystem(void);
    3844
    3945extern time_t *punixTime;
  • c/src/lib/libbsp/arm/nds/libnds/source/arm9/ndsmotion.c

    re160e41 ref4c461  
    5353
    5454// sends and receives 1 byte on the SPI bus
    55 unsigned char motion_spi(unsigned char in_byte){
     55static unsigned char motion_spi(unsigned char in_byte){
    5656
    5757        unsigned char out_byte;
     
    6363
    6464
    65 void motion_MK6_sensor_mode(void) {
     65static void motion_MK6_sensor_mode(void) {
    6666        // send some commands on the SPI bus
    6767        SPI_On()
     
    7979}
    8080
    81 void motion_MK6_EEPROM_mode(void) {
     81static void motion_MK6_EEPROM_mode(void) {
    8282        // send some commands on the SPI bus
    8383        SPI_On()
     
    9696
    9797// checks whether a DS Motion Pak is plugged in
    98 int motion_pak_is_inserted(void){
     98static int motion_pak_is_inserted(void){
    9999    int motion_pak = 0;
    100100        unsigned char return_byte = V_SRAM[10]; // read first byte of DS Motion Pak check
     
    115115// this only works after motion_init()
    116116// it will return false if it is run before motion_init()
    117 int motion_card_is_inserted(void){
     117static int motion_card_is_inserted(void){
    118118        // send 0x03 to read from DS Motion Card control register
    119119        SPI_On()
     
    131131// turn on the DS Motion Sensor (DS Motion Pak or DS Motion Card)
    132132// Requires knowing which type is present (can be found by using motion_init)
    133 int motion_enable(int card_type) {
     133static int motion_enable(int card_type) {
    134134        switch (card_type)
    135135        {
     
    449449void motion_enable_ain_1(void){
    450450        unsigned char return_byte;
    451     return_byte = V_SRAM[16];
     451        (void) return_byte; /* avoid set but unused warning */
     452        return_byte = V_SRAM[16];
    452453        swiDelay(WAIT_CYCLES);
    453454}
     
    456457void motion_enable_ain_2(void){
    457458        unsigned char return_byte;
    458     return_byte = V_SRAM[18];
     459        (void) return_byte; /* avoid set but unused warning */
     460        return_byte = V_SRAM[18];
    459461        swiDelay(WAIT_CYCLES);
    460462}
  • c/src/lib/libbsp/arm/nds/libnds/source/arm9/video.c

    re160e41 ref4c461  
    4848//////////////////////////////////////////////////////////////////////
    4949
    50 // remove in a few versions -- joat
    51 void vramRestorMainBanks(uint32 vramTemp)
    52 {
    53   VRAM_CR = vramTemp;
    54 }
    55 
    5650//////////////////////////////////////////////////////////////////////
    5751
     52void vramRestoreMainBanks(uint32 vramTemp); /* used in videoGL.c */
    5853void vramRestoreMainBanks(uint32 vramTemp)
    5954{
  • c/src/lib/libbsp/arm/nds/libnds/source/arm9/videoGL.c

    re160e41 ref4c461  
    248248
    249249//---------------------------------------------------------------------------------
    250 inline uint32 alignVal( uint32 val, uint32 to ) {
     250static inline uint32 alignVal( uint32 val, uint32 to ) {
    251251        return (val & (to-1))? (val & ~(to-1)) + to : val;
    252252}
    253253
    254254//---------------------------------------------------------------------------------
    255 int getNextPaletteSlot(u16 count, uint8 format) {
     255static int getNextPaletteSlot(u16 count, uint8 format) {
    256256//---------------------------------------------------------------------------------
    257257        // ensure the result aligns on a palette block for this format
     
    270270
    271271//---------------------------------------------------------------------------------
    272 uint16* vramGetBank(uint16 *addr) {
     272static uint16* vramGetBank(uint16 *addr) {
    273273//---------------------------------------------------------------------------------
    274274        if(addr >= VRAM_A && addr < VRAM_B)
     
    293293
    294294//---------------------------------------------------------------------------------
    295 int vramIsTextureBank(uint16 *addr) {
     295static int vramIsTextureBank(uint16 *addr) {
    296296//---------------------------------------------------------------------------------
    297297        uint16* vram = vramGetBank(addr);
     
    325325}
    326326//---------------------------------------------------------------------------------
    327 uint32* getNextTextureSlot(int size) {
     327static uint32* getNextTextureSlot(int size) {
    328328//---------------------------------------------------------------------------------
    329329        uint32* result = glGlob->nextBlock;
  • c/src/lib/libbsp/arm/nds/libnds/source/common/card.c

    re160e41 ref4c461  
    174174#endif
    175175
     176        (void) c03; /* avoid set but not used warning */
    176177        c03=cardEepromCommand(0x03,0);
    177178        c05=cardEepromCommand(0x05,0);
  • c/src/lib/libbsp/arm/nds/libnds/source/common/gbfs.c

    re160e41 ref4c461  
    6565) {
    6666//---------------------------------------------------------------------------------
    67         if ( NULL != gbfs_1st_limit ) GBFS_1ST_SEARCH_LIMIT = (u32 *)gbfs_1st_limit;
    68         if ( NULL != gbfs_2nd_limit ) GBFS_2ND_SEARCH_LIMIT = (u32 *)gbfs_2nd_limit;
    69         if ( NULL != gbfs_2nd_start ) GBFS_2ND_SEARCH_START = (u32 *)gbfs_2nd_start;
    70         if ( NULL != gbfs_stride ) GBFS_STRIDE = gbfs_stride;
     67        if ( 0 != gbfs_1st_limit ) GBFS_1ST_SEARCH_LIMIT = (u32 *)gbfs_1st_limit;
     68        if ( 0 != gbfs_2nd_limit ) GBFS_2ND_SEARCH_LIMIT = (u32 *)gbfs_2nd_limit;
     69        if ( 0 != gbfs_2nd_start ) GBFS_2ND_SEARCH_START = (u32 *)gbfs_2nd_start;
     70        if ( 0 != gbfs_stride ) GBFS_STRIDE = gbfs_stride;
    7171
    7272}
  • c/src/lib/libbsp/arm/nds/libnds/source/common/interrupts.c

    re160e41 ref4c461  
    2727void IntrMain(void);    // Prototype for assembly interrupt dispatcher
    2828
    29 //---------------------------------------------------------------------------------
    30 void irqDummy(void) {}
    31 //---------------------------------------------------------------------------------
     29static void irqDummy(void) {}
    3230
    3331
  • c/src/lib/libbsp/arm/nds/preinstall.am

    re160e41 ref4c461  
    5858PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h
    5959
     60$(PROJECT_INCLUDE)/bsp/irq.h: irq/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
     61        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
     62PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
     63
    6064$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
    6165        $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
  • c/src/lib/libbsp/arm/nds/rtc/rtc.c

    re160e41 ref4c461  
    11/*
    22 * RTEMS for Nintendo DS realtime clock driver.
    3  *
     3 */
     4
     5/*
    46 * Copyright (c) 2008 by Cedric Gestes <ctaf42@gmail.com>
    57 *
     
    2123 * probe for a rtc. we always claim to have one.
    2224 */
    23 
    24 bool
     25static bool
    2526nds_rtc_probe (int minor)
    2627{
     
    3132 * initialize the nds rtc.
    3233 */
    33 
    34 void
     34static void
    3535nds_rtc_init (int minor)
    3636{
     
    4343 * to the rtems_time_of_day structure.
    4444 */
    45 
    46 int
     45static int
    4746nds_rtc_get_time (int minor, rtems_time_of_day * time)
    4847{
     
    6261 * NOTE: this is not supported.
    6362 */
    64 
    65 int
     63static int
    6664nds_rtc_set_time (int minor, const rtems_time_of_day * time)
    6765{
     
    7270 * driver function table.
    7371 */
    74 
    7572rtc_fns nds_rtc_fns = {
    7673  nds_rtc_init,
  • c/src/lib/libbsp/arm/nds/startup/bspstart.c

    re160e41 ref4c461  
    11/*
    22 * RTEMS for Nintendo DS platform initialization.
    3  *
     3 */
     4
     5/*
    46 * Copyright (c) 2008 by Matthieu Bucchianeri <mbucchia@gmail.com>
    57 *
     
    1315#include <bsp/bootcard.h>
    1416#include <bsp/linker-symbols.h>
     17#include <bsp/irq.h>
    1518#include <nds.h>
    1619
    17 extern void defaultExceptionHandler ();
    18 extern void BSP_rtems_irq_mngt_init (void);
     20extern void defaultExceptionHandler(void);
     21
    1922/*
    2023 * start the platform.
    2124 */
    22 
    2325void bsp_start (void)
    2426{
     
    4749
    4850/*
    49  * reset bss area.
    50  */
    51 
    52 void
    53 bss_reset (void)
    54 {
    55 
    56   memset (bsp_section_bss_begin, 0, (size_t) bsp_section_bss_size);
    57 }
    58 
    59 /*
    6051 * A few symbols needed by libnds but not used.
    6152 */
  • c/src/lib/libbsp/arm/nds/touchscreen/parser.c

    re160e41 ref4c461  
    2323
    2424extern void console_push (char c);
     25extern void register_kbd_msg_queue (char *q_name);
     26extern void unregister_kbd_msg_queue (void);
    2527
    2628/*
     
    3335 * message queue for touchscreen and graffiti events.
    3436 */
    35 
     37extern void register_mou_msg_queue (char *q_name);
     38extern void unregister_mou_msg_queue (void);
    3639static rtems_id mou_queue_id = 0;
    3740static rtems_id kbd_queue_id = 0;
     
    5255
    5356/*
    54  * update touchscreen position.
    55  */
    56 
     57 * Shared methods
     58 */
     59void update_touchscreen (void);
     60void touchscreen_sethand (int h);
     61
     62/*
     63 * update touchscreen position
     64 */
    5765void
    5866update_touchscreen (void)
  • c/src/lib/libbsp/arm/nds/touchscreen/reco.c

    re160e41 ref4c461  
    11#include <nds.h>
    22#include "reco.h"
     3
     4/*
     5 * Prototype
     6 *
     7 * NOTE: These appear to be part of a public interface.
     8 */
     9char PA_CheckLetter(int down, int x, int y);
    310
    411PA_StylusPosition PA_StylusPos[20000];
     
    6168
    6269
    63 void PA_AddStylusPos(u8 x, u8 y){
     70static void PA_AddStylusPos(u8 x, u8 y){
    6471  if (!((x == PA_StylusPos[PA_Reco.nvalues-1].x) && (y == PA_StylusPos[PA_Reco.nvalues-1].y))){
    6572    PA_StylusPos[PA_Reco.nvalues].x = x;
     
    7077
    7178
    72 void PA_StylusLine(u8 x1, u8 y1, u8 x2, u8 y2){
     79static void PA_StylusLine(u8 x1, u8 y1, u8 x2, u8 y2){
    7380  int i,dx,dy,sdx,sdy,dxabs,dyabs,x,y,px,py;
    7481
     
    131138
    132139
    133 char PA_AnalyzeShape(void){
     140static char PA_AnalyzeShape(void){
    134141  s32 i;
    135142  //  for (i = 0; i < 32; i++) PA_OutputSimpleText(1, 0, i, "             ");
  • c/src/libchip/serial/ns16550.c

    re160e41 ref4c461  
    133133);
    134134
    135 NS16550_STATIC void ns16550_isr(void *arg);
     135#if defined(BSP_FEATURE_IRQ_EXTENSION) || defined(BSP_FEATURE_IRQ_LEGACY)
     136  NS16550_STATIC void ns16550_isr(void *arg);
     137#endif
    136138
    137139static rtems_interrupt_lock ns16550_lock =
Note: See TracChangeset for help on using the changeset viewer.