Changeset f74d9f1f in rtems
- Timestamp:
- 03/31/04 04:37:05 (20 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 2a7e204
- Parents:
- f3e486aa
- Location:
- c/src/lib/libbsp/m68k/mrm332
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/m68k/mrm332/ChangeLog
rf3e486aa rf74d9f1f 1 2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org> 2 3 * clock/ckinit.c, console/sci.c, console/sci.h, include/bsp.h, 4 misc/interr.c, startup/bspstart.c, timer/timer.c: Convert to using 5 c99 fixed size types. 6 1 7 2004-02-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2 8 -
c/src/lib/libbsp/m68k/mrm332/clock/ckinit.c
rf3e486aa rf74d9f1f 25 25 #define CLOCK_VECTOR MRM_PIV 26 26 27 rtems_unsigned32Clock_isrs; /* ISRs until next tick */28 volatile rtems_unsigned32Clock_driver_ticks;27 uint32_t Clock_isrs; /* ISRs until next tick */ 28 volatile uint32_t Clock_driver_ticks; 29 29 /* ticks since initialization */ 30 30 rtems_isr_entry Old_ticker; … … 102 102 ) 103 103 { 104 rtems_unsigned32isrlevel;104 uint32_t isrlevel; 105 105 rtems_libio_ioctl_args_t *args = pargp; 106 106 -
c/src/lib/libbsp/m68k/mrm332/console/sci.c
rf3e486aa rf74d9f1f 37 37 * 38 38 * $Log$ 39 * Revision 1.4 2004/01/07 21:13:50 joel 40 * 2004-01-07 Joel Sherrill <joel@OARcorp.com> 41 * 42 * * times, console/sci.c: Remove efi68k and efi332 references as they are 43 * no longer in the tree. 44 * 39 45 * Revision 1.3 2003/01/20 20:33:17 joel 40 46 * 2003-01-20 Duane Gustavus <duane@unt.edu> … … 197 203 rtems_isr SciIsr( rtems_vector_number vector ); // interrupt handler 198 204 199 const rtems_termios_callbacks * SciGetTermiosHandlers( signed32polled );205 const rtems_termios_callbacks * SciGetTermiosHandlers( int32_t polled ); 200 206 201 207 rtems_device_driver SciInitialize (); // device driver api … … 206 212 rtems_device_driver SciControl (); // device driver api 207 213 208 signed32SciInterruptOpen(); // termios api209 signed32SciInterruptClose(); // termios api210 signed32SciInterruptWrite(); // termios api211 212 signed32SciSetAttributes(); // termios api213 214 signed32SciPolledOpen(); // termios api215 signed32SciPolledClose(); // termios api216 signed32SciPolledRead(); // termios api217 signed32SciPolledWrite(); // termios api218 219 static void SciSetBaud(u nsigned32rate); // hardware routine220 static void SciSetDataBits(u nsigned16bits); // hardware routine221 static void SciSetParity(u nsigned16parity); // hardware routine214 int32_t SciInterruptOpen(); // termios api 215 int32_t SciInterruptClose(); // termios api 216 int32_t SciInterruptWrite(); // termios api 217 218 int32_t SciSetAttributes(); // termios api 219 220 int32_t SciPolledOpen(); // termios api 221 int32_t SciPolledClose(); // termios api 222 int32_t SciPolledRead(); // termios api 223 int32_t SciPolledWrite(); // termios api 224 225 static void SciSetBaud(uint32_t rate); // hardware routine 226 static void SciSetDataBits(uint16_t bits); // hardware routine 227 static void SciSetParity(uint16_t parity); // hardware routine 222 228 223 229 static void inline SciDisableAllInterrupts( void ); // hardware routine … … 234 240 static void inline SciEnableTransmitter( void ); // hardware routine 235 241 236 void SciWriteCharWait ( u nsigned8); // hardware routine237 void SciWriteCharNoWait( u nsigned8); // hardware routine238 239 u nsigned8inline SciCharAvailable( void ); // hardware routine240 241 u nsigned8inline SciReadCharWait( void ); // hardware routine242 u nsigned8inline SciReadCharNoWait( void ); // hardware routine242 void SciWriteCharWait ( uint8_t); // hardware routine 243 void SciWriteCharNoWait( uint8_t); // hardware routine 244 245 uint8_t inline SciCharAvailable( void ); // hardware routine 246 247 uint8_t inline SciReadCharWait( void ); // hardware routine 248 uint8_t inline SciReadCharNoWait( void ); // hardware routine 243 249 244 250 void SciSendBreak( void ); // test routine 245 251 246 static signed8SciRcvBufGetChar(); // circular rcv buf247 static void SciRcvBufPutChar( u nsigned8); // circular rcv buf252 static int8_t SciRcvBufGetChar(); // circular rcv buf 253 static void SciRcvBufPutChar( uint8_t); // circular rcv buf 248 254 //atic void SciRcvBufFlush( void ); // circular rcv buf 249 255 … … 260 266 261 267 262 static u nsigned8SciInited = 0; // has the driver been inited263 264 static u nsigned8SciOpened; // has the driver been opened265 266 static u nsigned8SciMajor; // major device number267 268 static u nsigned16SciBaud; // current value in baud register269 270 static u nsigned32SciBytesIn = 0; // bytes received271 static u nsigned32SciBytesOut = 0; // bytes transmitted272 273 static u nsigned32SciErrorsParity = 0; // error counter274 static u nsigned32SciErrorsNoise = 0; // error counter275 static u nsigned32SciErrorsFraming = 0; // error counter276 static u nsigned32SciErrorsOverrun = 0; // error counter268 static uint8_t SciInited = 0; // has the driver been inited 269 270 static uint8_t SciOpened; // has the driver been opened 271 272 static uint8_t SciMajor; // major device number 273 274 static uint16_t SciBaud; // current value in baud register 275 276 static uint32_t SciBytesIn = 0; // bytes received 277 static uint32_t SciBytesOut = 0; // bytes transmitted 278 279 static uint32_t SciErrorsParity = 0; // error counter 280 static uint32_t SciErrorsNoise = 0; // error counter 281 static uint32_t SciErrorsFraming = 0; // error counter 282 static uint32_t SciErrorsOverrun = 0; // error counter 277 283 278 284 #if defined(CONSOLE_SCI) … … 306 312 // instead of sending them up to the termios module for the console 307 313 308 static u nsigned8SciRcvBuffer[SCI_RCV_BUF_SIZE];309 310 static u nsigned8SciRcvBufPutIndex = 0; // array index to put in next char311 312 static u nsigned8SciRcvBufGetIndex = 0; // array index to take out next char313 314 static u nsigned8SciRcvBufCount = 0; // how many bytes are in the buffer314 static uint8_t SciRcvBuffer[SCI_RCV_BUF_SIZE]; 315 316 static uint8_t SciRcvBufPutIndex = 0; // array index to put in next char 317 318 static uint8_t SciRcvBufGetIndex = 0; // array index to take out next char 319 320 static uint8_t SciRcvBufCount = 0; // how many bytes are in the buffer 315 321 316 322 … … 390 396 ****************************************************************************/ 391 397 392 const rtems_termios_callbacks * SciGetTermiosHandlers( signed32polled )398 const rtems_termios_callbacks * SciGetTermiosHandlers( int32_t polled ) 393 399 { 394 400 if ( polled ) … … 415 421 rtems_isr SciIsr( rtems_vector_number vector ) 416 422 { 417 u nsigned8ch;423 uint8_t ch; 418 424 419 425 … … 484 490 ****************************************************************************/ 485 491 486 static signed8SciRcvBufGetChar()492 static int8_t SciRcvBufGetChar() 487 493 { 488 494 rtems_interrupt_level level; 489 u nsigned8ch;495 uint8_t ch; 490 496 491 497 if ( SciRcvBufCount == 0 ) … … 521 527 ****************************************************************************/ 522 528 523 static void SciRcvBufPutChar( u nsigned8ch )529 static void SciRcvBufPutChar( uint8_t ch ) 524 530 { 525 531 rtems_interrupt_level level; … … 601 607 ****************************************************************************/ 602 608 603 signed32SciInterruptOpen(604 signed32major,605 signed32minor,609 int32_t SciInterruptOpen( 610 int32_t major, 611 int32_t minor, 606 612 void *arg 607 613 ) … … 668 674 ****************************************************************************/ 669 675 670 signed32SciInterruptClose(671 signed32major,672 signed32minor,676 int32_t SciInterruptClose( 677 int32_t major, 678 int32_t minor, 673 679 void *arg 674 680 ) … … 692 698 ****************************************************************************/ 693 699 694 signed32SciInterruptWrite(695 signed32minor,700 int32_t SciInterruptWrite( 701 int32_t minor, 696 702 const char *buf, 697 signed32len703 int32_t len 698 704 ) 699 705 { … … 737 743 ****************************************************************************/ 738 744 739 signed32SciSetAttributes(740 signed32minor,745 int32_t SciSetAttributes( 746 int32_t minor, 741 747 const struct termios *t 742 748 ) 743 749 { 744 u nsigned32baud_requested;745 u nsigned32sci_rate = 0;746 u nsigned16sci_parity = 0;747 u nsigned16sci_databits = 0;750 uint32_t baud_requested; 751 uint32_t sci_rate = 0; 752 uint16_t sci_parity = 0; 753 uint16_t sci_databits = 0; 748 754 749 755 if ( minor != SCI_MINOR ) // check the minor dev num … … 841 847 ****************************************************************************/ 842 848 843 signed32SciPolledOpen(844 signed32major,845 signed32minor,849 int32_t SciPolledOpen( 850 int32_t major, 851 int32_t minor, 846 852 void *arg 847 853 ) … … 896 902 ****************************************************************************/ 897 903 898 signed32SciPolledClose(899 signed32major,900 signed32minor,904 int32_t SciPolledClose( 905 int32_t major, 906 int32_t minor, 901 907 void *arg 902 908 ) … … 918 924 ****************************************************************************/ 919 925 920 signed32SciPolledRead(921 signed32minor926 int32_t SciPolledRead( 927 int32_t minor 922 928 ) 923 929 { … … 949 955 ****************************************************************************/ 950 956 951 signed32SciPolledWrite(952 signed32minor,957 int32_t SciPolledWrite( 958 int32_t minor, 953 959 const char *buf, 954 signed32len960 int32_t len 955 961 ) 956 962 { 957 signed32written = 0;963 int32_t written = 0; 958 964 959 965 if ( minor != SCI_MINOR ) // check minor device num … … 1137 1143 { 1138 1144 rtems_libio_rw_args_t *rw_args; // ptr to argument struct 1139 u nsigned8*buffer;1140 u nsigned16length;1145 uint8_t *buffer; 1146 uint16_t length; 1141 1147 1142 1148 rw_args = (rtems_libio_rw_args_t *) arg; // arguments to read() … … 1199 1205 { 1200 1206 rtems_libio_rw_args_t *rw_args; // ptr to argument struct 1201 u nsigned8*buffer;1202 u nsigned16length;1207 uint8_t *buffer; 1208 uint16_t length; 1203 1209 1204 1210 rw_args = (rtems_libio_rw_args_t *) arg; … … 1214 1220 } 1215 1221 1216 buffer = (u nsigned8*)rw_args->buffer; // points to data1222 buffer = (uint8_t*)rw_args->buffer; // points to data 1217 1223 1218 1224 length = rw_args->count; // how many bytes … … 1249 1255 { 1250 1256 rtems_libio_ioctl_args_t *args = arg; // rtems arg struct 1251 u nsigned16command; // the cmd to execute1252 u nsigned16unused; // maybe later1253 u nsigned16*ptr; // ptr to user data1257 uint16_t command; // the cmd to execute 1258 uint16_t unused; // maybe later 1259 uint16_t *ptr; // ptr to user data 1254 1260 1255 1261 //printk("%s major=%d minor=%d\r\n", __FUNCTION__,major,minor); … … 1307 1313 ****************************************************************************/ 1308 1314 1309 static void SciSetBaud(u nsigned32rate)1310 { 1311 u nsigned16value;1312 u nsigned16save_sccr1;1315 static void SciSetBaud(uint32_t rate) 1316 { 1317 uint16_t value; 1318 uint16_t save_sccr1; 1313 1319 1314 1320 // when you open the console you need to set the termio struct baud rate … … 1322 1328 // see mrm332.h for an example 1323 1329 1324 value = ( (u nsigned16) ( SYS_CLOCK / rate / 32.0 + 0.5 ) & 0x1fff );1330 value = ( (uint16_t) ( SYS_CLOCK / rate / 32.0 + 0.5 ) & 0x1fff ); 1325 1331 1326 1332 save_sccr1 = *SCCR1; // save register … … 1348 1354 ****************************************************************************/ 1349 1355 1350 static void SciSetParity(u nsigned16parity)1351 { 1352 u nsigned16value;1356 static void SciSetParity(uint16_t parity) 1357 { 1358 uint16_t value; 1353 1359 1354 1360 value = *SCCR1; // get the register … … 1389 1395 ****************************************************************************/ 1390 1396 1391 static void SciSetDataBits(u nsigned16bits)1392 { 1393 u nsigned16value;1397 static void SciSetDataBits(uint16_t bits) 1398 { 1399 uint16_t value; 1394 1400 1395 1401 value = *SCCR1; // get the register … … 1497 1503 ****************************************************************************/ 1498 1504 1499 void SciWriteCharWait(u nsigned8c)1505 void SciWriteCharWait(uint8_t c) 1500 1506 { 1501 1507 // poll the fifo, waiting for room for another character … … 1530 1536 ****************************************************************************/ 1531 1537 1532 void SciWriteCharNoWait(u nsigned8c)1538 void SciWriteCharNoWait(uint8_t c) 1533 1539 { 1534 1540 if ( ( *SCSR & SCI_XMTR_AVAILABLE ) == 0 ) … … 1555 1561 ****************************************************************************/ 1556 1562 1557 u nsigned8inline SciReadCharWait( void )1558 { 1559 u nsigned8ch;1563 uint8_t inline SciReadCharWait( void ) 1564 { 1565 uint8_t ch; 1560 1566 1561 1567 while ( SciCharAvailable() == 0 ) // anything there? … … 1586 1592 ****************************************************************************/ 1587 1593 1588 u nsigned8inline SciReadCharNoWait( void )1589 { 1590 u nsigned8ch;1594 uint8_t inline SciReadCharNoWait( void ) 1595 { 1596 uint8_t ch; 1591 1597 1592 1598 if ( SciCharAvailable() == 0 ) // anything there? … … 1612 1618 ****************************************************************************/ 1613 1619 1614 u nsigned8inline SciCharAvailable( void )1620 uint8_t inline SciCharAvailable( void ) 1615 1621 { 1616 1622 return ( *SCSR & SCI_RCVR_READY ); // char in data register? … … 1667 1673 void SciUnitTest() 1668 1674 { 1669 u nsigned8byte; // a character1670 u nsigned16fd; // file descriptor for device1671 u nsigned16result; // result of ioctl1675 uint8_t byte; // a character 1676 uint16_t fd; // file descriptor for device 1677 uint16_t result; // result of ioctl 1672 1678 1673 1679 -
c/src/lib/libbsp/m68k/mrm332/console/sci.h
rf3e486aa rf74d9f1f 219 219 // look at console_open to see how this is called 220 220 221 const rtems_termios_callbacks * SciGetTermiosHandlers( signed32polled );221 const rtems_termios_callbacks * SciGetTermiosHandlers( int32_t polled ); 222 222 223 223 … … 227 227 228 228 229 // signed32 SciOpenPolled ( signed32 major, signed32minor, void *arg );230 // signed32 SciOpenInterrupt ( signed32 major, signed32minor, void *arg );231 232 // signed32 SciClose ( signed32 major, signed32minor, void *arg );233 234 // signed32 SciWritePolled ( signed32 minor, const char *buf, signed32len );235 // signed32 SciWriteInterrupt( signed32 minor, const char *buf, signed32len );236 237 // signed32 SciReadPolled ( signed32minor );238 239 // signed32 SciSetAttributes ( signed32minor, const struct termios *t );229 //int32_t SciOpenPolled ( int32_t major, int32_t minor, void *arg ); 230 //int32_t SciOpenInterrupt ( int32_t major, int32_t minor, void *arg ); 231 232 //int32_t SciClose ( int32_t major, int32_t minor, void *arg ); 233 234 //int32_t SciWritePolled ( int32_t minor, const char *buf, int32_t len ); 235 //int32_t SciWriteInterrupt( int32_t minor, const char *buf, int32_t len ); 236 237 //int32_t SciReadPolled ( int32_t minor ); 238 239 //int32_t SciSetAttributes ( int32_t minor, const struct termios *t ); 240 240 241 241 -
c/src/lib/libbsp/m68k/mrm332/include/bsp.h
rf3e486aa rf74d9f1f 74 74 75 75 #define rtems_bsp_delay( microseconds ) \ 76 { register rtems_unsigned32_delay=(microseconds); \77 register rtems_unsigned32_tmp=123; \76 { register uint32_t _delay=(microseconds); \ 77 register uint32_t _tmp=123; \ 78 78 asm volatile( "0: \ 79 79 nbcd %0 ; \ -
c/src/lib/libbsp/m68k/mrm332/misc/interr.c
rf3e486aa rf74d9f1f 68 68 Internal_errors_Source the_source, 69 69 boolean is_internal, 70 u nsigned32the_error70 uint32_t the_error 71 71 ) 72 72 { -
c/src/lib/libbsp/m68k/mrm332/startup/bspstart.c
rf3e486aa rf74d9f1f 37 37 38 38 void bsp_postdriver_hook(void); 39 void bsp_libc_init( void *, u nsigned32, int );39 void bsp_libc_init( void *, uint32_t, int ); 40 40 void bsp_pretasking_hook(void); /* m68k version */ 41 41 -
c/src/lib/libbsp/m68k/mrm332/timer/timer.c
rf3e486aa rf74d9f1f 53 53 int Read_timer( void ) 54 54 { 55 rtems_unsigned32total;55 uint32_t total; 56 56 total = 0; 57 57
Note: See TracChangeset
for help on using the changeset viewer.