Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
avrkurs
avrkurs
Commits
0c90220f
Commit
0c90220f
authored
Mar 15, 2017
by
Petter Breedveld
Browse files
Finished debug demo
parent
4581531c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Debugger_Demo/Debugger_Demo/main.c
View file @
0c90220f
...
...
@@ -31,7 +31,7 @@ void uart_init(unsigned long baud){
USART0
.
BAUD
=
baud
;
//Set baudrate
USART0
.
CTRLB
|=
(
1
<<
USART_RXEN_bp
)
|
(
1
<<
USART_TXEN_bp
);
//Enable RX and TX
USART0
.
CTRLA
|=
(
1
<<
USART_RXCIE_bp
);
//Enable interupts on RX
USART0
.
CTRLA
|=
(
1
<<
USART_RXCIE_bp
);
//Enable inter
r
upts on RX
fdevopen
(
uart_transmit
,
NULL
);
//Allows the use of printf()
...
...
@@ -54,7 +54,8 @@ int main(void)
while
(
1
)
{
uart_transmit
(
'O'
,
NULL
);
printf
(
"Pizza <3
\r\n
"
);
_delay_ms
(
1000
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment