Programming Examples
13-36
ADSP-BF537 Blackfin Processor Hardware Reference
The subroutine in
transmits a character by polling operation.
Listing 13-4. UART Character Transmission
/*******************************************************
* Transmit a single byte by polling the THRE bit.
* Input parameters: r0 holds the character to be transmitted
* p0 contains UARTx_GCTL register address
* Return values: none
*******************************************************/
uart_putc:
[--sp] = r7;
uart_putc.wait:
r7 = w[p0+UART0_LSR-UART0_GCTL] (z);
CC = bittst(r7, bitpos(THRE));
if !CC jump uart_putc.wait;
w[p0+UART0_THR-UART0_GCTL] = r0; /* write initiates transfer
*/
r7 = [sp++];
rts;
uart_putc.end:
Use the routine shown in
to transmit a C-style string that is
terminated by a null character.
Listing 13-5. UART String Transmission
/**************************************************************
* Transmit a null-terminated string.
* Input parameters: p1 points to the string
* p0 contains UARTx_GCTL register address
* Return values: none
*************************************************************/
uart_puts:
Summary of Contents for Blackfin ADSP-BF537
Page 42: ...Contents xlii ADSP BF537 Blackfin Processor Hardware Reference ...
Page 90: ...Development Tools 1 32 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 138: ...Programming Examples 4 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 340: ...SDC Programming Examples 6 84 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 606: ...Programming Examples 9 94 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 660: ...Programming Examples 10 54 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 720: ...Electrical Specifications 11 60 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 840: ...Programming Examples 13 42 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 876: ...Programming Examples 14 36 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 938: ...Programming Examples 15 62 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 958: ...Programming Examples 17 12 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 986: ...Programming Examples 18 28 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1162: ...G 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1218: ...Index I 56 ADSP BF537 Blackfin Processor Hardware Reference ...