aboutsummaryrefslogtreecommitdiffstats
path: root/src/avr/usbserial.c
Commit message (Collapse)AuthorAgeFilesLines
* usb_cdc: Add support for detecting a USB level Arduino bootloader requestKevin O'Connor2018-12-241-0/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Add initial support for atmega32u4 chipsKevin O'Connor2018-11-201-5/+13
| | | | | Signed-off-by: Trevor Jones <trevorjones141@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Disable usb serial interrupts while processing dataKevin O'Connor2018-10-021-6/+10
| | | | | | | There's no need to keep taking interrupts if the high-level code is busy processing messages. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: No need to reset ep0 interrupts on a shutdownKevin O'Connor2018-10-021-7/+0
| | | | | | | The usb_cdc code will arrange to call usb_read_ep0_setup() after a shutdown, so no need to have an explicit shutdown handler. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Use generic usb_cdc code for usb serial supportKevin O'Connor2018-09-301-44/+223
| | | | | | | Use the generic usb_cdc driver code instead of the "pjrc" usb driver code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* command: Add command_find_and_dispatch() helperKevin O'Connor2018-05-281-4/+2
| | | | | | | Add a helper function that calls command_find_block() followed by command_dispatch(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* command: Add a command_encode_and_frame() helperKevin O'Connor2018-05-281-2/+1
| | | | | | | Add a helper function that calls command_encodef() followed by command_add_frame(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* command: Prefer uint8_t* for buffers; prefer uint8_fast_t for lengthsKevin O'Connor2018-05-281-4/+3
| | | | | | | | | Prefer using 'uint8_t' buffers as it is too easy to run into C sign extension problems with 'char' buffers. Prefer using 'uint_fast8_t' for buffer lengths as gcc does a better job compiling them on 32bit mcus. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* command: Don't pass max_size to command_encodef()Kevin O'Connor2017-08-141-12/+7
| | | | | | | | | The command_encodef() can read the max_size parameter directly from the 'struct command_encoder' passed into it. Also, there is no need to check that a message will fit in a buffer if the buffer is declared to be MESSAGE_MAX in size. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sched: Introduce sched_wake_tasks() function to wake up tasksKevin O'Connor2017-08-081-1/+3
| | | | | | | | Add function to indicate when tasks need to be run. This will allow the scheduler code to know if there are any tasks that need to be processed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Integrate usb serial console functionsKevin O'Connor2017-06-291-32/+16
| | | | | | | | Now that console_get_input(), console_pop_input(), console_get_output() and console_push_output() are local functions, integrate them into their callers. This simplifies the code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* command: Move low-level sendf transmission into board codeKevin O'Connor2017-06-291-2/+17
| | | | | | | | Export a new console_sendf() function from the board code instead of console_get_output() and console_push_output(). This enables more flexibility in how the board specific code produces output. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* command: Move command_task() to board specific codeKevin O'Connor2017-06-291-2/+16
| | | | | | | | Move the command_task() code from the generic code to the board specific code. This enables more flexibility in how the board specific code processes input. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Use compile_time_request system for init, tasks, and shutdownKevin O'Connor2017-05-261-1/+1
| | | | | | | | Avoid using linker magic to define the init, task, and shutdown functions. Instead, use the compile_time_request system. This simplifies the build and produces more efficient code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Initial support for Atmel AT90USB1286 mcuKevin O'Connor2016-06-051-0/+65
Add GPIO definitions for the AT90USB1286. Add code for communicating over USB port on AT90USB1286. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>