mirror of
https://github.com/sergeyyarkov/avr128da48_web-serial-example.git
synced 2026-10-11 18:28:58 +03:00
refactored
This commit is contained in:
parent
f80eff343f
commit
33dd0cbd7a
Binary file not shown.
Binary file not shown.
@ -15,10 +15,7 @@ build/default/production/main.o.d build/default/production/main.o: main.c \
|
|||||||
/opt/microchip/xc8/v2.36/avr/avr/include/avr/lock.h \
|
/opt/microchip/xc8/v2.36/avr/avr/include/avr/lock.h \
|
||||||
/opt/microchip/xc8/v2.36/avr/avr/include/avr/interrupt.h \
|
/opt/microchip/xc8/v2.36/avr/avr/include/avr/interrupt.h \
|
||||||
/opt/microchip/xc8/v2.36/avr/avr/include/string.h constants.h command.h \
|
/opt/microchip/xc8/v2.36/avr/avr/include/string.h constants.h command.h \
|
||||||
usart.h /opt/microchip/xc8/v2.36/avr/avr/include/stdio.h \
|
usart.h /opt/microchip/xc8/v2.36/avr/avr/include/stdio.h
|
||||||
/opt/microchip/xc8/v2.36/avr/avr/include/util/delay.h \
|
|
||||||
/opt/microchip/xc8/v2.36/avr/avr/include/util/delay_basic.h \
|
|
||||||
/opt/microchip/xc8/v2.36/avr/avr/include/math.h
|
|
||||||
|
|
||||||
/opt/microchip/xc8/v2.36/avr/avr/include/avr/io.h:
|
/opt/microchip/xc8/v2.36/avr/avr/include/avr/io.h:
|
||||||
|
|
||||||
@ -59,9 +56,3 @@ command.h:
|
|||||||
usart.h:
|
usart.h:
|
||||||
|
|
||||||
/opt/microchip/xc8/v2.36/avr/avr/include/stdio.h:
|
/opt/microchip/xc8/v2.36/avr/avr/include/stdio.h:
|
||||||
|
|
||||||
/opt/microchip/xc8/v2.36/avr/avr/include/util/delay.h:
|
|
||||||
|
|
||||||
/opt/microchip/xc8/v2.36/avr/avr/include/util/delay_basic.h:
|
|
||||||
|
|
||||||
/opt/microchip/xc8/v2.36/avr/avr/include/math.h:
|
|
||||||
|
|||||||
@ -4,7 +4,6 @@
|
|||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define EOT 0x04
|
|
||||||
#define COMMAND_SIZE 5
|
#define COMMAND_SIZE 5
|
||||||
#define COMMAND_MAX_NAME_LENGTH 20
|
#define COMMAND_MAX_NAME_LENGTH 20
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
#define F_CPU 4000000UL
|
#define F_CPU 4000000UL
|
||||||
#define BAUD_RATE 9600
|
#define BAUD_RATE 9600
|
||||||
#define BUFFER_SIZE 20
|
#define BUFFER_SIZE 20
|
||||||
|
#define EOT 0x04
|
||||||
|
|
||||||
#endif /* CONSTANTS_H */
|
#endif /* CONSTANTS_H */
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -431,12 +431,12 @@ END GROUP
|
|||||||
.debug_pubnames
|
.debug_pubnames
|
||||||
*(.debug_pubnames)
|
*(.debug_pubnames)
|
||||||
|
|
||||||
.debug_info 0x0000000000000000 0x4097
|
.debug_info 0x0000000000000000 0x408e
|
||||||
*(.debug_info .gnu.linkonce.wi.*)
|
*(.debug_info .gnu.linkonce.wi.*)
|
||||||
.debug_info 0x0000000000000000 0x2c24 /opt/microchip/mplabx/v6.00/packs/Microchip/AVR-Dx_DFP/1.10.124/xc8/avr/lib/avrxmega4/memx-const/mapped/crtavr128da48.o
|
.debug_info 0x0000000000000000 0x2c24 /opt/microchip/mplabx/v6.00/packs/Microchip/AVR-Dx_DFP/1.10.124/xc8/avr/lib/avrxmega4/memx-const/mapped/crtavr128da48.o
|
||||||
.debug_info 0x0000000000002c24 0x828 build/default/production/main.o
|
.debug_info 0x0000000000002c24 0x81f build/default/production/main.o
|
||||||
.debug_info 0x000000000000344c 0x6cf build/default/production/usart.o
|
.debug_info 0x0000000000003443 0x6cf build/default/production/usart.o
|
||||||
.debug_info 0x0000000000003b1b 0x57c build/default/production/command.o
|
.debug_info 0x0000000000003b12 0x57c build/default/production/command.o
|
||||||
|
|
||||||
.debug_abbrev 0x0000000000000000 0x2e21
|
.debug_abbrev 0x0000000000000000 0x2e21
|
||||||
*(.debug_abbrev)
|
*(.debug_abbrev)
|
||||||
|
|||||||
@ -4,7 +4,6 @@
|
|||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "usart.h"
|
#include "usart.h"
|
||||||
#include <util/delay.h>
|
|
||||||
|
|
||||||
char buffer[BUFFER_SIZE];
|
char buffer[BUFFER_SIZE];
|
||||||
volatile uint8_t buff_idx = 0;
|
volatile uint8_t buff_idx = 0;
|
||||||
|
|||||||
@ -2,6 +2,11 @@
|
|||||||
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
||||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
||||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||||
<group/>
|
<group>
|
||||||
|
<file>file:/home/sergeyyarkov/Documents/Applications/avr128da48_web-serial-example/firmware/main.c</file>
|
||||||
|
<file>file:/home/sergeyyarkov/Documents/Applications/avr128da48_web-serial-example/firmware/constants.h</file>
|
||||||
|
<file>file:/home/sergeyyarkov/Documents/Applications/avr128da48_web-serial-example/firmware/usart.h</file>
|
||||||
|
<file>file:/home/sergeyyarkov/Documents/Applications/avr128da48_web-serial-example/firmware/usart.c</file>
|
||||||
|
</group>
|
||||||
</open-files>
|
</open-files>
|
||||||
</project-private>
|
</project-private>
|
||||||
|
|||||||
@ -11,7 +11,7 @@ void USART1_Initialize(void) {
|
|||||||
PORTC.DIRSET = PIN0_bm;
|
PORTC.DIRSET = PIN0_bm;
|
||||||
PORTC.DIRCLR = PIN1_bm;
|
PORTC.DIRCLR = PIN1_bm;
|
||||||
|
|
||||||
/* enable reveice complete interrupt */
|
/* enable receive complete interrupt */
|
||||||
USART1.CTRLA = USART_RXCIE_bm;
|
USART1.CTRLA = USART_RXCIE_bm;
|
||||||
|
|
||||||
/* enable transmitter and receiver */
|
/* enable transmitter and receiver */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user