Changeset ef4c461 in rtems
- Timestamp:
- 10/09/14 20:35:10 (9 years ago)
- Branches:
- 4.11, 5, 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)
- Location:
- c/src
- Files:
-
- 1 added
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/arm/nds/Makefile.am
re160e41 ref4c461 16 16 17 17 nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h 18 nodist_include_bsp_HEADERS += irq/irq.h 18 19 DISTCLEANFILES = include/bspopts.h 19 20 noinst_PROGRAMS = -
c/src/lib/libbsp/arm/nds/block/block.c
re160e41 ref4c461 1 1 /* 2 2 * RTEMS for Nintendo DS flash driver. 3 * 3 */ 4 5 /* 4 6 * Copyright (c) 2008 by Matthieu Bucchianeri <mbucchia@gmail.com> 5 7 * … … 18 20 #include <disc.h> 19 21 20 bool22 static bool 21 23 nds_flash_probe (int minor) 22 24 { … … 24 26 } 25 27 26 void28 static void 27 29 nds_flash_initialize (int minor) 28 30 { … … 44 46 } 45 47 46 void48 static void 47 49 nds_flash_read_reg (int minor, int reg, uint16_t * value) 48 50 { … … 50 52 } 51 53 52 void54 static void 53 55 nds_flash_write_reg (int minor, int reg, uint16_t value) 54 56 { … … 56 58 } 57 59 58 void60 static void 59 61 nds_flash_read_block (int minor, uint32_t block_size, 60 62 rtems_blkdev_sg_buffer * bufs, … … 64 66 } 65 67 66 void68 static void 67 69 nds_flash_write_block (int minor, uint32_t block_size, 68 70 rtems_blkdev_sg_buffer * bufs, … … 72 74 } 73 75 74 int76 static int 75 77 nds_flash_control (int minor, uint32_t cmd, void *arg) 76 78 { … … 79 81 } 80 82 81 rtems_status_code83 static rtems_status_code 82 84 nds_flash_io_speed (int minor, uint16_t mode) 83 85 { -
c/src/lib/libbsp/arm/nds/console/console.c
re160e41 ref4c461 33 33 /* from NDS support library */ 34 34 extern void consolePrintChar(char c); 35 void35 static void 36 36 nds_putch (char c) 37 37 { … … 44 44 static volatile char ch = 0; 45 45 46 void console_push (char c); /* used in touchscreen.c */ 47 46 48 void 47 49 console_push (char c) … … 50 52 } 51 53 52 int54 static int 53 55 nds_getch (void) 54 56 { -
c/src/lib/libbsp/arm/nds/coproc/coproc.c
re160e41 ref4c461 118 118 if (!is_recording && my_IPC->record) 119 119 { 120 StartRecording( my_IPC->record_buffer, my_IPC->record_length_max);120 StartRecording((u8 *)my_IPC->record_buffer, my_IPC->record_length_max); 121 121 is_recording = 1; 122 122 } -
c/src/lib/libbsp/arm/nds/include/bsp.h
re160e41 ref4c461 24 24 #include <rtems/clockdrv.h> 25 25 26 26 struct rtems_bsdnet_ifconfig; 27 27 28 int 29 rtems_wifi_driver_attach (struct rtems_bsdnet_ifconfig *config, 28 int rtems_wifi_driver_attach (struct rtems_bsdnet_ifconfig *config, 30 29 int attach); 31 30 … … 35 34 #define RTC_DRIVER_TABLE_ENTRY \ 36 35 { rtc_initialize, NULL, NULL, NULL, NULL, NULL } 37 38 39 36 extern rtems_device_driver rtc_initialize (rtems_device_major_number major, 37 rtems_device_minor_number minor, 38 void *arg); 40 39 41 40 #ifdef __cplusplus -
c/src/lib/libbsp/arm/nds/irq/irq.c
re160e41 ref4c461 1 1 /* 2 2 * RTEMS for Nintendo DS interrupt manager. 3 * 3 */ 4 5 /* 4 6 * Copyright (c) 2008 by Matthieu Bucchianeri <mbucchia@gmail.com> 5 7 * … … 12 14 #include <bsp.h> 13 15 #include <rtems/irq.h> 16 #include <bsp/irq.h> 14 17 #include <nds.h> 15 18 … … 17 20 * this function check that the value given for the irq line is valid. 18 21 */ 19 20 22 static int 21 23 isValidInterrupt (int irq) … … 29 31 * initialize the irq management. 30 32 */ 31 32 33 void 33 34 BSP_rtems_irq_mngt_init (void) … … 41 42 * install a irq handler. 42 43 */ 43 44 44 int 45 45 BSP_install_rtems_irq_handler (const rtems_irq_connect_data * irq) … … 68 68 * return the handler hooked to the given irq. 69 69 */ 70 71 70 int 72 71 BSP_get_current_rtems_irq_handler (rtems_irq_connect_data * irq) … … 78 77 * remove & disable given irq. 79 78 */ 80 81 79 int 82 80 BSP_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 165 165 bool return OUT: true if NAND is idle 166 166 -----------------------------------------------------------------*/ 167 bool _EFA2_clearStatus (void)167 static bool _EFA2_clearStatus (void) 168 168 { 169 169 // tbd: currently there is no write support, so always return … … 177 177 bool return OUT: true if the correct NAND chip is found 178 178 -----------------------------------------------------------------*/ 179 bool _EFA2_isInserted (void)179 static bool _EFA2_isInserted (void) 180 180 { 181 181 _EFA2_clearStatus(); … … 192 192 bool return OUT: true if successful 193 193 -----------------------------------------------------------------*/ 194 bool _EFA2_readSectors (u32 sector, u32 numSecs, void* buffer)194 static bool _EFA2_readSectors (u32 sector, u32 numSecs, void* buffer) 195 195 { 196 196 int i; … … 266 266 bool return OUT: true if successful 267 267 -----------------------------------------------------------------*/ 268 bool _EFA2_writeSectors (u32 sector, u8 numSecs, void* buffer)268 static bool _EFA2_writeSectors (u32 sector, u8 numSecs, void* buffer) 269 269 { 270 270 // Upto now I focused on reading NAND, write operations … … 277 277 unload the EFA2 interface 278 278 -----------------------------------------------------------------*/ 279 bool _EFA2_shutdown(void)279 static bool _EFA2_shutdown(void) 280 280 { 281 281 return _EFA2_clearStatus(); … … 287 287 otherwise returns false 288 288 -----------------------------------------------------------------*/ 289 bool _EFA2_startUp(void)289 static bool _EFA2_startUp(void) 290 290 { 291 291 _EFA2_global_unlock(); -
c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_fcsr.c
re160e41 ref4c461 74 74 bool return OUT: true if a GBA FC card is inserted 75 75 -----------------------------------------------------------------*/ 76 bool _FCSR_isInserted (void)76 static bool _FCSR_isInserted (void) 77 77 { 78 78 bool flagFoundFileSys = false; … … 102 102 bool return OUT: always true for GBA FC 103 103 -----------------------------------------------------------------*/ 104 bool _FCSR_clearStatus (void)104 static bool _FCSR_clearStatus (void) 105 105 { 106 106 return true; … … 117 117 bool return OUT: true if successful 118 118 -----------------------------------------------------------------*/ 119 bool _FCSR_readSectors (u32 sector, u32 numSectors, void* buffer)119 static bool _FCSR_readSectors (u32 sector, u32 numSectors, void* buffer) 120 120 { 121 121 int i; … … 185 185 bool return OUT: true if successful 186 186 -----------------------------------------------------------------*/ 187 bool _FCSR_writeSectors (u32 sector, u8 numSectors, void* buffer)187 static bool _FCSR_writeSectors (u32 sector, u8 numSectors, void* buffer) 188 188 { 189 189 int i; … … 224 224 unload the Flash Cart interface 225 225 -----------------------------------------------------------------*/ 226 bool _FCSR_shutdown(void)226 static bool _FCSR_shutdown(void) 227 227 { 228 228 int i; … … 246 246 otherwise returns false 247 247 -----------------------------------------------------------------*/ 248 bool _FCSR_startUp(void)248 static bool _FCSR_startUp(void) 249 249 { 250 250 bool flagFoundFileSys = false; -
c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_m3cf.c
re160e41 ref4c461 79 79 80 80 81 bool _M3CF_startup(void) {81 static bool _M3CF_startup(void) { 82 82 _M3_changeMode (M3_MODE_MEDIA); 83 83 return _CF_startup (&_M3CF_Registers); -
c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_m3sd.c
re160e41 ref4c461 239 239 } 240 240 241 bool _M3SD_cmd_6byte_response (u8* responseBuffer, u8 command, u32 data) {241 static bool _M3SD_cmd_6byte_response (u8* responseBuffer, u8 command, u32 data) { 242 242 _M3SD_sendCommand (command, data); 243 243 return _M3SD_getResponse (responseBuffer, 6); 244 244 } 245 245 246 bool _M3SD_cmd_17byte_response (u8* responseBuffer, u8 command, u32 data) {246 static bool _M3SD_cmd_17byte_response (u8* responseBuffer, u8 command, u32 data) { 247 247 _M3SD_sendCommand (command, data); 248 248 return _M3SD_getResponse (responseBuffer, 17); … … 390 390 // Functions needed for the external interface 391 391 392 bool _M3SD_startUp (void) {392 static bool _M3SD_startUp (void) { 393 393 _M3SD_unlock(); 394 394 return _M3SD_initCard(); 395 395 } 396 396 397 bool _M3SD_isInserted (void) {397 static bool _M3SD_isInserted (void) { 398 398 u8 responseBuffer [6]; 399 399 // Make sure the card receives the command … … 412 412 } 413 413 414 bool _M3SD_readSectors (u32 sector, u32 numSectors, void* buffer) {414 static bool _M3SD_readSectors (u32 sector, u32 numSectors, void* buffer) { 415 415 u32 i; 416 416 u8* dest = (u8*) buffer; … … 448 448 } 449 449 450 bool _M3SD_writeSectors (u32 sector, u32 numSectors, const void* buffer) {450 static bool _M3SD_writeSectors (u32 sector, u32 numSectors, const void* buffer) { 451 451 u8 crc[8]; 452 452 u8 responseBuffer[6]; … … 496 496 } 497 497 498 bool _M3SD_clearStatus (void) {498 static bool _M3SD_clearStatus (void) { 499 499 return _M3SD_initCard (); 500 500 } 501 501 502 bool _M3SD_shutdown (void) {502 static bool _M3SD_shutdown (void) { 503 503 _M3_changeMode (M3_MODE_ROM); 504 504 return true; -
c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_mpcf.c
re160e41 ref4c461 82 82 otherwise returns false 83 83 -----------------------------------------------------------------*/ 84 bool _MPCF_startup(void) {84 static bool _MPCF_startup(void) { 85 85 return _CF_startup(&_MPCF_Registers); 86 86 } -
c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_njsd.c
re160e41 ref4c461 385 385 } 386 386 387 bool _NJSD_cmd_6byte_response (u8* responseBuffer, u8 command, u32 data) {387 static bool _NJSD_cmd_6byte_response (u8* responseBuffer, u8 command, u32 data) { 388 388 return _NJSD_sendCMDR (SD_CLK_167KHz, responseBuffer, SD_RSP_48, command, data); 389 389 } 390 390 391 bool _NJSD_cmd_17byte_response (u8* responseBuffer, u8 command, u32 data) {391 static bool _NJSD_cmd_17byte_response (u8* responseBuffer, u8 command, u32 data) { 392 392 return _NJSD_sendCMDR (SD_CLK_167KHz, responseBuffer, SD_RSP_136, command, data); 393 393 } … … 414 414 415 415 416 bool _NJSD_isInserted(void) {416 static bool _NJSD_isInserted(void) { 417 417 u8 responseBuffer [8]; 418 418 _NJSD_sendCMDR (SD_CLK_167KHz, responseBuffer, SD_RSP_48, SEND_STATUS, 0); … … 425 425 } 426 426 427 bool _NJSD_clearStatus (void) {427 static bool _NJSD_clearStatus (void) { 428 428 return _NJSD_reset(); 429 429 } 430 430 431 bool _NJSD_shutdown(void) {431 static bool _NJSD_shutdown(void) { 432 432 return _NJSD_clearStatus(); 433 433 } 434 434 435 bool _NJSD_startup(void) {435 static bool _NJSD_startup(void) { 436 436 if (! _NJSD_init(0xA0406000) ) { 437 437 return false; … … 444 444 445 445 446 bool _NJSD_writeSectors (u32 sector, u32 numSectors, const void* buffer) {446 static bool _NJSD_writeSectors (u32 sector, u32 numSectors, const void* buffer) { 447 447 u8 crc[8]; 448 448 u32 offset = sector * BYTES_PER_READ; … … 462 462 463 463 #ifdef _IO_ALLOW_UNALIGNED 464 bool _NJSD_readSectors (u32 sector, u32 numSectors, void* buffer) {464 static bool _NJSD_readSectors (u32 sector, u32 numSectors, void* buffer) { 465 465 u32 tmp[BYTES_PER_READ>>2]; 466 466 int i; -
c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_nmmc.c
re160e41 ref4c461 162 162 // Neo MMC driver functions 163 163 164 bool _NMMC_isInserted(void) {164 static bool _NMMC_isInserted(void) { 165 165 int i; 166 166 … … 184 184 } 185 185 186 bool _NMMC_clearStatus (void) {186 static bool _NMMC_clearStatus (void) { 187 187 u32 i; 188 188 … … 207 207 } 208 208 209 bool _NMMC_shutdown(void) {209 static bool _NMMC_shutdown(void) { 210 210 return _NMMC_clearStatus(); 211 211 } 212 212 213 bool _NMMC_startUp(void) {213 static bool _NMMC_startUp(void) { 214 214 int i; 215 215 int transSpeed; … … 256 256 257 257 258 bool _NMMC_writeSectors (u32 sector, u32 totalSecs, const void* buffer)258 static bool _NMMC_writeSectors (u32 sector, u32 totalSecs, const void* buffer) 259 259 { 260 260 u32 i; … … 303 303 } 304 304 305 bool _NMMC_readSectors (u32 sector, u32 totalSecs, void* buffer)305 static bool _NMMC_readSectors (u32 sector, u32 totalSecs, void* buffer) 306 306 { 307 307 u32 i; -
c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_sccf.c
re160e41 ref4c461 66 66 67 67 68 bool _SCCF_startup(void) {68 static bool _SCCF_startup(void) { 69 69 _SC_changeMode (SC_MODE_MEDIA); 70 70 return _CF_startup(&_SCCF_Registers); -
c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_scsd.c
re160e41 ref4c461 195 195 u16 temp; 196 196 do { 197 (void) temp; /* avoid set but not used warning */ 197 198 temp = REG_SCSD_CMD; 198 199 } while (numClocks--); 199 200 } 200 201 201 bool _SCSD_cmd_6byte_response (u8* responseBuffer, u8 command, u32 data) {202 static bool _SCSD_cmd_6byte_response (u8* responseBuffer, u8 command, u32 data) { 202 203 _SCSD_sendCommand (command, data); 203 204 return _SCSD_getResponse (responseBuffer, 6); 204 205 } 205 206 206 bool _SCSD_cmd_17byte_response (u8* responseBuffer, u8 command, u32 data) {207 static bool _SCSD_cmd_17byte_response (u8* responseBuffer, u8 command, u32 data) { 207 208 _SCSD_sendCommand (command, data); 208 209 return _SCSD_getResponse (responseBuffer, 17); … … 274 275 // Functions needed for the external interface 275 276 276 bool _SCSD_startUp (void) {277 static bool _SCSD_startUp (void) { 277 278 _SCSD_unlock(); 278 279 return _SCSD_initCard(); 279 280 } 280 281 281 bool _SCSD_isInserted (void) {282 static bool _SCSD_isInserted (void) { 282 283 u8 responseBuffer [6]; 283 284 … … 297 298 } 298 299 299 bool _SCSD_readSectors (u32 sector, u32 numSectors, void* buffer) {300 static bool _SCSD_readSectors (u32 sector, u32 numSectors, void* buffer) { 300 301 u32 i; 301 302 u8* dest = (u8*) buffer; … … 333 334 } 334 335 335 bool _SCSD_writeSectors (u32 sector, u32 numSectors, const void* buffer) {336 static bool _SCSD_writeSectors (u32 sector, u32 numSectors, const void* buffer) { 336 337 u16 crc[4]; // One per data line 337 338 u8 responseBuffer[6]; … … 377 378 } 378 379 379 bool _SCSD_clearStatus (void) {380 static bool _SCSD_clearStatus (void) { 380 381 return _SCSD_initCard (); 381 382 } 382 383 383 bool _SCSD_shutdown (void) {384 static bool _SCSD_shutdown (void) { 384 385 _SC_changeMode (SC_MODE_RAM_RO); 385 386 return true; -
c/src/lib/libbsp/arm/nds/libnds/source/arm7/touch.c
re160e41 ref4c461 41 41 42 42 //--------------------------------------------------------------------------------- 43 u8 CheckStylus(void){43 static u8 CheckStylus(void){ 44 44 //--------------------------------------------------------------------------------- 45 45 … … 134 134 135 135 //--------------------------------------------------------------------------------- 136 int16 readTouchValue(uint32 command, int16 *dist_max, u8 *err){136 static int16 readTouchValue(uint32 command, int16 *dist_max, u8 *err){ 137 137 //--------------------------------------------------------------------------------- 138 138 int16 values[5]; … … 225 225 226 226 //--------------------------------------------------------------------------------- 227 void UpdateRange(uint8 *this_range, int16 last_dist_max, u8 data_error, u8 tsc_touched){227 static void UpdateRange(uint8 *this_range, int16 last_dist_max, u8 data_error, u8 tsc_touched){ 228 228 //--------------------------------------------------------------------------------- 229 229 //range_counter_1 = counter_0x380A98C -
c/src/lib/libbsp/arm/nds/libnds/source/arm9/boxtest.c
re160e41 ref4c461 30 30 #include <nds/arm9/video.h> 31 31 #include <nds/arm9/videoGL.h> 32 33 /* 34 * Prototypes 35 * 36 * NOTE: This code appears to be externally available test code. 37 */ 38 void BoxTest_Asynch(v16 x, v16 y, v16 z, v16 width, v16 height, v16 depth); 39 int BoxTestf(float x, float y, float z, float width, float height, float depth); 40 void BoxTestf_Asynch(float x, float y, float z, float width, float height, float depth); 41 int BoxTestResult(void); 42 int BoxTest(v16 x, v16 y, v16 z, v16 width, v16 height, v16 depth); 32 43 33 44 //--------------------------------------------------------------------------------- -
c/src/lib/libbsp/arm/nds/libnds/source/arm9/console.c
re160e41 ref4c461 174 174 } 175 175 //--------------------------------------------------------------------------------- 176 int con_write(struct _reent *r,int fd,const char *ptr,int len) {176 static int con_write(struct _reent *r,int fd,const char *ptr,int len) { 177 177 //--------------------------------------------------------------------------------- 178 178 -
c/src/lib/libbsp/arm/nds/libnds/source/arm9/gurumeditation.c
re160e41 ref4c461 36 36 37 37 //--------------------------------------------------------------------------------- 38 unsigned long ARMShift(unsigned long value,unsigned char shift) {38 static unsigned long ARMShift(unsigned long value,unsigned char shift) { 39 39 //--------------------------------------------------------------------------------- 40 40 // no shift at all … … 78 78 79 79 //--------------------------------------------------------------------------------- 80 u32 getExceptionAddress( u32 opcodeAddress, u32 thumbState) {80 static u32 getExceptionAddress( u32 opcodeAddress, u32 thumbState) { 81 81 //--------------------------------------------------------------------------------- 82 82 -
c/src/lib/libbsp/arm/nds/libnds/source/arm9/initSystem.c
re160e41 ref4c461 36 36 #include <time.h> 37 37 38 /* 39 * Prototypes 40 * 41 * NOTE: Called from start.S 42 */ 43 void initSystem(void); 38 44 39 45 extern time_t *punixTime; -
c/src/lib/libbsp/arm/nds/libnds/source/arm9/ndsmotion.c
re160e41 ref4c461 53 53 54 54 // sends and receives 1 byte on the SPI bus 55 unsigned char motion_spi(unsigned char in_byte){55 static unsigned char motion_spi(unsigned char in_byte){ 56 56 57 57 unsigned char out_byte; … … 63 63 64 64 65 void motion_MK6_sensor_mode(void) {65 static void motion_MK6_sensor_mode(void) { 66 66 // send some commands on the SPI bus 67 67 SPI_On() … … 79 79 } 80 80 81 void motion_MK6_EEPROM_mode(void) {81 static void motion_MK6_EEPROM_mode(void) { 82 82 // send some commands on the SPI bus 83 83 SPI_On() … … 96 96 97 97 // checks whether a DS Motion Pak is plugged in 98 int motion_pak_is_inserted(void){98 static int motion_pak_is_inserted(void){ 99 99 int motion_pak = 0; 100 100 unsigned char return_byte = V_SRAM[10]; // read first byte of DS Motion Pak check … … 115 115 // this only works after motion_init() 116 116 // it will return false if it is run before motion_init() 117 int motion_card_is_inserted(void){117 static int motion_card_is_inserted(void){ 118 118 // send 0x03 to read from DS Motion Card control register 119 119 SPI_On() … … 131 131 // turn on the DS Motion Sensor (DS Motion Pak or DS Motion Card) 132 132 // Requires knowing which type is present (can be found by using motion_init) 133 int motion_enable(int card_type) {133 static int motion_enable(int card_type) { 134 134 switch (card_type) 135 135 { … … 449 449 void motion_enable_ain_1(void){ 450 450 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]; 452 453 swiDelay(WAIT_CYCLES); 453 454 } … … 456 457 void motion_enable_ain_2(void){ 457 458 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]; 459 461 swiDelay(WAIT_CYCLES); 460 462 } -
c/src/lib/libbsp/arm/nds/libnds/source/arm9/video.c
re160e41 ref4c461 48 48 ////////////////////////////////////////////////////////////////////// 49 49 50 // remove in a few versions -- joat51 void vramRestorMainBanks(uint32 vramTemp)52 {53 VRAM_CR = vramTemp;54 }55 56 50 ////////////////////////////////////////////////////////////////////// 57 51 52 void vramRestoreMainBanks(uint32 vramTemp); /* used in videoGL.c */ 58 53 void vramRestoreMainBanks(uint32 vramTemp) 59 54 { -
c/src/lib/libbsp/arm/nds/libnds/source/arm9/videoGL.c
re160e41 ref4c461 248 248 249 249 //--------------------------------------------------------------------------------- 250 inline uint32 alignVal( uint32 val, uint32 to ) {250 static inline uint32 alignVal( uint32 val, uint32 to ) { 251 251 return (val & (to-1))? (val & ~(to-1)) + to : val; 252 252 } 253 253 254 254 //--------------------------------------------------------------------------------- 255 int getNextPaletteSlot(u16 count, uint8 format) {255 static int getNextPaletteSlot(u16 count, uint8 format) { 256 256 //--------------------------------------------------------------------------------- 257 257 // ensure the result aligns on a palette block for this format … … 270 270 271 271 //--------------------------------------------------------------------------------- 272 uint16* vramGetBank(uint16 *addr) {272 static uint16* vramGetBank(uint16 *addr) { 273 273 //--------------------------------------------------------------------------------- 274 274 if(addr >= VRAM_A && addr < VRAM_B) … … 293 293 294 294 //--------------------------------------------------------------------------------- 295 int vramIsTextureBank(uint16 *addr) {295 static int vramIsTextureBank(uint16 *addr) { 296 296 //--------------------------------------------------------------------------------- 297 297 uint16* vram = vramGetBank(addr); … … 325 325 } 326 326 //--------------------------------------------------------------------------------- 327 uint32* getNextTextureSlot(int size) {327 static uint32* getNextTextureSlot(int size) { 328 328 //--------------------------------------------------------------------------------- 329 329 uint32* result = glGlob->nextBlock; -
c/src/lib/libbsp/arm/nds/libnds/source/common/card.c
re160e41 ref4c461 174 174 #endif 175 175 176 (void) c03; /* avoid set but not used warning */ 176 177 c03=cardEepromCommand(0x03,0); 177 178 c05=cardEepromCommand(0x05,0); -
c/src/lib/libbsp/arm/nds/libnds/source/common/gbfs.c
re160e41 ref4c461 65 65 ) { 66 66 //--------------------------------------------------------------------------------- 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; 71 71 72 72 } -
c/src/lib/libbsp/arm/nds/libnds/source/common/interrupts.c
re160e41 ref4c461 27 27 void IntrMain(void); // Prototype for assembly interrupt dispatcher 28 28 29 //--------------------------------------------------------------------------------- 30 void irqDummy(void) {} 31 //--------------------------------------------------------------------------------- 29 static void irqDummy(void) {} 32 30 33 31 -
c/src/lib/libbsp/arm/nds/preinstall.am
re160e41 ref4c461 58 58 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h 59 59 60 $(PROJECT_INCLUDE)/bsp/irq.h: irq/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) 61 $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h 62 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h 63 60 64 $(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) 61 65 $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT) -
c/src/lib/libbsp/arm/nds/rtc/rtc.c
re160e41 ref4c461 1 1 /* 2 2 * RTEMS for Nintendo DS realtime clock driver. 3 * 3 */ 4 5 /* 4 6 * Copyright (c) 2008 by Cedric Gestes <ctaf42@gmail.com> 5 7 * … … 21 23 * probe for a rtc. we always claim to have one. 22 24 */ 23 24 bool 25 static bool 25 26 nds_rtc_probe (int minor) 26 27 { … … 31 32 * initialize the nds rtc. 32 33 */ 33 34 void 34 static void 35 35 nds_rtc_init (int minor) 36 36 { … … 43 43 * to the rtems_time_of_day structure. 44 44 */ 45 46 int 45 static int 47 46 nds_rtc_get_time (int minor, rtems_time_of_day * time) 48 47 { … … 62 61 * NOTE: this is not supported. 63 62 */ 64 65 int 63 static int 66 64 nds_rtc_set_time (int minor, const rtems_time_of_day * time) 67 65 { … … 72 70 * driver function table. 73 71 */ 74 75 72 rtc_fns nds_rtc_fns = { 76 73 nds_rtc_init, -
c/src/lib/libbsp/arm/nds/startup/bspstart.c
re160e41 ref4c461 1 1 /* 2 2 * RTEMS for Nintendo DS platform initialization. 3 * 3 */ 4 5 /* 4 6 * Copyright (c) 2008 by Matthieu Bucchianeri <mbucchia@gmail.com> 5 7 * … … 13 15 #include <bsp/bootcard.h> 14 16 #include <bsp/linker-symbols.h> 17 #include <bsp/irq.h> 15 18 #include <nds.h> 16 19 17 extern void defaultExceptionHandler ();18 extern void BSP_rtems_irq_mngt_init (void); 20 extern void defaultExceptionHandler(void); 21 19 22 /* 20 23 * start the platform. 21 24 */ 22 23 25 void bsp_start (void) 24 26 { … … 47 49 48 50 /* 49 * reset bss area.50 */51 52 void53 bss_reset (void)54 {55 56 memset (bsp_section_bss_begin, 0, (size_t) bsp_section_bss_size);57 }58 59 /*60 51 * A few symbols needed by libnds but not used. 61 52 */ -
c/src/lib/libbsp/arm/nds/touchscreen/parser.c
re160e41 ref4c461 23 23 24 24 extern void console_push (char c); 25 extern void register_kbd_msg_queue (char *q_name); 26 extern void unregister_kbd_msg_queue (void); 25 27 26 28 /* … … 33 35 * message queue for touchscreen and graffiti events. 34 36 */ 35 37 extern void register_mou_msg_queue (char *q_name); 38 extern void unregister_mou_msg_queue (void); 36 39 static rtems_id mou_queue_id = 0; 37 40 static rtems_id kbd_queue_id = 0; … … 52 55 53 56 /* 54 * update touchscreen position. 55 */ 56 57 * Shared methods 58 */ 59 void update_touchscreen (void); 60 void touchscreen_sethand (int h); 61 62 /* 63 * update touchscreen position 64 */ 57 65 void 58 66 update_touchscreen (void) -
c/src/lib/libbsp/arm/nds/touchscreen/reco.c
re160e41 ref4c461 1 1 #include <nds.h> 2 2 #include "reco.h" 3 4 /* 5 * Prototype 6 * 7 * NOTE: These appear to be part of a public interface. 8 */ 9 char PA_CheckLetter(int down, int x, int y); 3 10 4 11 PA_StylusPosition PA_StylusPos[20000]; … … 61 68 62 69 63 void PA_AddStylusPos(u8 x, u8 y){70 static void PA_AddStylusPos(u8 x, u8 y){ 64 71 if (!((x == PA_StylusPos[PA_Reco.nvalues-1].x) && (y == PA_StylusPos[PA_Reco.nvalues-1].y))){ 65 72 PA_StylusPos[PA_Reco.nvalues].x = x; … … 70 77 71 78 72 void PA_StylusLine(u8 x1, u8 y1, u8 x2, u8 y2){79 static void PA_StylusLine(u8 x1, u8 y1, u8 x2, u8 y2){ 73 80 int i,dx,dy,sdx,sdy,dxabs,dyabs,x,y,px,py; 74 81 … … 131 138 132 139 133 char PA_AnalyzeShape(void){140 static char PA_AnalyzeShape(void){ 134 141 s32 i; 135 142 // for (i = 0; i < 32; i++) PA_OutputSimpleText(1, 0, i, " "); -
c/src/libchip/serial/ns16550.c
re160e41 ref4c461 133 133 ); 134 134 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 136 138 137 139 static rtems_interrupt_lock ns16550_lock =
Note: See TracChangeset
for help on using the changeset viewer.