Skip to content

Commit 83ce425

Browse files
Merge pull request #219 from gpiffault/master
Fix typo in lesson01
2 parents 1d8364b + bdcaa90 commit 83ce425

File tree

83 files changed

+240
-240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+240
-240
lines changed

docs/lesson01/rpi-os.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ void uart_init ( void )
286286
delay(150);
287287
put32(GPPUDCLK0,0);
288288
289-
put32(AUX_ENABLES,1); //Enable mini uart (this also enables access to it registers)
289+
put32(AUX_ENABLES,1); //Enable mini uart (this also enables access to its registers)
290290
put32(AUX_MU_CNTL_REG,0); //Disable auto flow control and disable receiver and transmitter (for now)
291291
put32(AUX_MU_IER_REG,0); //Disable receive and transmit interrupts
292292
put32(AUX_MU_LCR_REG,3); //Enable 8 bit mode

exercises/lesson01/1/H-4ND-H/src/mini_uart.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
void uart_send ( char c )
66
{
77
while(1) {
8-
if(get32(AUX_MU_LSR_REG)&0x20)
8+
if(get32(AUX_MU_LSR_REG)&0x20)
99
break;
1010
}
1111
put32(AUX_MU_IO_REG,c);
@@ -14,7 +14,7 @@ void uart_send ( char c )
1414
char uart_recv ( void )
1515
{
1616
while(1) {
17-
if(get32(AUX_MU_LSR_REG)&0x01)
17+
if(get32(AUX_MU_LSR_REG)&0x01)
1818
break;
1919
}
2020
return(get32(AUX_MU_IO_REG)&0xFF);
@@ -44,7 +44,7 @@ void uart_init ( void )
4444
delay(150);
4545
put32(GPPUDCLK0,0);
4646

47-
put32(AUX_ENABLES,1); //Enable mini uart (this also enables access to it registers)
47+
put32(AUX_ENABLES,1); //Enable mini uart (this also enables access to its registers)
4848
put32(AUX_MU_CNTL_REG,0); //Disable auto flow control and disable receiver and transmitter (for now)
4949
put32(AUX_MU_IER_REG,0); //Disable receive and transmit interrupts
5050
put32(AUX_MU_LCR_REG,3); //Enable 8 bit mode

exercises/lesson01/1/a-v-v/src/mini_uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void uart_init ( unsigned int baudrate )
4545
delay(150);
4646
put32(GPPUDCLK0,0);
4747

48-
put32(AUX_ENABLES,1); //Enable mini uart (this also enables access to it registers)
48+
put32(AUX_ENABLES,1); //Enable mini uart (this also enables access to its registers)
4949
put32(AUX_MU_CNTL_REG,0); //Disable auto flow control and disable receiver and transmitter (for now)
5050
put32(AUX_MU_IER_REG,0); //Disable receive and transmit interrupts
5151
put32(AUX_MU_LCR_REG,3); //Enable 8 bit mode

exercises/lesson01/1/adkaster/src/mini_uart.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
void uart_send ( char c )
88
{
99
while(1) {
10-
if(get32(AUX_MU_LSR_REG)&0x20)
10+
if(get32(AUX_MU_LSR_REG)&0x20)
1111
break;
1212
}
1313
put32(AUX_MU_IO_REG,c);
@@ -16,7 +16,7 @@ void uart_send ( char c )
1616
char uart_recv ( void )
1717
{
1818
while(1) {
19-
if(get32(AUX_MU_LSR_REG)&0x01)
19+
if(get32(AUX_MU_LSR_REG)&0x01)
2020
break;
2121
}
2222
return(get32(AUX_MU_IO_REG)&0xFF);
@@ -34,9 +34,9 @@ void uart_init ( miniuart_baud_t baud_rate )
3434
unsigned int selector;
3535

3636
/* Final baudrate = system_clock_freq / (8 * ( baudrate_reg + 1 ))
37-
* From docs, system_clock_freq = 250MHz
37+
* From docs, system_clock_freq = 250MHz
3838
* Solve for baudrate_reg:
39-
* baudrate_reg = (system_clock_freq / (8*baudrate)) - 1
39+
* baudrate_reg = (system_clock_freq / (8*baudrate)) - 1
4040
* baudrate_reg = 31.25MHz/baudrate - 1
4141
* baudrate_reg = 31250000/baudrate -1
4242
* baudrate_reg is a 32 bit register, but per BCM2835-ARM-Peripherals.pdf, only bottom 16 are read
@@ -57,7 +57,7 @@ void uart_init ( miniuart_baud_t baud_rate )
5757
delay(150);
5858
put32(GPPUDCLK0,0);
5959

60-
put32(AUX_ENABLES,1); //Enable mini uart (this also enables access to it registers)
60+
put32(AUX_ENABLES,1); //Enable mini uart (this also enables access to its registers)
6161
put32(AUX_MU_CNTL_REG,0); //Disable auto flow control and disable receiver and transmitter (for now)
6262
put32(AUX_MU_IER_REG,0); //Disable receive and transmit interrupts
6363
put32(AUX_MU_LCR_REG,3); //Enable 8 bit mode

exercises/lesson01/1/avenito/src/mini_uart.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
void uart_send ( char c )
66
{
77
while(1) {
8-
if(get32(AUX_MU_LSR_REG)&0x20)
8+
if(get32(AUX_MU_LSR_REG)&0x20)
99
break;
1010
}
1111
put32(AUX_MU_IO_REG,c);
@@ -14,7 +14,7 @@ void uart_send ( char c )
1414
char uart_recv ( void )
1515
{
1616
while(1) {
17-
if(get32(AUX_MU_LSR_REG)&0x01)
17+
if(get32(AUX_MU_LSR_REG)&0x01)
1818
break;
1919
}
2020
return(get32(AUX_MU_IO_REG)&0xFF);
@@ -30,7 +30,7 @@ void uart_send_string(char* str)
3030
void uart_init ( int baudrate )
3131
{
3232
unsigned int selector;
33-
33+
3434
if(baudrate == 0) baudrate = 270;
3535

3636
selector = get32(GPFSEL1);
@@ -46,7 +46,7 @@ void uart_init ( int baudrate )
4646
delay(150);
4747
put32(GPPUDCLK0,0);
4848

49-
put32(AUX_ENABLES,1); //Enable mini uart (this also enables access to it registers)
49+
put32(AUX_ENABLES,1); //Enable mini uart (this also enables access to its registers)
5050
put32(AUX_MU_CNTL_REG,0); //Disable auto flow control and disable receiver and transmitter (for now)
5151
put32(AUX_MU_IER_REG,0); //Disable receive and transmit interrupts
5252
put32(AUX_MU_LCR_REG,3); //Enable 8 bit mode

exercises/lesson01/1/bl4ckout31/src/mini_uart.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
void uart_send ( char c )
66
{
77
while(1) {
8-
if(get32(AUX_MU_LSR_REG)&0x20)
8+
if(get32(AUX_MU_LSR_REG)&0x20)
99
break;
1010
}
1111
put32(AUX_MU_IO_REG,c);
@@ -14,7 +14,7 @@ void uart_send ( char c )
1414
char uart_recv ( void )
1515
{
1616
while(1) {
17-
if(get32(AUX_MU_LSR_REG)&0x01)
17+
if(get32(AUX_MU_LSR_REG)&0x01)
1818
break;
1919
}
2020
return(get32(AUX_MU_IO_REG)&0xFF);
@@ -44,7 +44,7 @@ void uart_init ( void )
4444
delay(150);
4545
put32(GPPUDCLK0,0);
4646

47-
put32(AUX_ENABLES,1); //Enable mini uart (this also enables access to it registers)
47+
put32(AUX_ENABLES,1); //Enable mini uart (this also enables access to its registers)
4848
put32(AUX_MU_CNTL_REG,0); //Disable auto flow control and disable receiver and transmitter (for now)
4949
put32(AUX_MU_IER_REG,0); //Disable receive and transmit interrupts
5050
put32(AUX_MU_LCR_REG,3); //Enable 8 bit mode

exercises/lesson01/1/evopen/src/mini_uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void uart_init(void) {
2323
put32(GPPUDCLK0, 0);
2424

2525
put32(AUX_ENABLES,
26-
1); // Enable mini uart (this also enables access to it registers)
26+
1); // Enable mini uart (this also enables access to its registers)
2727
put32(AUX_MU_CNTL_REG, 0); // Disable auto flow control
2828
put32(AUX_MU_IER_REG, 0); // Disable receive and transmit interrupts
2929
put32(AUX_MU_LCR_REG, 3); // Enable 8 bit mode

exercises/lesson01/1/gcrisis/src/mini_uart.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
void uart_send ( char c )
88
{
99
while(1) {
10-
if(get32(AUX_MU_LSR_REG)&0x20)
10+
if(get32(AUX_MU_LSR_REG)&0x20)
1111
break;
1212
}
1313
put32(AUX_MU_IO_REG,c);
@@ -16,7 +16,7 @@ void uart_send ( char c )
1616
char uart_recv ( void )
1717
{
1818
while(1) {
19-
if(get32(AUX_MU_LSR_REG)&0x01)
19+
if(get32(AUX_MU_LSR_REG)&0x01)
2020
break;
2121
}
2222
return(get32(AUX_MU_IO_REG)&0xFF);
@@ -46,7 +46,7 @@ void uart_init (int baudrate )
4646
delay(150);
4747
put32(GPPUDCLK0,0);
4848

49-
put32(AUX_ENABLES,1); //Enable mini uart (this also enables access to it registers)
49+
put32(AUX_ENABLES,1); //Enable mini uart (this also enables access to its registers)
5050
put32(AUX_MU_CNTL_REG,0); //Disable auto flow control and disable receiver and transmitter (for now)
5151
put32(AUX_MU_IER_REG,0); //Disable receive and transmit interrupts
5252
put32(AUX_MU_LCR_REG,3); //Enable 8 bit mode

exercises/lesson01/1/rs/src/mini_uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void uart_init(void) {
4141
put32(GPPUDCLK0, 0);
4242

4343
put32(AUX_ENABLES, 1); // Enable mini uart
44-
// (this also enables access to it registers)
44+
// (this also enables access to its registers)
4545
put32(AUX_MU_CNTL_REG, 0); // Disable auto flow control and disable receiver
4646
// and transmitter (for now)
4747
put32(AUX_MU_IER_REG, 0); // Disable receive and transmit interrupts

exercises/lesson01/1/stefanji/src/mini_uart.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
void uart_send ( char c )
66
{
77
while(1) {
8-
if(get32(AUX_MU_LSR_REG)&0x20)
8+
if(get32(AUX_MU_LSR_REG)&0x20)
99
break;
1010
}
1111
put32(AUX_MU_IO_REG,c);
@@ -14,7 +14,7 @@ void uart_send ( char c )
1414
char uart_recv ( void )
1515
{
1616
while(1) {
17-
if(get32(AUX_MU_LSR_REG)&0x01)
17+
if(get32(AUX_MU_LSR_REG)&0x01)
1818
break;
1919
}
2020
return(get32(AUX_MU_IO_REG)&0xFF);
@@ -44,7 +44,7 @@ void uart_init (unsigned int rate)
4444
delay(150);
4545
put32(GPPUDCLK0,0);
4646

47-
put32(AUX_ENABLES,1); //Enable mini uart (this also enables access to it registers)
47+
put32(AUX_ENABLES,1); //Enable mini uart (this also enables access to its registers)
4848
put32(AUX_MU_CNTL_REG,0); //Disable auto flow control and disable receiver and transmitter (for now)
4949
put32(AUX_MU_IER_REG,0); //Disable receive and transmit interrupts
5050
put32(AUX_MU_LCR_REG,3); //Enable 8 bit mode

0 commit comments

Comments
 (0)