// ----- Functions ----- | // ----- Functions ----- | ||||
void initCLI() | |||||
void init_cli() | |||||
{ | { | ||||
} | } | ||||
// ----- Functions and Corresponding Function Aliases ----- | // ----- Functions and Corresponding Function Aliases ----- | ||||
void initCLI(); | |||||
void init_cli(); | |||||
#include <stdint.h> | #include <stdint.h> | ||||
#include <stddef.h> | #include <stddef.h> | ||||
#include "usb_com.h" | |||||
#include "output_com.h" | |||||
#define ENDPOINT_UNUSED 0x00 | #define ENDPOINT_UNUSED 0x00 | ||||
#define ENDPOINT_TRANSIMIT_ONLY 0x15 | #define ENDPOINT_TRANSIMIT_ONLY 0x15 |
#define USBkeyboard_h_ | #define USBkeyboard_h_ | ||||
#include <inttypes.h> | #include <inttypes.h> | ||||
#include "usb_com.h" | |||||
#include "output_com.h" | |||||
uint8_t usb_keyboard_send(void); | uint8_t usb_keyboard_send(void); | ||||
#define usb_serial_h__ | #define usb_serial_h__ | ||||
#include <stdint.h> | #include <stdint.h> | ||||
#include "usb_com.h" | |||||
#include "output_com.h" | |||||
void usb_init(void); // initialize everything | void usb_init(void); // initialize everything | ||||
uint8_t usb_configured(void); // is the USB port configured | uint8_t usb_configured(void); // is the USB port configured |
// ----- Functions ----- | // ----- Functions ----- | ||||
// USB Module Setup | // USB Module Setup | ||||
inline void usb_setup(void) | |||||
inline void output_setup(void) | |||||
{ | { | ||||
// Initialize the USB, and then wait for the host to set configuration. | // Initialize the USB, and then wait for the host to set configuration. | ||||
// If the Teensy is powered without a PC connected to the USB port, | // If the Teensy is powered without a PC connected to the USB port, |
// ----- Functions ----- | // ----- Functions ----- | ||||
void usb_setup(void); | |||||
void usb_send(void); | |||||
void output_setup(void); | |||||
#endif | #endif | ||||
// Project Includes | // Project Includes | ||||
#include <macro.h> | #include <macro.h> | ||||
#include <scan_loop.h> | #include <scan_loop.h> | ||||
#include <usb_com.h> | |||||
#include <output_com.h> | |||||
#include <led.h> | #include <led.h> | ||||
#include <print.h> | #include <print.h> | ||||
pinSetup(); | pinSetup(); | ||||
init_errorLED(); | init_errorLED(); | ||||
// Setup USB Module | |||||
usb_setup(); | |||||
// Setup Output Module | |||||
output_setup(); | |||||
// Enable CLI | |||||
init_cli(); | |||||
// Setup ISR Timer for flagging a kepress send to USB | // Setup ISR Timer for flagging a kepress send to USB | ||||
usbTimerSetup(); | usbTimerSetup(); |