mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
Replace use of legacy portTYPE macros from old demos and standard demo files.
This commit is contained in:
parent
3e20aa7d60
commit
b54158d1dc
123 changed files with 736 additions and 736 deletions
|
@ -92,7 +92,7 @@
|
|||
|
||||
//! Server address
|
||||
#error configure SMTP server address
|
||||
portCHAR cServer[] = "192.168.0.1";
|
||||
char cServer[] = "192.168.0.1";
|
||||
|
||||
//! Fill here the mailfrom with your mail address
|
||||
#error configure SMTP mail sender
|
||||
|
@ -110,7 +110,7 @@ char cMailcontent[] ="Subject: *** SPAM ***\r\nFROM: \"Your Name here\" <sender@
|
|||
Bool bSendMail = pdFALSE;
|
||||
|
||||
//! buffer for SMTP response
|
||||
portCHAR cTempBuffer[200];
|
||||
char cTempBuffer[200];
|
||||
|
||||
|
||||
//_____ D E C L A R A T I O N S ____________________________________________
|
||||
|
@ -134,8 +134,8 @@ static portBASE_TYPE prvpushb_ISR_NonNakedBehaviour( void );
|
|||
portTASK_FUNCTION( vBasicSMTPClient, pvParameters )
|
||||
{
|
||||
struct sockaddr_in stServeurSockAddr;
|
||||
portLONG lRetval;
|
||||
portLONG lSocket = -1;
|
||||
long lRetval;
|
||||
long lSocket = -1;
|
||||
|
||||
// configure push button 0 to produce IT on falling edge
|
||||
gpio_enable_pin_interrupt(GPIO_PUSH_BUTTON_0 , GPIO_FALLING_EDGE);
|
||||
|
|
|
@ -128,7 +128,7 @@ tftpd_send_error(int s, struct tftphdr * reply, int err,
|
|||
}
|
||||
}
|
||||
|
||||
portCHAR cRamBuffer[2048];
|
||||
char cRamBuffer[2048];
|
||||
int lCurrentBlock = 0;
|
||||
int lTotalLength = 0;
|
||||
|
||||
|
@ -145,7 +145,7 @@ int tftpd_open_data_file(int fd, int mode)
|
|||
return (5);
|
||||
}
|
||||
|
||||
int tftpd_read_data_file(int fd, portCHAR * buffer, int length)
|
||||
int tftpd_read_data_file(int fd, char * buffer, int length)
|
||||
{
|
||||
int lReturnValue;
|
||||
|
||||
|
@ -165,7 +165,7 @@ int lReturnValue;
|
|||
//
|
||||
// callback to store data to the RAM buffer
|
||||
//
|
||||
int tftpd_write_data_file(int fd, portCHAR * buffer, int length)
|
||||
int tftpd_write_data_file(int fd, char * buffer, int length)
|
||||
{
|
||||
lTotalLength += length;
|
||||
memcpy(&cRamBuffer[lCurrentBlock * SEGSIZE], buffer, length);
|
||||
|
@ -407,7 +407,7 @@ portTASK_FUNCTION( vBasicTFTPServer, pvParameters )
|
|||
int lSocket;
|
||||
int lDataLen, lRecvLen, lFromLen;
|
||||
struct sockaddr_in sLocalAddr, sFromAddr;
|
||||
portCHAR cData[SEGSIZE+sizeof(struct tftphdr)];
|
||||
char cData[SEGSIZE+sizeof(struct tftphdr)];
|
||||
struct tftphdr *sHdr = (struct tftphdr *)cData;
|
||||
|
||||
// Set up port
|
||||
|
|
|
@ -104,8 +104,8 @@
|
|||
\r\n</font></BODY>\
|
||||
</html>"
|
||||
|
||||
portCHAR cDynamicPage[ webMAX_PAGE_SIZE ];
|
||||
portCHAR cPageHits[ 11 ];
|
||||
char cDynamicPage[ webMAX_PAGE_SIZE ];
|
||||
char cPageHits[ 11 ];
|
||||
|
||||
|
||||
/*! Function to process the current connection */
|
||||
|
@ -154,9 +154,9 @@ struct netconn *pxHTTPListener, *pxNewConnection;
|
|||
static void prvweb_ParseHTMLRequest( struct netconn *pxNetCon )
|
||||
{
|
||||
struct netbuf *pxRxBuffer;
|
||||
portCHAR *pcRxString;
|
||||
unsigned portSHORT usLength;
|
||||
static unsigned portLONG ulPageHits = 0;
|
||||
char *pcRxString;
|
||||
unsigned short usLength;
|
||||
static unsigned long ulPageHits = 0;
|
||||
|
||||
/* We expect to immediately get data. */
|
||||
pxRxBuffer = netconn_recv( pxNetCon );
|
||||
|
|
|
@ -170,7 +170,7 @@ static void prvEthernetConfigureInterface(void * param)
|
|||
{
|
||||
struct ip_addr xIpAddr, xNetMask, xGateway;
|
||||
extern err_t ethernetif_init( struct netif *netif );
|
||||
portCHAR MacAddress[6];
|
||||
char MacAddress[6];
|
||||
|
||||
/* Default MAC addr. */
|
||||
MacAddress[0] = ETHERNET_CONF_ETHADDR0;
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
|
||||
/* Message queue constants. */
|
||||
#define archMESG_QUEUE_LENGTH ( 6 )
|
||||
#define archPOST_BLOCK_TIME_MS ( ( unsigned portLONG ) 10000 )
|
||||
#define archPOST_BLOCK_TIME_MS ( ( unsigned long ) 10000 )
|
||||
|
||||
struct timeoutlist
|
||||
{
|
||||
|
|
|
@ -50,10 +50,10 @@
|
|||
* Simple parallel port IO routines.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0x00 )
|
||||
#define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 8 )
|
||||
#define partstALL_OUTPUTS_OFF ( ( unsigned char ) 0x00 )
|
||||
#define partstMAX_OUTPUT_LED ( ( unsigned char ) 8 )
|
||||
|
||||
static volatile unsigned portCHAR ucCurrentOutputValue = partstALL_OUTPUTS_OFF; /*lint !e956 File scope parameters okay here. */
|
||||
static volatile unsigned char ucCurrentOutputValue = partstALL_OUTPUTS_OFF; /*lint !e956 File scope parameters okay here. */
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -65,14 +65,14 @@ void vParTestInitialise( void )
|
|||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
unsigned portCHAR ucBit;
|
||||
unsigned char ucBit;
|
||||
|
||||
if( uxLED >= partstMAX_OUTPUT_LED )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;
|
||||
ucBit = ( ( unsigned char ) 1 ) << uxLED;
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
|
@ -93,14 +93,14 @@ unsigned portCHAR ucBit;
|
|||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
unsigned portCHAR ucBit;
|
||||
unsigned char ucBit;
|
||||
|
||||
if( uxLED >= partstMAX_OUTPUT_LED )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;
|
||||
ucBit = ( ( unsigned char ) 1 ) << uxLED;
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
|
|
|
@ -87,9 +87,9 @@ __attribute__((__noinline__))
|
|||
static portBASE_TYPE prvUSART0_ISR_NonNakedBehaviour( void )
|
||||
{
|
||||
/* Now we can declare the local variables. */
|
||||
signed portCHAR cChar;
|
||||
signed char cChar;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
unsigned portLONG ulStatus;
|
||||
unsigned long ulStatus;
|
||||
volatile avr32_usart_t *usart0 = &AVR32_USART0;
|
||||
portBASE_TYPE retstatus;
|
||||
|
||||
|
@ -163,7 +163,7 @@ static void vUSART0_ISR( void )
|
|||
/*
|
||||
* Init the serial port for the Minimal implementation.
|
||||
*/
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
static const gpio_map_t USART0_GPIO_MAP =
|
||||
{
|
||||
|
@ -181,7 +181,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned
|
|||
/* Configure USART0. */
|
||||
if( ( xRxedChars != serINVALID_QUEUE ) &&
|
||||
( xCharsForTx != serINVALID_QUEUE ) &&
|
||||
( ulWantedBaud != ( unsigned portLONG ) 0 ) )
|
||||
( ulWantedBaud != ( unsigned long ) 0 ) )
|
||||
{
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
|
@ -278,7 +278,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* The port handle is not required as this driver only supports UART0. */
|
||||
( void ) pxPort;
|
||||
|
@ -296,9 +296,9 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
|
||||
{
|
||||
signed portCHAR *pxNext;
|
||||
signed char *pxNext;
|
||||
|
||||
/* NOTE: This implementation does not handle the queue being full as no
|
||||
block time is used! */
|
||||
|
@ -307,7 +307,7 @@ signed portCHAR *pxNext;
|
|||
( void ) pxPort;
|
||||
|
||||
/* Send each character in the string, one at a time. */
|
||||
pxNext = ( signed portCHAR * ) pcString;
|
||||
pxNext = ( signed char * ) pcString;
|
||||
while( *pxNext )
|
||||
{
|
||||
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
|
||||
|
@ -316,7 +316,7 @@ signed portCHAR *pxNext;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
|
||||
{
|
||||
volatile avr32_usart_t *usart0 = &AVR32_USART0;
|
||||
|
||||
|
@ -350,8 +350,8 @@ void vSerialClose( xComPortHandle xPort )
|
|||
static void vprvSerialCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx )
|
||||
{
|
||||
/* Create the queues used to hold Rx and Tx characters. */
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
|
||||
/* Pass back a reference to the queues so the serial API file can
|
||||
post/receive characters. */
|
||||
|
|
|
@ -62,8 +62,8 @@
|
|||
#define mainETH_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
|
||||
/* Baud rate used by the serial port tasks. */
|
||||
#define mainCOM_BAUD_RATE ( ( unsigned portLONG ) 57600 )
|
||||
#define mainCOM_BUFFER_LEN ( ( unsigned portLONG ) 70 )
|
||||
#define mainCOM_BAUD_RATE ( ( unsigned long ) 57600 )
|
||||
#define mainCOM_BUFFER_LEN ( ( unsigned long ) 70 )
|
||||
|
||||
/* An address in the internal Flash used to count resets. This is used to check that
|
||||
the demo application is not unexpectedly resetting. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue