├── LUFA ├── Common │ ├── Attributes.h │ ├── BoardTypes.h │ └── Common.h ├── Documentation │ └── html │ │ ├── Author.jpg │ │ ├── LUFA.png │ │ ├── _a_d_c_8h.html │ │ ├── _a_v_r_u4_u6_u7_2_a_d_c_8h.html │ │ ├── _a_v_r_u4_u6_u7_2_t_w_i_8h.html │ │ ├── _about_l_u_f_a_8txt.html │ │ ├── _alternative_stacks_8txt.html │ │ ├── _attributes_8h.html │ │ ├── _audio_8h.html │ │ ├── _board_types_8h.html │ │ ├── _building_linkable_libraries_8txt.html │ │ ├── _c_d_c_8h.html │ │ ├── _change_log_8txt.html │ │ ├── _common_2_audio_8h.html │ │ ├── _common_2_c_d_c_8h.html │ │ ├── _common_2_h_i_d_8h.html │ │ ├── _common_2_m_i_d_i_8h.html │ │ ├── _common_2_mass_storage_8h.html │ │ ├── _common_2_printer_8h.html │ │ ├── _common_2_r_n_d_i_s_8h.html │ │ ├── _common_2_still_image_8h.html │ │ ├── _common_8h.html │ │ ├── _compile_time_tokens_8txt.html │ │ ├── _compiling_apps_8txt.html │ │ ├── _config_descriptor_8h.html │ │ ├── _configuring_apps_8txt.html │ │ ├── _developing_with_l_u_f_a_8txt.html │ │ ├── _device_2_audio_8h.html │ │ ├── _device_2_c_d_c_8h.html │ │ ├── _device_2_h_i_d_8h.html │ │ ├── _device_2_m_i_d_i_8h.html │ │ ├── _device_2_mass_storage_8h.html │ │ ├── _device_2_r_n_d_i_s_8h.html │ │ ├── _device_8h.html │ │ ├── _device_standard_req_8h.html │ │ ├── _device_support_8txt.html │ │ ├── _directory_summaries_8txt.html │ │ ├── _donating_8txt.html │ │ ├── _driver_stubs_2_buttons_8h.html │ │ ├── _driver_stubs_2_dataflash_8h.html │ │ ├── _driver_stubs_2_joystick_8h.html │ │ ├── _driver_stubs_2_l_e_ds_8h.html │ │ ├── _drivers_2_board_2_a_t_a_v_r_u_s_b_r_f01_2_buttons_8h.html │ │ ├── _drivers_2_board_2_a_t_a_v_r_u_s_b_r_f01_2_l_e_ds_8h.html │ │ ├── _drivers_2_board_2_b_e_n_i_t_o_2_buttons_8h.html │ │ ├── _drivers_2_board_2_b_e_n_i_t_o_2_l_e_ds_8h.html │ │ ├── _drivers_2_board_2_b_u_m_b_l_e_b_2_buttons_8h.html │ │ ├── _drivers_2_board_2_b_u_m_b_l_e_b_2_joystick_8h.html │ │ ├── _drivers_2_board_2_b_u_m_b_l_e_b_2_l_e_ds_8h.html │ │ ├── _drivers_2_board_2_buttons_8h.html │ │ ├── _drivers_2_board_2_dataflash_8h.html │ │ ├── _drivers_2_board_2_e_v_k527_2_buttons_8h.html │ │ ├── _drivers_2_board_2_e_v_k527_2_dataflash_8h.html │ │ ├── _drivers_2_board_2_e_v_k527_2_joystick_8h.html │ │ ├── _drivers_2_board_2_e_v_k527_2_l_e_ds_8h.html │ │ ├── _drivers_2_board_2_j_m_d_b_u2_2_buttons_8h.html │ │ ├── _drivers_2_board_2_j_m_d_b_u2_2_l_e_ds_8h.html │ │ ├── _drivers_2_board_2_joystick_8h.html │ │ ├── _drivers_2_board_2_l_e_ds_8h.html │ │ ├── _drivers_2_board_2_r_z_u_s_b_s_t_i_c_k_2_l_e_ds_8h.html │ │ ├── _drivers_2_board_2_s_t_k525_2_buttons_8h.html │ │ ├── _drivers_2_board_2_s_t_k525_2_dataflash_8h.html │ │ ├── _drivers_2_board_2_s_t_k525_2_joystick_8h.html │ │ ├── _drivers_2_board_2_s_t_k525_2_l_e_ds_8h.html │ │ ├── _drivers_2_board_2_s_t_k526_2_buttons_8h.html │ │ ├── _drivers_2_board_2_s_t_k526_2_dataflash_8h.html │ │ ├── _drivers_2_board_2_s_t_k526_2_joystick_8h.html │ │ ├── _drivers_2_board_2_s_t_k526_2_l_e_ds_8h.html │ │ ├── _drivers_2_board_2_t_e_e_n_s_y_2_l_e_ds_8h.html │ │ ├── _drivers_2_board_2_u_s_b_k_e_y_2_buttons_8h.html │ │ ├── _drivers_2_board_2_u_s_b_k_e_y_2_dataflash_8h.html │ │ ├── _drivers_2_board_2_u_s_b_k_e_y_2_joystick_8h.html │ │ ├── _drivers_2_board_2_u_s_b_k_e_y_2_l_e_ds_8h.html │ │ ├── _drivers_2_board_2_u_s_b_t_i_n_y_m_k_i_i_2_buttons_8h.html │ │ ├── _drivers_2_board_2_u_s_b_t_i_n_y_m_k_i_i_2_l_e_ds_8h.html │ │ ├── _drivers_2_board_2_x_p_l_a_i_n_2_dataflash_8h.html │ │ ├── _drivers_2_board_2_x_p_l_a_i_n_2_l_e_ds_8h.html │ │ ├── _e_v_k527_2_a_t45_d_b321_c_8h.html │ │ ├── _endpoint_8h.html │ │ ├── _events_8h.html │ │ ├── _future_changes_8txt.html │ │ ├── _getting_started_8txt.html │ │ ├── _groups_8txt.html │ │ ├── _h_i_d_8h.html │ │ ├── _h_i_d_parser_8h.html │ │ ├── _h_i_d_report_data_8h.html │ │ ├── _host_2_c_d_c_8h.html │ │ ├── _host_2_h_i_d_8h.html │ │ ├── _host_2_m_i_d_i_8h.html │ │ ├── _host_2_mass_storage_8h.html │ │ ├── _host_2_printer_8h.html │ │ ├── _host_2_r_n_d_i_s_8h.html │ │ ├── _host_2_still_image_8h.html │ │ ├── _host_8h.html │ │ ├── _host_standard_req_8h.html │ │ ├── _l_u_f_a_powered_projects_8txt.html │ │ ├── _l_u_f_avs_atmel_stack_8txt.html │ │ ├── _library_apps_8txt.html │ │ ├── _library_resources_8txt.html │ │ ├── _license_info_8txt.html │ │ ├── _m_i_d_i_8h.html │ │ ├── _main_page_8txt.html │ │ ├── _mass_storage_8h.html │ │ ├── _migration_information_8txt.html │ │ ├── _o_t_g_8h.html │ │ ├── _page__about_l_u_f_a.html │ │ ├── _page__alternative_stacks.html │ │ ├── _page__build_library.html │ │ ├── _page__change_log.html │ │ ├── _page__compiling_apps.html │ │ ├── _page__configuring_apps.html │ │ ├── _page__developing_with_l_u_f_a.html │ │ ├── _page__device_support.html │ │ ├── _page__donating.html │ │ ├── _page__future_changes.html │ │ ├── _page__getting_started.html │ │ ├── _page__l_u_f_a_powered_projects.html │ │ ├── _page__l_u_f_avs_atmel_stack.html │ │ ├── _page__library_apps.html │ │ ├── _page__license_info.html │ │ ├── _page__migration.html │ │ ├── _page__programming_apps.html │ │ ├── _page__resources.html │ │ ├── _page__scheduler_overview.html │ │ ├── _page__software_bootloader_start.html │ │ ├── _page__token_summary.html │ │ ├── _page__v_i_d_p_i_d.html │ │ ├── _page__why_use_l_u_f_a.html │ │ ├── _page__writing_board_drivers.html │ │ ├── _pipe_8h.html │ │ ├── _printer_8h.html │ │ ├── _programming_apps_8txt.html │ │ ├── _r_n_d_i_s_8h.html │ │ ├── _r_n_d_i_s_constants_8h.html │ │ ├── _s_p_i_8h.html │ │ ├── _s_t_k525_2_a_t45_d_b321_c_8h.html │ │ ├── _s_t_k526_2_a_t45_d_b642_d_8h.html │ │ ├── _scheduler_8h.html │ │ ├── _scheduler_overview_8txt.html │ │ ├── _serial_8h.html │ │ ├── _serial_stream_8h.html │ │ ├── _software_bootloader_jump_8txt.html │ │ ├── _std_descriptors_8h.html │ │ ├── _std_request_type_8h.html │ │ ├── _still_image_8h.html │ │ ├── _stream_callbacks_8h.html │ │ ├── _t_w_i_8h.html │ │ ├── _temperature_8h.html │ │ ├── _terminal_codes_8h.html │ │ ├── _u_s_b_8h.html │ │ ├── _u_s_b_controller_8h.html │ │ ├── _u_s_b_interrupt_8h.html │ │ ├── _u_s_b_k_e_y_2_a_t45_d_b642_d_8h.html │ │ ├── _u_s_b_mode_8h.html │ │ ├── _u_s_b_task_8h.html │ │ ├── _v_i_d_and_p_i_d_values_8txt.html │ │ ├── _version_8h.html │ │ ├── _why_use_l_u_f_a_8txt.html │ │ ├── _writing_board_drivers_8txt.html │ │ ├── _x_p_l_a_i_n_2_a_t45_d_b642_d_8h.html │ │ ├── annotated.html │ │ ├── bc_s.png │ │ ├── classes.html │ │ ├── closed.png │ │ ├── deprecated.html │ │ ├── dir_0723ed730419376eb69d0088dd200a0b.html │ │ ├── dir_0d4ec63bf100f332888273f0a306d57e.html │ │ ├── dir_2777733a8df79043e0870d714d0f36fa.html │ │ ├── dir_344ee400afb10815bde6b1ca5a0bf617.html │ │ ├── dir_4219f084473eb349dcd7e352c8c750d8.html │ │ ├── dir_433593efa32a8163edb75ef4cb38a9fa.html │ │ ├── dir_441b29cf22b3e8f35e0606500bd20b66.html │ │ ├── dir_4829951572cc130e0a0b629ab2a69a17.html │ │ ├── dir_5f3efc7fb0fe7b1413cb79904b6f438a.html │ │ ├── dir_79d0079dc4a803d35e39d58bbc4f01b0.html │ │ ├── dir_7a59b1cf324a39f44fed0e9745c41013.html │ │ ├── dir_825d563f9501f6a96751725902172788.html │ │ ├── dir_82c7b043fbacc679131b658973a0fcd7.html │ │ ├── dir_882f28f26dd7a20418eb42c424470392.html │ │ ├── dir_8a0fa50825a4c273e51552ef3841b448.html │ │ ├── dir_8ddb23a55634b26254c7a71ef9c65e4e.html │ │ ├── dir_90cb472b1d06cd90fe8c3ca9eb616fa8.html │ │ ├── dir_940a4de2d653e698dee55299e48184ba.html │ │ ├── dir_9541ea518ff8c894e4e234bd22aed3d8.html │ │ ├── dir_9bb7feb6272d6178f35bfe6bd3f44d7e.html │ │ ├── dir_9c3ddd34da0c3c8bc514dddeb8fed137.html │ │ ├── dir_9d073d7caf6fb75ffe53ac3382dc0f45.html │ │ ├── dir_a16db90bf5d90374b1e04ce33e915e91.html │ │ ├── dir_c7d257928c7e1ef90bd1720a73cf84ad.html │ │ ├── dir_cbc145ba02ef25705f83f3a8b6935b26.html │ │ ├── dir_dc5481a2950904f193755737d227659c.html │ │ ├── dir_df6bc5fef39d2b5f03af69974fbd773e.html │ │ ├── dirs.html │ │ ├── doxygen.css │ │ ├── doxygen.png │ │ ├── files.html │ │ ├── ftv2blank.png │ │ ├── ftv2doc.png │ │ ├── ftv2folderclosed.png │ │ ├── ftv2folderopen.png │ │ ├── ftv2lastnode.png │ │ ├── ftv2link.png │ │ ├── ftv2mlastnode.png │ │ ├── ftv2mnode.png │ │ ├── ftv2node.png │ │ ├── ftv2plastnode.png │ │ ├── ftv2pnode.png │ │ ├── ftv2splitbar.png │ │ ├── ftv2vertline.png │ │ ├── functions.html │ │ ├── functions_0x62.html │ │ ├── functions_0x63.html │ │ ├── functions_0x64.html │ │ ├── functions_0x65.html │ │ ├── functions_0x66.html │ │ ├── functions_0x67.html │ │ ├── functions_0x68.html │ │ ├── functions_0x69.html │ │ ├── functions_0x6a.html │ │ ├── functions_0x6b.html │ │ ├── functions_0x6c.html │ │ ├── functions_0x6d.html │ │ ├── functions_0x6e.html │ │ ├── functions_0x6f.html │ │ ├── functions_0x70.html │ │ ├── functions_0x72.html │ │ ├── functions_0x73.html │ │ ├── functions_0x74.html │ │ ├── functions_0x75.html │ │ ├── functions_0x76.html │ │ ├── functions_0x77.html │ │ ├── functions_0x78.html │ │ ├── functions_0x79.html │ │ ├── functions_vars.html │ │ ├── functions_vars_0x62.html │ │ ├── functions_vars_0x63.html │ │ ├── functions_vars_0x64.html │ │ ├── functions_vars_0x65.html │ │ ├── functions_vars_0x66.html │ │ ├── functions_vars_0x67.html │ │ ├── functions_vars_0x68.html │ │ ├── functions_vars_0x69.html │ │ ├── functions_vars_0x6a.html │ │ ├── functions_vars_0x6b.html │ │ ├── functions_vars_0x6c.html │ │ ├── functions_vars_0x6d.html │ │ ├── functions_vars_0x6e.html │ │ ├── functions_vars_0x6f.html │ │ ├── functions_vars_0x70.html │ │ ├── functions_vars_0x72.html │ │ ├── functions_vars_0x73.html │ │ ├── functions_vars_0x74.html │ │ ├── functions_vars_0x75.html │ │ ├── functions_vars_0x76.html │ │ ├── functions_vars_0x77.html │ │ ├── functions_vars_0x78.html │ │ ├── functions_vars_0x79.html │ │ ├── globals.html │ │ ├── globals_0x62.html │ │ ├── globals_0x63.html │ │ ├── globals_0x64.html │ │ ├── globals_0x65.html │ │ ├── globals_0x66.html │ │ ├── globals_0x68.html │ │ ├── globals_0x69.html │ │ ├── globals_0x6a.html │ │ ├── globals_0x6c.html │ │ ├── globals_0x6d.html │ │ ├── globals_0x6e.html │ │ ├── globals_0x6f.html │ │ ├── globals_0x70.html │ │ ├── globals_0x72.html │ │ ├── globals_0x73.html │ │ ├── globals_0x74.html │ │ ├── globals_0x75.html │ │ ├── globals_0x76.html │ │ ├── globals_defs.html │ │ ├── globals_defs_0x62.html │ │ ├── globals_defs_0x63.html │ │ ├── globals_defs_0x64.html │ │ ├── globals_defs_0x65.html │ │ ├── globals_defs_0x66.html │ │ ├── globals_defs_0x68.html │ │ ├── globals_defs_0x69.html │ │ ├── globals_defs_0x6a.html │ │ ├── globals_defs_0x6c.html │ │ ├── globals_defs_0x6d.html │ │ ├── globals_defs_0x6e.html │ │ ├── globals_defs_0x6f.html │ │ ├── globals_defs_0x70.html │ │ ├── globals_defs_0x72.html │ │ ├── globals_defs_0x73.html │ │ ├── globals_defs_0x74.html │ │ ├── globals_defs_0x75.html │ │ ├── globals_defs_0x76.html │ │ ├── globals_enum.html │ │ ├── globals_eval.html │ │ ├── globals_func.html │ │ ├── globals_func_0x62.html │ │ ├── globals_func_0x63.html │ │ ├── globals_func_0x64.html │ │ ├── globals_func_0x65.html │ │ ├── globals_func_0x68.html │ │ ├── globals_func_0x6a.html │ │ ├── globals_func_0x6c.html │ │ ├── globals_func_0x6d.html │ │ ├── globals_func_0x70.html │ │ ├── globals_func_0x72.html │ │ ├── globals_func_0x73.html │ │ ├── globals_func_0x74.html │ │ ├── globals_func_0x75.html │ │ ├── globals_type.html │ │ ├── globals_vars.html │ │ ├── group___group___a_d_c.html │ │ ├── group___group___a_d_c___a_v_r_u4_u6_u7.html │ │ ├── group___group___bit_manip.html │ │ ├── group___group___board_drivers.html │ │ ├── group___group___board_types.html │ │ ├── group___group___buttons.html │ │ ├── group___group___buttons___a_t_a_v_r_u_s_b_r_f01.html │ │ ├── group___group___buttons___b_e_n_i_t_o.html │ │ ├── group___group___buttons___b_u_m_b_l_e_b.html │ │ ├── group___group___buttons___e_v_k527.html │ │ ├── group___group___buttons___j_m_d_b_u2.html │ │ ├── group___group___buttons___s_t_k525.html │ │ ├── group___group___buttons___s_t_k526.html │ │ ├── group___group___buttons___u_s_b_k_e_y.html │ │ ├── group___group___buttons___u_s_b_t_i_n_y_m_k_i_i.html │ │ ├── group___group___common.html │ │ ├── group___group___config_descriptor_parser.html │ │ ├── group___group___dataflash.html │ │ ├── group___group___dataflash___e_v_k527.html │ │ ├── group___group___dataflash___e_v_k527___a_t45_d_b321_c.html │ │ ├── group___group___dataflash___s_t_k525.html │ │ ├── group___group___dataflash___s_t_k525___a_t45_d_b321_c.html │ │ ├── group___group___dataflash___s_t_k526.html │ │ ├── group___group___dataflash___s_t_k526___a_t45_d_b642_d.html │ │ ├── group___group___dataflash___u_s_b_k_e_y.html │ │ ├── group___group___dataflash___u_s_b_k_e_y___a_t45_d_b642_d.html │ │ ├── group___group___dataflash___x_p_l_a_i_n.html │ │ ├── group___group___dataflash___x_p_l_a_i_n___a_t45_d_b642_d.html │ │ ├── group___group___debugging.html │ │ ├── group___group___descriptors.html │ │ ├── group___group___device.html │ │ ├── group___group___endpoint_management.html │ │ ├── group___group___endpoint_packet_management.html │ │ ├── group___group___endpoint_primitive_r_w.html │ │ ├── group___group___endpoint_r_w.html │ │ ├── group___group___endpoint_stream_r_w.html │ │ ├── group___group___events.html │ │ ├── group___group___g_c_c_attr.html │ │ ├── group___group___h_i_d_i_o_f_const.html │ │ ├── group___group___h_i_d_parser.html │ │ ├── group___group___host.html │ │ ├── group___group___joystick.html │ │ ├── group___group___joystick___b_u_m_b_l_e_b.html │ │ ├── group___group___joystick___e_v_k527.html │ │ ├── group___group___joystick___s_t_k525.html │ │ ├── group___group___joystick___s_t_k526.html │ │ ├── group___group___joystick___u_s_b_k_e_y.html │ │ ├── group___group___l_e_ds.html │ │ ├── group___group___l_e_ds___a_t_a_v_r_u_s_b_r_f01.html │ │ ├── group___group___l_e_ds___b_e_n_i_t_o.html │ │ ├── group___group___l_e_ds___b_u_m_b_l_e_b.html │ │ ├── group___group___l_e_ds___e_v_k527.html │ │ ├── group___group___l_e_ds___j_m_d_b_u2.html │ │ ├── group___group___l_e_ds___r_z_u_s_b_s_t_i_c_k.html │ │ ├── group___group___l_e_ds___s_t_k525.html │ │ ├── group___group___l_e_ds___s_t_k526.html │ │ ├── group___group___l_e_ds___t_e_e_n_s_y.html │ │ ├── group___group___l_e_ds___u_s_b_k_e_y.html │ │ ├── group___group___l_e_ds___u_s_b_t_i_n_y_m_k_i_i.html │ │ ├── group___group___l_e_ds___x_p_l_a_i_n.html │ │ ├── group___group___misc_drivers.html │ │ ├── group___group___o_t_g.html │ │ ├── group___group___peripheral_drivers.html │ │ ├── group___group___pipe_control_req.html │ │ ├── group___group___pipe_management.html │ │ ├── group___group___pipe_packet_management.html │ │ ├── group___group___pipe_primitive_r_w.html │ │ ├── group___group___pipe_r_w.html │ │ ├── group___group___pipe_stream_r_w.html │ │ ├── group___group___s_p_i.html │ │ ├── group___group___scheduler.html │ │ ├── group___group___serial.html │ │ ├── group___group___serial_stream.html │ │ ├── group___group___std_request.html │ │ ├── group___group___stream_callbacks.html │ │ ├── group___group___t_w_i.html │ │ ├── group___group___t_w_i___a_v_r_u4_u6_u7.html │ │ ├── group___group___temperature.html │ │ ├── group___group___terminal.html │ │ ├── group___group___u_s_b.html │ │ ├── group___group___u_s_b_class_audio.html │ │ ├── group___group___u_s_b_class_audio_common.html │ │ ├── group___group___u_s_b_class_audio_device.html │ │ ├── group___group___u_s_b_class_c_d_c.html │ │ ├── group___group___u_s_b_class_c_d_c_common.html │ │ ├── group___group___u_s_b_class_c_d_c_device.html │ │ ├── group___group___u_s_b_class_c_d_c_host.html │ │ ├── group___group___u_s_b_class_drivers.html │ │ ├── group___group___u_s_b_class_h_i_d.html │ │ ├── group___group___u_s_b_class_h_i_d_common.html │ │ ├── group___group___u_s_b_class_h_i_d_device.html │ │ ├── group___group___u_s_b_class_h_i_d_host.html │ │ ├── group___group___u_s_b_class_m_i_d_i.html │ │ ├── group___group___u_s_b_class_m_i_d_i_common.html │ │ ├── group___group___u_s_b_class_m_i_d_i_device.html │ │ ├── group___group___u_s_b_class_m_i_d_i_host.html │ │ ├── group___group___u_s_b_class_m_s.html │ │ ├── group___group___u_s_b_class_m_s_common.html │ │ ├── group___group___u_s_b_class_m_s_device.html │ │ ├── group___group___u_s_b_class_mass_storage_host.html │ │ ├── group___group___u_s_b_class_printer.html │ │ ├── group___group___u_s_b_class_printer_common.html │ │ ├── group___group___u_s_b_class_printer_host.html │ │ ├── group___group___u_s_b_class_r_n_d_i_s.html │ │ ├── group___group___u_s_b_class_r_n_d_i_s_common.html │ │ ├── group___group___u_s_b_class_r_n_d_i_s_device.html │ │ ├── group___group___u_s_b_class_r_n_d_i_s_host.html │ │ ├── group___group___u_s_b_class_s_i.html │ │ ├── group___group___u_s_b_class_s_i_common.html │ │ ├── group___group___u_s_b_class_still_image_host.html │ │ ├── group___group___u_s_b_management.html │ │ ├── group___group___u_s_b_mode.html │ │ ├── index.html │ │ ├── installdox │ │ ├── jquery.js │ │ ├── modules.html │ │ ├── nav_f.png │ │ ├── nav_h.png │ │ ├── navtree.css │ │ ├── navtree.js │ │ ├── open.png │ │ ├── pages.html │ │ ├── resize.js │ │ ├── search │ │ ├── all_61.html │ │ ├── all_62.html │ │ ├── all_63.html │ │ ├── all_64.html │ │ ├── all_65.html │ │ ├── all_66.html │ │ ├── all_67.html │ │ ├── all_68.html │ │ ├── all_69.html │ │ ├── all_6a.html │ │ ├── all_6b.html │ │ ├── all_6c.html │ │ ├── all_6d.html │ │ ├── all_6e.html │ │ ├── all_6f.html │ │ ├── all_70.html │ │ ├── all_72.html │ │ ├── all_73.html │ │ ├── all_74.html │ │ ├── all_75.html │ │ ├── all_76.html │ │ ├── all_77.html │ │ ├── all_78.html │ │ ├── all_79.html │ │ ├── classes_65.html │ │ ├── classes_68.html │ │ ├── classes_6d.html │ │ ├── classes_72.html │ │ ├── classes_73.html │ │ ├── classes_74.html │ │ ├── classes_75.html │ │ ├── close.png │ │ ├── defines_61.html │ │ ├── defines_62.html │ │ ├── defines_63.html │ │ ├── defines_64.html │ │ ├── defines_65.html │ │ ├── defines_66.html │ │ ├── defines_68.html │ │ ├── defines_69.html │ │ ├── defines_6a.html │ │ ├── defines_6c.html │ │ ├── defines_6d.html │ │ ├── defines_6e.html │ │ ├── defines_6f.html │ │ ├── defines_70.html │ │ ├── defines_72.html │ │ ├── defines_73.html │ │ ├── defines_74.html │ │ ├── defines_75.html │ │ ├── defines_76.html │ │ ├── enums_63.html │ │ ├── enums_64.html │ │ ├── enums_65.html │ │ ├── enums_68.html │ │ ├── enums_6d.html │ │ ├── enums_6e.html │ │ ├── enums_70.html │ │ ├── enums_72.html │ │ ├── enums_73.html │ │ ├── enums_75.html │ │ ├── enumvalues_63.html │ │ ├── enumvalues_64.html │ │ ├── enumvalues_65.html │ │ ├── enumvalues_68.html │ │ ├── enumvalues_6d.html │ │ ├── enumvalues_6e.html │ │ ├── enumvalues_70.html │ │ ├── enumvalues_72.html │ │ ├── enumvalues_73.html │ │ ├── enumvalues_75.html │ │ ├── files_61.html │ │ ├── files_62.html │ │ ├── files_63.html │ │ ├── files_64.html │ │ ├── files_65.html │ │ ├── files_66.html │ │ ├── files_67.html │ │ ├── files_68.html │ │ ├── files_6a.html │ │ ├── files_6c.html │ │ ├── files_6d.html │ │ ├── files_6f.html │ │ ├── files_70.html │ │ ├── files_72.html │ │ ├── files_73.html │ │ ├── files_74.html │ │ ├── files_75.html │ │ ├── files_76.html │ │ ├── files_77.html │ │ ├── functions_61.html │ │ ├── functions_62.html │ │ ├── functions_63.html │ │ ├── functions_64.html │ │ ├── functions_65.html │ │ ├── functions_68.html │ │ ├── functions_6a.html │ │ ├── functions_6c.html │ │ ├── functions_6d.html │ │ ├── functions_70.html │ │ ├── functions_72.html │ │ ├── functions_73.html │ │ ├── functions_74.html │ │ ├── functions_75.html │ │ ├── mag_sel.png │ │ ├── nomatches.html │ │ ├── search.css │ │ ├── search.js │ │ ├── search_l.png │ │ ├── search_m.png │ │ ├── search_r.png │ │ ├── typedefs_63.html │ │ ├── typedefs_73.html │ │ ├── typedefs_74.html │ │ ├── typedefs_75.html │ │ ├── variables_61.html │ │ ├── variables_62.html │ │ ├── variables_63.html │ │ ├── variables_64.html │ │ ├── variables_65.html │ │ ├── variables_66.html │ │ ├── variables_67.html │ │ ├── variables_68.html │ │ ├── variables_69.html │ │ ├── variables_6a.html │ │ ├── variables_6b.html │ │ ├── variables_6c.html │ │ ├── variables_6d.html │ │ ├── variables_6e.html │ │ ├── variables_6f.html │ │ ├── variables_70.html │ │ ├── variables_72.html │ │ ├── variables_73.html │ │ ├── variables_74.html │ │ ├── variables_75.html │ │ ├── variables_76.html │ │ ├── variables_77.html │ │ ├── variables_78.html │ │ └── variables_79.html │ │ ├── struct_ethernet___frame___info__t.html │ │ ├── struct_h_i_d___collection_path__t.html │ │ ├── struct_h_i_d___min_max__t.html │ │ ├── struct_h_i_d___report_info__t.html │ │ ├── struct_h_i_d___report_item___attributes__t.html │ │ ├── struct_h_i_d___report_item__t.html │ │ ├── struct_h_i_d___report_size_info__t.html │ │ ├── struct_h_i_d___unit__t.html │ │ ├── struct_h_i_d___usage__t.html │ │ ├── struct_m_a_c___address__t.html │ │ ├── struct_m_i_d_i___event_packet__t.html │ │ ├── struct_m_s___command_block_wrapper__t.html │ │ ├── struct_m_s___command_status_wrapper__t.html │ │ ├── struct_r_n_d_i_s___initialize___complete__t.html │ │ ├── struct_r_n_d_i_s___initialize___message__t.html │ │ ├── struct_r_n_d_i_s___keep_alive___complete__t.html │ │ ├── struct_r_n_d_i_s___keep_alive___message__t.html │ │ ├── struct_r_n_d_i_s___message___header__t.html │ │ ├── struct_r_n_d_i_s___packet___message__t.html │ │ ├── struct_r_n_d_i_s___query___complete__t.html │ │ ├── struct_r_n_d_i_s___query___message__t.html │ │ ├── struct_r_n_d_i_s___reset___complete__t.html │ │ ├── struct_r_n_d_i_s___set___complete__t.html │ │ ├── struct_r_n_d_i_s___set___message__t.html │ │ ├── struct_s_c_s_i___capacity__t.html │ │ ├── struct_s_c_s_i___inquiry___response__t.html │ │ ├── struct_s_c_s_i___request___sense___response__t.html │ │ ├── struct_s_i___p_i_m_a___container__t.html │ │ ├── struct_task_entry__t.html │ │ ├── struct_u_s_b___audio___feature_unit__t.html │ │ ├── struct_u_s_b___audio___format__t.html │ │ ├── struct_u_s_b___audio___input_terminal__t.html │ │ ├── struct_u_s_b___audio___interface___a_c__t.html │ │ ├── struct_u_s_b___audio___interface___a_s__t.html │ │ ├── struct_u_s_b___audio___output_terminal__t.html │ │ ├── struct_u_s_b___audio___sample_freq__t.html │ │ ├── struct_u_s_b___audio___stream_endpoint___spc__t.html │ │ ├── struct_u_s_b___audio___stream_endpoint___std__t.html │ │ ├── struct_u_s_b___class_info___audio___device__t.html │ │ ├── struct_u_s_b___class_info___c_d_c___device__t.html │ │ ├── struct_u_s_b___class_info___c_d_c___host__t.html │ │ ├── struct_u_s_b___class_info___h_i_d___device__t.html │ │ ├── struct_u_s_b___class_info___h_i_d___host__t.html │ │ ├── struct_u_s_b___class_info___m_i_d_i___device__t.html │ │ ├── struct_u_s_b___class_info___m_i_d_i___host__t.html │ │ ├── struct_u_s_b___class_info___m_s___device__t.html │ │ ├── struct_u_s_b___class_info___m_s___host__t.html │ │ ├── struct_u_s_b___class_info___p_r_n_t___host__t.html │ │ ├── struct_u_s_b___class_info___r_n_d_i_s___device__t.html │ │ ├── struct_u_s_b___class_info___r_n_d_i_s___host__t.html │ │ ├── struct_u_s_b___class_info___s_i___host__t.html │ │ ├── struct_u_s_b___descriptor___configuration___header__t.html │ │ ├── struct_u_s_b___descriptor___device__t.html │ │ ├── struct_u_s_b___descriptor___endpoint__t.html │ │ ├── struct_u_s_b___descriptor___header__t.html │ │ ├── struct_u_s_b___descriptor___interface___association__t.html │ │ ├── struct_u_s_b___descriptor___interface__t.html │ │ ├── struct_u_s_b___descriptor___string__t.html │ │ ├── struct_u_s_b___h_i_d___descriptor__t.html │ │ ├── struct_u_s_b___keyboard_report___data__t.html │ │ ├── struct_u_s_b___m_i_d_i___audio_interface___a_s__t.html │ │ ├── struct_u_s_b___m_i_d_i___in___jack__t.html │ │ ├── struct_u_s_b___m_i_d_i___jack___endpoint__t.html │ │ ├── struct_u_s_b___m_i_d_i___out___jack__t.html │ │ ├── struct_u_s_b___mouse_report___data__t.html │ │ ├── struct_u_s_b___request___header__t.html │ │ ├── struct_u_s_b___std_descriptor___configuration___header__t.html │ │ ├── struct_u_s_b___std_descriptor___device__t.html │ │ ├── struct_u_s_b___std_descriptor___endpoint__t.html │ │ ├── struct_u_s_b___std_descriptor___header__t.html │ │ ├── struct_u_s_b___std_descriptor___interface___association__t.html │ │ ├── struct_u_s_b___std_descriptor___interface__t.html │ │ ├── struct_u_s_b___std_descriptor___string__t.html │ │ ├── tab_a.png │ │ ├── tab_b.png │ │ ├── tab_h.png │ │ ├── tab_s.png │ │ └── tabs.css ├── Doxygen.conf ├── DriverStubs │ ├── Buttons.h │ ├── Dataflash.h │ ├── Joystick.h │ └── LEDs.h ├── Drivers │ ├── Board │ │ ├── ATAVRUSBRF01 │ │ │ ├── Buttons.h │ │ │ └── LEDs.h │ │ ├── BENITO │ │ │ ├── Buttons.h │ │ │ └── LEDs.h │ │ ├── BUMBLEB │ │ │ ├── Buttons.h │ │ │ ├── Joystick.h │ │ │ └── LEDs.h │ │ ├── Buttons.h │ │ ├── Dataflash.h │ │ ├── EVK527 │ │ │ ├── AT45DB321C.h │ │ │ ├── Buttons.h │ │ │ ├── Dataflash.h │ │ │ ├── Joystick.h │ │ │ └── LEDs.h │ │ ├── JMDBU2 │ │ │ ├── Buttons.h │ │ │ └── LEDs.h │ │ ├── Joystick.h │ │ ├── LEDs.h │ │ ├── RZUSBSTICK │ │ │ └── LEDs.h │ │ ├── STK525 │ │ │ ├── AT45DB321C.h │ │ │ ├── Buttons.h │ │ │ ├── Dataflash.h │ │ │ ├── Joystick.h │ │ │ └── LEDs.h │ │ ├── STK526 │ │ │ ├── AT45DB642D.h │ │ │ ├── Buttons.h │ │ │ ├── Dataflash.h │ │ │ ├── Joystick.h │ │ │ └── LEDs.h │ │ ├── TEENSY │ │ │ └── LEDs.h │ │ ├── Temperature.c │ │ ├── Temperature.h │ │ ├── USBKEY │ │ │ ├── AT45DB642D.h │ │ │ ├── Buttons.h │ │ │ ├── Dataflash.h │ │ │ ├── Joystick.h │ │ │ └── LEDs.h │ │ ├── USBTINYMKII │ │ │ ├── Buttons.h │ │ │ └── LEDs.h │ │ └── XPLAIN │ │ │ ├── AT45DB642D.h │ │ │ ├── Dataflash.h │ │ │ └── LEDs.h │ ├── Misc │ │ └── TerminalCodes.h │ ├── Peripheral │ │ ├── ADC.h │ │ ├── AVRU4U6U7 │ │ │ ├── ADC.h │ │ │ └── TWI.h │ │ ├── SPI.h │ │ ├── Serial.c │ │ ├── Serial.h │ │ ├── SerialStream.c │ │ ├── SerialStream.h │ │ ├── TWI.c │ │ └── TWI.h │ └── USB │ │ ├── Class │ │ ├── Audio.h │ │ ├── CDC.h │ │ ├── Common │ │ │ ├── Audio.h │ │ │ ├── CDC.h │ │ │ ├── HID.h │ │ │ ├── MIDI.h │ │ │ ├── MassStorage.h │ │ │ ├── Printer.h │ │ │ ├── RNDIS.h │ │ │ ├── RNDISConstants.h │ │ │ └── StillImage.h │ │ ├── Device │ │ │ ├── Audio.c │ │ │ ├── Audio.h │ │ │ ├── CDC.c │ │ │ ├── CDC.h │ │ │ ├── HID.c │ │ │ ├── HID.h │ │ │ ├── MIDI.c │ │ │ ├── MIDI.h │ │ │ ├── MassStorage.c │ │ │ ├── MassStorage.h │ │ │ ├── RNDIS.c │ │ │ └── RNDIS.h │ │ ├── HID.h │ │ ├── Host │ │ │ ├── CDC.c │ │ │ ├── CDC.h │ │ │ ├── HID.c │ │ │ ├── HID.h │ │ │ ├── HIDParser.c │ │ │ ├── HIDParser.h │ │ │ ├── HIDReportData.h │ │ │ ├── MIDI.c │ │ │ ├── MIDI.h │ │ │ ├── MassStorage.c │ │ │ ├── MassStorage.h │ │ │ ├── Printer.c │ │ │ ├── Printer.h │ │ │ ├── RNDIS.c │ │ │ ├── RNDIS.h │ │ │ ├── StillImage.c │ │ │ └── StillImage.h │ │ ├── MIDI.h │ │ ├── MassStorage.h │ │ ├── Printer.h │ │ ├── RNDIS.h │ │ └── StillImage.h │ │ ├── HighLevel │ │ ├── ConfigDescriptor.c │ │ ├── ConfigDescriptor.h │ │ ├── DeviceStandardReq.c │ │ ├── DeviceStandardReq.h │ │ ├── Events.c │ │ ├── Events.h │ │ ├── HostStandardReq.c │ │ ├── HostStandardReq.h │ │ ├── StdDescriptors.h │ │ ├── StdRequestType.h │ │ ├── StreamCallbacks.h │ │ ├── USBMode.h │ │ ├── USBTask.c │ │ └── USBTask.h │ │ ├── LowLevel │ │ ├── Device.c │ │ ├── Device.h │ │ ├── Endpoint.c │ │ ├── Endpoint.h │ │ ├── Host.c │ │ ├── Host.h │ │ ├── OTG.h │ │ ├── Pipe.c │ │ ├── Pipe.h │ │ ├── Template │ │ │ ├── Template_Endpoint_Control_R.c │ │ │ ├── Template_Endpoint_Control_W.c │ │ │ ├── Template_Endpoint_RW.c │ │ │ └── Template_Pipe_RW.c │ │ ├── USBController.c │ │ ├── USBController.h │ │ ├── USBInterrupt.c │ │ └── USBInterrupt.h │ │ └── USB.h ├── License.txt ├── ManPages │ ├── AboutLUFA.txt │ ├── AlternativeStacks.txt │ ├── Author.jpg │ ├── BuildingLinkableLibraries.txt │ ├── ChangeLog.txt │ ├── CompileTimeTokens.txt │ ├── CompilingApps.txt │ ├── ConfiguringApps.txt │ ├── DevelopingWithLUFA.txt │ ├── DeviceSupport.txt │ ├── DirectorySummaries.txt │ ├── Donating.txt │ ├── FutureChanges.txt │ ├── GettingStarted.txt │ ├── Groups.txt │ ├── LUFA.png │ ├── LUFAPoweredProjects.txt │ ├── LUFAvsAtmelStack.txt │ ├── LibraryApps.txt │ ├── LibraryResources.txt │ ├── LicenseInfo.txt │ ├── MainPage.txt │ ├── MigrationInformation.txt │ ├── ProgrammingApps.txt │ ├── SchedulerOverview.txt │ ├── SoftwareBootloaderJump.txt │ ├── VIDAndPIDValues.txt │ ├── WhyUseLUFA.txt │ └── WritingBoardDrivers.txt ├── Scheduler │ ├── Scheduler.c │ └── Scheduler.h ├── Version.h └── makefile ├── README.md ├── examples ├── big_joystick_demo.ino ├── joystick_usb_demo.ino ├── kbd_usb_demo.ino ├── midi_usb_demo.ino └── mouse_usb_demo.ino └── firmwares ├── Arduino-big-joystick.hex ├── Arduino-joystick.hex ├── Arduino-keyboard.hex ├── Arduino-mouse.hex ├── Arduino-usbmidi.hex ├── Arduino-usbserial.hex ├── README.txt ├── arduino-big-joystick ├── Arduino-big-joystick.c ├── Arduino-joystick.h ├── Board │ └── LEDs.h ├── Descriptors.c ├── Descriptors.h ├── Lib │ └── LightweightRingBuff.h ├── makefile └── readme.txt ├── arduino-joystick ├── Arduino-joystick.c ├── Arduino-joystick.h ├── Board │ └── LEDs.h ├── Descriptors.c ├── Descriptors.h ├── Lib │ └── LightweightRingBuff.h ├── makefile └── readme.txt ├── arduino-keyboard ├── Arduino-keyboard.c ├── Arduino-keyboard.h ├── Board │ └── LEDs.h ├── Descriptors.c ├── Descriptors.h ├── Lib │ └── LightweightRingBuff.h ├── makefile └── readme.txt ├── arduino-mouse ├── Arduino-mouse.c ├── Arduino-mouse.h ├── Board │ └── LEDs.h ├── Descriptors.c ├── Descriptors.h ├── Lib │ └── LightweightRingBuff.h ├── makefile └── readme.txt ├── arduino-usbmidi ├── Arduino-usbmidi.c ├── Arduino-usbmidi.h ├── Board │ └── LEDs.h ├── Descriptors.c ├── Descriptors.h ├── Lib │ └── LightweightRingBuff.h ├── MIDI.c ├── MIDI.h ├── makefile └── readme.txt └── arduino-usbserial ├── Arduino-usbserial-atmega16u2-Mega2560-Rev3.hex ├── Arduino-usbserial-atmega16u2-MegaADK-Rev3.hex ├── Arduino-usbserial-atmega16u2-Uno-Rev3.hex ├── Arduino-usbserial-mega.hex ├── Arduino-usbserial-uno.hex ├── Arduino-usbserial.c ├── Arduino-usbserial.h ├── Board └── LEDs.h ├── Descriptors.c ├── Descriptors.h ├── Lib └── LightweightRingBuff.h ├── makefile └── readme.txt /LUFA/Documentation/html/Author.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/Author.jpg -------------------------------------------------------------------------------- /LUFA/Documentation/html/LUFA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/LUFA.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/_page__change_log.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/_page__change_log.html -------------------------------------------------------------------------------- /LUFA/Documentation/html/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/bc_s.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/closed.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/doxygen.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/ftv2blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/ftv2blank.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/ftv2doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/ftv2doc.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/ftv2folderclosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/ftv2folderclosed.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/ftv2folderopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/ftv2folderopen.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/ftv2lastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/ftv2lastnode.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/ftv2link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/ftv2link.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/ftv2mlastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/ftv2mlastnode.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/ftv2mnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/ftv2mnode.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/ftv2node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/ftv2node.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/ftv2plastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/ftv2plastnode.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/ftv2pnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/ftv2pnode.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/ftv2splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/ftv2splitbar.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/ftv2vertline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/ftv2vertline.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/installdox: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | %subst = ( ); 4 | $quiet = 0; 5 | 6 | while ( @ARGV ) { 7 | $_ = shift @ARGV; 8 | if ( s/^-// ) { 9 | if ( /^l(.*)/ ) { 10 | $v = ($1 eq "") ? shift @ARGV : $1; 11 | ($v =~ /\/$/) || ($v .= "/"); 12 | $_ = $v; 13 | if ( /(.+)\@(.+)/ ) { 14 | if ( exists $subst{$1} ) { 15 | $subst{$1} = $2; 16 | } else { 17 | print STDERR "Unknown tag file $1 given with option -l\n"; 18 | &usage(); 19 | } 20 | } else { 21 | print STDERR "Argument $_ is invalid for option -l\n"; 22 | &usage(); 23 | } 24 | } 25 | elsif ( /^q/ ) { 26 | $quiet = 1; 27 | } 28 | elsif ( /^\?|^h/ ) { 29 | &usage(); 30 | } 31 | else { 32 | print STDERR "Illegal option -$_\n"; 33 | &usage(); 34 | } 35 | } 36 | else { 37 | push (@files, $_ ); 38 | } 39 | } 40 | 41 | foreach $sub (keys %subst) 42 | { 43 | if ( $subst{$sub} eq "" ) 44 | { 45 | print STDERR "No substitute given for tag file `$sub'\n"; 46 | &usage(); 47 | } 48 | elsif ( ! $quiet && $sub ne "_doc" && $sub ne "_cgi" ) 49 | { 50 | print "Substituting $subst{$sub} for each occurrence of tag file $sub\n"; 51 | } 52 | } 53 | 54 | if ( ! @files ) { 55 | if (opendir(D,".")) { 56 | foreach $file ( readdir(D) ) { 57 | $match = ".html"; 58 | next if ( $file =~ /^\.\.?$/ ); 59 | ($file =~ /$match/) && (push @files, $file); 60 | ($file =~ /\.svg/) && (push @files, $file); 61 | ($file =~ "navtree.js") && (push @files, $file); 62 | } 63 | closedir(D); 64 | } 65 | } 66 | 67 | if ( ! @files ) { 68 | print STDERR "Warning: No input files given and none found!\n"; 69 | } 70 | 71 | foreach $f (@files) 72 | { 73 | if ( ! $quiet ) { 74 | print "Editing: $f...\n"; 75 | } 76 | $oldf = $f; 77 | $f .= ".bak"; 78 | unless (rename $oldf,$f) { 79 | print STDERR "Error: cannot rename file $oldf\n"; 80 | exit 1; 81 | } 82 | if (open(F,"<$f")) { 83 | unless (open(G,">$oldf")) { 84 | print STDERR "Error: opening file $oldf for writing\n"; 85 | exit 1; 86 | } 87 | if ($oldf ne "tree.js") { 88 | while () { 89 | s/doxygen\=\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\" (xlink:href|href|src)=\"\2/doxygen\=\"$1:$subst{$1}\" \3=\"$subst{$1}/g; 90 | print G "$_"; 91 | } 92 | } 93 | else { 94 | while () { 95 | s/\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\", \"\2/\"$1:$subst{$1}\" ,\"$subst{$1}/g; 96 | print G "$_"; 97 | } 98 | } 99 | } 100 | else { 101 | print STDERR "Warning file $f does not exist\n"; 102 | } 103 | unlink $f; 104 | } 105 | 106 | sub usage { 107 | print STDERR "Usage: installdox [options] [html-file [html-file ...]]\n"; 108 | print STDERR "Options:\n"; 109 | print STDERR " -l tagfile\@linkName tag file + URL or directory \n"; 110 | print STDERR " -q Quiet mode\n\n"; 111 | exit 1; 112 | } 113 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/nav_f.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/nav_h.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/navtree.css: -------------------------------------------------------------------------------- 1 | #nav-tree .children_ul { 2 | margin:0; 3 | padding:4px; 4 | } 5 | 6 | #nav-tree ul { 7 | list-style:none outside none; 8 | margin:0px; 9 | padding:0px; 10 | } 11 | 12 | #nav-tree li { 13 | white-space:nowrap; 14 | margin:0px; 15 | padding:0px; 16 | } 17 | 18 | #nav-tree .plus { 19 | margin:0px; 20 | } 21 | 22 | #nav-tree .selected { 23 | background-image: url('tab_a.png'); 24 | background-repeat:repeat-x; 25 | color: #fff; 26 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 27 | } 28 | 29 | #nav-tree img { 30 | margin:0px; 31 | padding:0px; 32 | border:0px; 33 | vertical-align: middle; 34 | } 35 | 36 | #nav-tree a { 37 | text-decoration:none; 38 | padding:0px; 39 | margin:0px; 40 | outline:none; 41 | } 42 | 43 | #nav-tree .label { 44 | margin:0px; 45 | padding:0px; 46 | } 47 | 48 | #nav-tree .label a { 49 | padding:2px; 50 | } 51 | 52 | #nav-tree .selected a { 53 | text-decoration:none; 54 | padding:2px; 55 | margin:0px; 56 | color:#fff; 57 | } 58 | 59 | #nav-tree .children_ul { 60 | margin:0px; 61 | padding:0px; 62 | } 63 | 64 | #nav-tree .item { 65 | margin:0px; 66 | padding:0px; 67 | } 68 | 69 | #nav-tree { 70 | padding: 0px 0px; 71 | background-color: #FAFAFF; 72 | font-size:14px; 73 | overflow:auto; 74 | } 75 | 76 | #doc-content { 77 | overflow:auto; 78 | display:block; 79 | padding:0px; 80 | margin:0px; 81 | } 82 | 83 | #side-nav { 84 | padding:0 6px 0 0; 85 | margin: 0px; 86 | display:block; 87 | position: absolute; 88 | left: 0px; 89 | width: 300px; 90 | } 91 | 92 | .ui-resizable .ui-resizable-handle { 93 | display:block; 94 | } 95 | 96 | .ui-resizable-e { 97 | background:url("ftv2splitbar.png") repeat scroll right center transparent; 98 | cursor:e-resize; 99 | height:100%; 100 | right:0; 101 | top:0; 102 | width:6px; 103 | } 104 | 105 | .ui-resizable-handle { 106 | display:none; 107 | font-size:0.1px; 108 | position:absolute; 109 | z-index:1; 110 | } 111 | 112 | #nav-tree-contents { 113 | margin: 6px 0px 0px 0px; 114 | } 115 | 116 | #nav-tree { 117 | background-image:url('nav_h.png'); 118 | background-repeat:repeat-x; 119 | background-color: #F9FAFC; 120 | } 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/open.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/resize.js: -------------------------------------------------------------------------------- 1 | var cookie_namespace = 'doxygen'; 2 | var sidenav,navtree,content,header; 3 | 4 | function readCookie(cookie) 5 | { 6 | var myCookie = cookie_namespace+"_"+cookie+"="; 7 | if (document.cookie) 8 | { 9 | var index = document.cookie.indexOf(myCookie); 10 | if (index != -1) 11 | { 12 | var valStart = index + myCookie.length; 13 | var valEnd = document.cookie.indexOf(";", valStart); 14 | if (valEnd == -1) 15 | { 16 | valEnd = document.cookie.length; 17 | } 18 | var val = document.cookie.substring(valStart, valEnd); 19 | return val; 20 | } 21 | } 22 | return 0; 23 | } 24 | 25 | function writeCookie(cookie, val, expiration) 26 | { 27 | if (val==undefined) return; 28 | if (expiration == null) 29 | { 30 | var date = new Date(); 31 | date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week 32 | expiration = date.toGMTString(); 33 | } 34 | document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/"; 35 | } 36 | 37 | function resizeWidth() 38 | { 39 | var windowWidth = $(window).width() + "px"; 40 | var sidenavWidth = $(sidenav).width(); 41 | content.css({marginLeft:parseInt(sidenavWidth)+6+"px"}); //account for 6px-wide handle-bar 42 | writeCookie('width',sidenavWidth, null); 43 | } 44 | 45 | function restoreWidth(navWidth) 46 | { 47 | var windowWidth = $(window).width() + "px"; 48 | content.css({marginLeft:parseInt(navWidth)+6+"px"}); 49 | sidenav.css({width:navWidth + "px"}); 50 | } 51 | 52 | function resizeHeight() 53 | { 54 | var headerHeight = header.height(); 55 | var footerHeight = footer.height(); 56 | var windowHeight = $(window).height() - headerHeight - footerHeight; 57 | content.css({height:windowHeight + "px"}); 58 | navtree.css({height:windowHeight + "px"}); 59 | sidenav.css({height:windowHeight + "px",top: headerHeight+"px"}); 60 | } 61 | 62 | function initResizable() 63 | { 64 | header = $("#top"); 65 | sidenav = $("#side-nav"); 66 | content = $("#doc-content"); 67 | navtree = $("#nav-tree"); 68 | footer = $("#nav-path"); 69 | $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); 70 | $(window).resize(function() { resizeHeight(); }); 71 | var width = readCookie('width'); 72 | if (width) { restoreWidth(width); } else { resizeWidth(); } 73 | resizeHeight(); 74 | var url = location.href; 75 | var i=url.indexOf("#"); 76 | if (i>=0) window.location.hash=url.substr(i); 77 | var _preventDefault = function(evt) { evt.preventDefault(); }; 78 | $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); 79 | } 80 | 81 | 82 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/all_67.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | GettingStarted.txt 13 |
14 |
15 |
16 |
17 | GroupID 18 | TaskEntry_t 19 |
20 |
21 |
22 |
23 | Groups.txt 24 |
25 |
26 |
Searching...
27 |
No Matches
28 | 34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/all_6b.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | KeyCode 13 | USB_KeyboardReport_Data_t 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/all_78.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | X 13 | USB_MouseReport_Data_t 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/all_79.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | Y 13 | USB_MouseReport_Data_t 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/classes_65.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 | 14 |
15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/classes_6d.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | MAC_Address_t 13 |
14 |
15 |
16 |
17 | MIDI_EventPacket_t 18 |
19 |
20 |
21 | 24 |
25 |
26 | 29 |
30 |
Searching...
31 |
No Matches
32 | 38 |
39 | 40 | 41 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/classes_73.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | SCSI_Capacity_t 13 |
14 |
15 |
16 | 19 |
20 |
21 | 24 |
25 |
26 | 29 |
30 |
Searching...
31 |
No Matches
32 | 38 |
39 | 40 | 41 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/classes_74.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | TaskEntry_t 13 |
14 |
15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/search/close.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/defines_6e.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | NO_DESCRIPTOR 13 | StdDescriptors.h 14 |
15 |
16 |
17 |
18 | NO_STREAM_CALLBACK 19 | StreamCallbacks.h 20 |
21 |
22 |
23 |
24 | NOTIF_ResponseAvailable 25 | RNDIS.h 26 |
27 |
28 |
29 |
30 | NOTIF_SerialState 31 | CDC.h 32 |
33 |
34 |
Searching...
35 |
No Matches
36 | 42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/defines_76.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | VERSION_BCD 13 | StdDescriptors.h 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/enums_63.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | CDC_LineEncodingFormats_t 13 | CDC.h 14 |
15 |
16 |
17 |
18 | CDC_LineEncodingParity_t 19 | CDC.h 20 |
21 |
22 |
23 | 27 |
28 |
Searching...
29 |
No Matches
30 | 36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/enums_64.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | DSearch_Comp_Return_ErrorCodes_t 13 | ConfigDescriptor.h 14 |
15 |
16 |
17 |
18 | DSearch_Return_ErrorCodes_t 19 | ConfigDescriptor.h 20 |
21 |
22 |
Searching...
23 |
No Matches
24 | 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/enums_65.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | Endpoint_ControlStream_RW_ErrorCodes_t 13 | Endpoint.h 14 |
15 |
16 |
17 |
18 | Endpoint_Stream_RW_ErrorCodes_t 19 | Endpoint.h 20 |
21 |
22 |
23 |
24 | Endpoint_WaitUntilReady_ErrorCodes_t 25 | Endpoint.h 26 |
27 |
28 |
Searching...
29 |
No Matches
30 | 36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/enums_68.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | HID_Parse_ErrorCodes_t 13 | HIDParser.h 14 |
15 |
16 |
17 |
18 | HID_ReportItemTypes_t 19 | HID.h 20 |
21 |
22 |
23 | 27 |
28 |
Searching...
29 |
No Matches
30 | 36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/enums_6d.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | MassStorage_CommandStatusCodes_t 13 | MassStorage.h 14 |
15 |
16 |
17 | 21 |
22 |
23 |
24 | MSHost_EnumerationFailure_ErrorCodes_t 25 | MassStorage.h 26 |
27 |
28 |
Searching...
29 |
No Matches
30 | 36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/enums_6e.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | NDIS_Hardware_Status_t 13 | RNDIS.h 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/enums_70.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | Pipe_Stream_RW_ErrorCodes_t 13 | Pipe.h 14 |
15 |
16 |
17 |
18 | Pipe_WaitUntilReady_ErrorCodes_t 19 | Pipe.h 20 |
21 |
22 |
23 |
24 | PRNTHost_EnumerationFailure_ErrorCodes_t 25 | Printer.h 26 |
27 |
28 |
Searching...
29 |
No Matches
30 | 36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/enums_72.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | RNDIS_States_t 13 | RNDIS.h 14 |
15 |
16 |
17 | 21 |
22 |
Searching...
23 |
No Matches
24 | 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/enums_73.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | SI_PIMA_Container_Types_t 13 | StillImage.h 14 |
15 |
16 |
17 |
18 | SI_PIMA_ResponseCodes_t 19 | StillImage.h 20 |
21 |
22 |
23 |
24 | SIHost_EnumerationFailure_ErrorCodes_t 25 | StillImage.h 26 |
27 |
28 |
29 |
30 | StreamCallback_Return_ErrorCodes_t 31 | StreamCallbacks.h 32 |
33 |
34 |
Searching...
35 |
No Matches
36 | 42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/enumvalues_75.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | USB_INITERROR_NoUSBModeSpecified 13 | USBController.h 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/files_65.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | Endpoint.h 13 |
14 |
15 |
16 |
17 | Events.h 18 |
19 |
20 |
Searching...
21 |
No Matches
22 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/files_66.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | FutureChanges.txt 13 |
14 |
15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/files_67.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | GettingStarted.txt 13 |
14 |
15 |
16 |
17 | Groups.txt 18 |
19 |
20 |
Searching...
21 |
No Matches
22 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/files_6f.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | OTG.h 13 |
14 |
15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/files_70.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | Pipe.h 13 |
14 |
15 |
16 |
17 | Printer.h 18 |
19 |
20 |
21 |
22 | Printer.h 23 |
24 |
25 |
26 |
27 | Printer.h 28 |
29 |
30 |
31 | 34 |
35 |
Searching...
36 |
No Matches
37 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/files_72.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | RNDIS.h 13 |
14 |
15 |
16 |
17 | RNDIS.h 18 |
19 |
20 |
21 |
22 | RNDIS.h 23 |
24 |
25 |
26 |
27 | RNDIS.h 28 |
29 |
30 |
31 |
32 | RNDISConstants.h 33 |
34 |
35 |
Searching...
36 |
No Matches
37 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/files_74.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | Temperature.h 13 |
14 |
15 |
16 |
17 | TerminalCodes.h 18 |
19 |
20 |
21 |
22 | TWI.h 23 |
24 |
25 |
26 |
27 | TWI.h 28 |
29 |
30 |
Searching...
31 |
No Matches
32 | 38 |
39 | 40 | 41 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/files_75.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | USB.h 13 |
14 |
15 |
16 |
17 | USBController.h 18 |
19 |
20 |
21 |
22 | USBInterrupt.h 23 |
24 |
25 |
26 |
27 | USBMode.h 28 |
29 |
30 |
31 |
32 | USBTask.h 33 |
34 |
35 |
Searching...
36 |
No Matches
37 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/files_76.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | Version.h 13 |
14 |
15 |
16 | 19 |
20 |
Searching...
21 |
No Matches
22 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/files_77.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | WhyUseLUFA.txt 13 |
14 |
15 |
16 | 19 |
20 |
Searching...
21 |
No Matches
22 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/functions_62.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | BitReverse 13 | Common.h 14 |
15 |
16 |
17 |
18 | Buttons_GetStatus 19 | Buttons.h 20 |
21 |
22 |
23 |
24 | Buttons_Init 25 | Buttons.h 26 |
27 |
28 |
Searching...
29 |
No Matches
30 | 36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/functions_6a.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | Joystick_GetStatus 13 | Joystick.h 14 |
15 |
16 |
17 |
18 | Joystick_Init 19 | Joystick.h 20 |
21 |
22 |
Searching...
23 |
No Matches
24 | 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/mag_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/search/mag_sel.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/nomatches.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
No Matches
10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/search_l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/search/search_l.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/search_m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/search/search_m.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/search_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/search/search_r.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/typedefs_63.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | ConfigComparatorPtr_t 13 | ConfigDescriptor.h 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/typedefs_73.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | SchedulerDelayCounter_t 13 | Scheduler.h 14 |
15 |
16 |
17 |
18 | StreamCallbackPtr_t 19 | StreamCallbacks.h 20 |
21 |
22 |
Searching...
23 |
No Matches
24 | 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/typedefs_74.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | TaskPtr_t 13 | Scheduler.h 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/typedefs_75.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 | 15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/variables_67.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | GroupID 13 | TaskEntry_t 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/variables_6b.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | KeyCode 13 | USB_KeyboardReport_Data_t 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/variables_6f.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | Octets 13 | MAC_Address_t 14 |
15 |
16 |
17 | 24 |
25 |
26 |
27 | OOBDataLength 28 | RNDIS_Packet_Message_t 29 |
30 |
31 |
32 |
33 | OOBDataOffset 34 | RNDIS_Packet_Message_t 35 |
36 |
37 |
Searching...
38 |
No Matches
39 | 45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/variables_76.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | Value 13 | HID_ReportItem_t 14 |
15 |
16 |
17 |
18 | VcHandle 19 | RNDIS_Packet_Message_t 20 |
21 |
22 | 31 |
32 |
33 | Version 34 | SCSI_Inquiry_Response_t 35 |
36 |
37 |
Searching...
38 |
No Matches
39 | 45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/variables_78.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | X 13 | USB_MouseReport_Data_t 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/search/variables_79.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
Loading...
10 |
11 |
12 | Y 13 | USB_MouseReport_Data_t 14 |
15 |
16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /LUFA/Documentation/html/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/tab_a.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/tab_b.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/tab_h.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/Documentation/html/tab_s.png -------------------------------------------------------------------------------- /LUFA/Documentation/html/tabs.css: -------------------------------------------------------------------------------- 1 | .tabs, .tabs2, .tabs3 { 2 | background-image: url('tab_b.png'); 3 | width: 100%; 4 | z-index: 101; 5 | font-size: 13px; 6 | } 7 | 8 | .tabs2 { 9 | font-size: 10px; 10 | } 11 | .tabs3 { 12 | font-size: 9px; 13 | } 14 | 15 | .tablist { 16 | margin: 0; 17 | padding: 0; 18 | display: table; 19 | } 20 | 21 | .tablist li { 22 | float: left; 23 | display: table-cell; 24 | background-image: url('tab_b.png'); 25 | line-height: 36px; 26 | list-style: none; 27 | } 28 | 29 | .tablist a { 30 | display: block; 31 | padding: 0 20px; 32 | font-weight: bold; 33 | background-image:url('tab_s.png'); 34 | background-repeat:no-repeat; 35 | background-position:right; 36 | color: #283A5D; 37 | text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); 38 | text-decoration: none; 39 | outline: none; 40 | } 41 | 42 | .tabs3 .tablist a { 43 | padding: 0 10px; 44 | } 45 | 46 | .tablist a:hover { 47 | background-image: url('tab_h.png'); 48 | background-repeat:repeat-x; 49 | color: #fff; 50 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 51 | text-decoration: none; 52 | } 53 | 54 | .tablist li.current a { 55 | background-image: url('tab_a.png'); 56 | background-repeat:repeat-x; 57 | color: #fff; 58 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 59 | } 60 | -------------------------------------------------------------------------------- /LUFA/DriverStubs/Buttons.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /* 32 | This is a stub driver header file, for implementing custom board 33 | layout hardware with compatible LUFA board specific drivers. If 34 | the library is configured to use the BOARD_USER board mode, this 35 | driver file should be completed and copied into the "/Board/" folder 36 | inside the application's folder. 37 | 38 | This stub is for the board-specific component of the LUFA Buttons driver, 39 | for the control of physical board-mounted GPIO pushbuttons. 40 | */ 41 | 42 | #ifndef __BUTTONS_USER_H__ 43 | #define __BUTTONS_USER_H__ 44 | 45 | /* Includes: */ 46 | #include 47 | #include 48 | 49 | // TODO: Add any required includes here 50 | 51 | /* Enable C linkage for C++ Compilers: */ 52 | #if defined(__cplusplus) 53 | extern "C" { 54 | #endif 55 | 56 | /* Preprocessor Checks: */ 57 | #if !defined(__INCLUDE_FROM_BUTTONS_H) 58 | #error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead. 59 | #endif 60 | 61 | /* Public Interface - May be used in end-application: */ 62 | /* Macros: */ 63 | /** Button mask for the first button on the board. */ 64 | #define BUTTONS_BUTTON1 // TODO: Add mask for first board button here 65 | 66 | /* Inline Functions: */ 67 | #if !defined(__DOXYGEN__) 68 | static inline void Buttons_Init(void) 69 | { 70 | // TODO: Initialize the appropriate port pins as an inputs here, with pull-ups 71 | } 72 | 73 | static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT; 74 | static inline uint8_t Buttons_GetStatus(void) 75 | { 76 | // TODO: Return current button status here, debounced if required 77 | } 78 | #endif 79 | 80 | /* Disable C linkage for C++ Compilers: */ 81 | #if defined(__cplusplus) 82 | } 83 | #endif 84 | 85 | #endif 86 | -------------------------------------------------------------------------------- /LUFA/Drivers/Board/Temperature.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #include "Temperature.h" 32 | 33 | static const uint16_t PROGMEM Temperature_Lookup[] = { 34 | 0x3B4, 0x3B0, 0x3AB, 0x3A6, 0x3A0, 0x39A, 0x394, 0x38E, 0x388, 0x381, 0x37A, 0x373, 35 | 0x36B, 0x363, 0x35B, 0x353, 0x34A, 0x341, 0x338, 0x32F, 0x325, 0x31B, 0x311, 0x307, 36 | 0x2FC, 0x2F1, 0x2E6, 0x2DB, 0x2D0, 0x2C4, 0x2B8, 0x2AC, 0x2A0, 0x294, 0x288, 0x27C, 37 | 0x26F, 0x263, 0x256, 0x24A, 0x23D, 0x231, 0x225, 0x218, 0x20C, 0x200, 0x1F3, 0x1E7, 38 | 0x1DB, 0x1CF, 0x1C4, 0x1B8, 0x1AC, 0x1A1, 0x196, 0x18B, 0x180, 0x176, 0x16B, 0x161, 39 | 0x157, 0x14D, 0x144, 0x13A, 0x131, 0x128, 0x11F, 0x117, 0x10F, 0x106, 0x0FE, 0x0F7, 40 | 0x0EF, 0x0E8, 0x0E1, 0x0DA, 0x0D3, 0x0CD, 0x0C7, 0x0C0, 0x0BA, 0x0B5, 0x0AF, 0x0AA, 41 | 0x0A4, 0x09F, 0x09A, 0x096, 0x091, 0x08C, 0x088, 0x084, 0x080, 0x07C, 0x078, 0x074, 42 | 0x071, 0x06D, 0x06A, 0x067, 0x064, 0x061, 0x05E, 0x05B, 0x058, 0x055, 0x053, 0x050, 43 | 0x04E, 0x04C, 0x049, 0x047, 0x045, 0x043, 0x041, 0x03F, 0x03D, 0x03C, 0x03A, 0x038 44 | }; 45 | 46 | int8_t Temperature_GetTemperature(void) 47 | { 48 | uint16_t Temp_ADC = ADC_GetChannelReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | TEMP_ADC_CHANNEL_MASK); 49 | 50 | if (Temp_ADC > pgm_read_word(&Temperature_Lookup[0])) 51 | return TEMP_MIN_TEMP; 52 | 53 | for (uint16_t Index = 0; Index < TEMP_TABLE_SIZE; Index++) 54 | { 55 | if (Temp_ADC > pgm_read_word(&Temperature_Lookup[Index])) 56 | return (Index + TEMP_TABLE_OFFSET); 57 | } 58 | 59 | return TEMP_MAX_TEMP; 60 | } 61 | -------------------------------------------------------------------------------- /LUFA/Drivers/Peripheral/ADC.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Master include file for the ADC peripheral driver. 33 | * 34 | * This file is the master dispatch header file for the device-specific ADC driver, for AVRs containing an ADC. 35 | * 36 | * User code should include this file, which will in turn include the correct ADC driver header file for the 37 | * currently selected AVR model. 38 | */ 39 | 40 | /** \ingroup Group_PeripheralDrivers 41 | * @defgroup Group_ADC ADC Driver - LUFA/Drivers/Peripheral/ADC.h 42 | * 43 | * \section Sec_Dependencies Module Source Dependencies 44 | * The following files must be built with any user project that uses this module: 45 | * - None 46 | * 47 | * \section Module Description 48 | * Hardware ADC driver. This module provides an easy to use driver for the hardware 49 | * ADC present on many AVR models, for the conversion of analogue signals into the 50 | * digital domain. 51 | */ 52 | 53 | #ifndef __ADC_H__ 54 | #define __ADC_H__ 55 | 56 | /* Macros: */ 57 | #if !defined(__DOXYGEN__) 58 | #define __INCLUDE_FROM_ADC_H 59 | #endif 60 | 61 | /* Includes: */ 62 | #if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || \ 63 | defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__) || \ 64 | defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || \ 65 | defined(__AVR_ATmega32U6__)) 66 | #include "AVRU4U6U7/ADC.h" 67 | #else 68 | #error "ADC is not available for the currently selected AVR model." 69 | #endif 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /LUFA/Drivers/Peripheral/Serial.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #include "Serial.h" 32 | 33 | void Serial_TxString_P(const char* FlashStringPtr) 34 | { 35 | uint8_t CurrByte; 36 | 37 | while ((CurrByte = pgm_read_byte(FlashStringPtr)) != 0x00) 38 | { 39 | Serial_TxByte(CurrByte); 40 | FlashStringPtr++; 41 | } 42 | } 43 | 44 | void Serial_TxString(const char* StringPtr) 45 | { 46 | uint8_t CurrByte; 47 | 48 | while ((CurrByte = *StringPtr) != 0x00) 49 | { 50 | Serial_TxByte(CurrByte); 51 | StringPtr++; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /LUFA/Drivers/Peripheral/SerialStream.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #define __INCLUDE_FROM_SERIALSTREAM_C 32 | #include "SerialStream.h" 33 | 34 | FILE USARTStream = FDEV_SETUP_STREAM(SerialStream_TxByte, SerialStream_RxByte, _FDEV_SETUP_RW); 35 | 36 | static int SerialStream_TxByte(char DataByte, 37 | FILE *Stream) 38 | { 39 | (void)Stream; 40 | 41 | Serial_TxByte(DataByte); 42 | return 0; 43 | } 44 | 45 | static int SerialStream_RxByte(FILE *Stream) 46 | { 47 | (void)Stream; 48 | 49 | if (!(Serial_IsCharReceived())) 50 | return _FDEV_EOF; 51 | 52 | return Serial_RxByte(); 53 | } 54 | -------------------------------------------------------------------------------- /LUFA/Drivers/Peripheral/TWI.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) Dean Camera, 2010. 3 | 4 | dean [at] fourwalledcubicle [dot] com 5 | www.fourwalledcubicle.com 6 | */ 7 | 8 | #include "TWI.h" 9 | 10 | bool TWI_StartTransmission(const uint8_t SlaveAddress, 11 | const uint8_t TimeoutMS) 12 | { 13 | for (;;) 14 | { 15 | bool BusCaptured = false; 16 | uint16_t TimeoutRemaining; 17 | 18 | TWCR = ((1 << TWINT) | (1 << TWSTA) | (1 << TWEN)); 19 | 20 | TimeoutRemaining = (TimeoutMS * 100); 21 | while (TimeoutRemaining-- && !(BusCaptured)) 22 | { 23 | if (TWCR & (1 << TWINT)) 24 | { 25 | switch (TWSR & TW_STATUS_MASK) 26 | { 27 | case TW_START: 28 | case TW_REP_START: 29 | BusCaptured = true; 30 | break; 31 | case TW_MT_ARB_LOST: 32 | TWCR = ((1 << TWINT) | (1 << TWSTA) | (1 << TWEN)); 33 | continue; 34 | default: 35 | TWCR = (1 << TWEN); 36 | return false; 37 | } 38 | } 39 | 40 | _delay_us(10); 41 | } 42 | 43 | if (!(BusCaptured)) 44 | { 45 | TWCR = (1 << TWEN); 46 | return false; 47 | } 48 | 49 | TWDR = SlaveAddress; 50 | TWCR = ((1 << TWINT) | (1 << TWEN)); 51 | 52 | TimeoutRemaining = (TimeoutMS * 100); 53 | while (TimeoutRemaining--) 54 | { 55 | if (TWCR & (1 << TWINT)) 56 | break; 57 | 58 | _delay_us(10); 59 | } 60 | 61 | if (!(TimeoutRemaining)) 62 | return false; 63 | 64 | switch (TWSR & TW_STATUS_MASK) 65 | { 66 | case TW_MT_SLA_ACK: 67 | case TW_MR_SLA_ACK: 68 | return true; 69 | default: 70 | TWCR = ((1 << TWINT) | (1 << TWSTO) | (1 << TWEN)); 71 | return false; 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /LUFA/Drivers/Peripheral/TWI.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Master include file for the TWI peripheral driver. 33 | * 34 | * This file is the master dispatch header file for the device-specific ADC driver, for AVRs containing an ADC. 35 | * 36 | * User code should include this file, which will in turn include the correct ADC driver header file for the 37 | * currently selected AVR model. 38 | */ 39 | 40 | /** \ingroup Group_PeripheralDrivers 41 | * @defgroup Group_TWI TWI Driver - LUFA/Drivers/Peripheral/TWI.h 42 | * 43 | * \section Sec_Dependencies Module Source Dependencies 44 | * The following files must be built with any user project that uses this module: 45 | * - LUFA/Drivers/Peripheral/TWI.c (Makefile source module name: LUFA_SRC_TWI) 46 | * 47 | * 48 | * \section Module Description 49 | * Master Mode Hardware TWI driver. This module provides an easy to use driver for the hardware 50 | * TWI present on many AVR models, for the transmission and reception of data on a TWI bus. 51 | */ 52 | 53 | #ifndef __TWI_H__ 54 | #define __TWI_H__ 55 | 56 | /* Macros: */ 57 | #if !defined(__DOXYGEN__) 58 | #define __INCLUDE_FROM_TWI_H 59 | #endif 60 | 61 | /* Includes: */ 62 | #if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || \ 63 | defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__) || \ 64 | defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || \ 65 | defined(__AVR_ATmega32U6__)) 66 | #include "AVRU4U6U7/TWI.h" 67 | #else 68 | #error "TWI is not available for the currently selected AVR model." 69 | #endif 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /LUFA/Drivers/USB/Class/Audio.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Master include file for the library USB Audio Class driver. 33 | * 34 | * Master include file for the library USB Audio Class driver, for both host and device modes, where available. 35 | * 36 | * This file should be included in all user projects making use of this optional class driver, instead of 37 | * including any headers in the USB/ClassDriver/Device, USB/ClassDriver/Host or USB/ClassDriver/Common subdirectories. 38 | */ 39 | 40 | /** \ingroup Group_USBClassDrivers 41 | * @defgroup Group_USBClassAudio Audio Class Driver - LUFA/Drivers/Class/Audio.h 42 | * 43 | * \section Sec_Dependencies Module Source Dependencies 44 | * The following files must be built with any user project that uses this module: 45 | * - LUFA/Drivers/USB/Class/Device/Audio.c (Makefile source module name: LUFA_SRC_USBCLASS) 46 | * 47 | * \section Module Description 48 | * Audio Class Driver module. This module contains an internal implementation of the USB Audio Class, for Device 49 | * USB mode only. User applications can use this class driver instead of implementing the Audio class manually via 50 | * the low-level LUFA APIs. 51 | * 52 | * This module is designed to simplify the user code by exposing only the required interface needed to interface with 53 | * Hosts or Devices using the USB Audio Class. 54 | * 55 | * @{ 56 | */ 57 | 58 | #ifndef _AUDIO_CLASS_H_ 59 | #define _AUDIO_CLASS_H_ 60 | 61 | /* Macros: */ 62 | #define __INCLUDE_FROM_AUDIO_DRIVER 63 | #define __INCLUDE_FROM_USB_DRIVER 64 | 65 | /* Includes: */ 66 | #include "../HighLevel/USBMode.h" 67 | 68 | #if defined(NO_STREAM_CALLBACKS) 69 | #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers. 70 | #endif 71 | 72 | #if defined(USB_CAN_BE_DEVICE) 73 | #include "Device/Audio.h" 74 | #endif 75 | 76 | #endif 77 | 78 | /** @} */ 79 | -------------------------------------------------------------------------------- /LUFA/Drivers/USB/Class/Common/Printer.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * \brief Common definitions and declarations for the library USB Printer Class driver. 33 | * 34 | * Common definitions and declarations for the library USB Printer Class driver. 35 | * 36 | * \note This file should not be included directly. It is automatically included as needed by the class driver 37 | * dispatch header located in LUFA/Drivers/USB/Class/Printer.h. 38 | */ 39 | 40 | /** \ingroup Group_USBClassPrinter 41 | * @defgroup Group_USBClassPrinterCommon Common Class Definitions 42 | * 43 | * \section Module Description 44 | * Constants, Types and Enum definitions that are common to both Device and Host modes for the USB 45 | * Printer Class. 46 | * 47 | * @{ 48 | */ 49 | 50 | #ifndef _PRINTER_CLASS_COMMON_H_ 51 | #define _PRINTER_CLASS_COMMON_H_ 52 | 53 | /* Includes: */ 54 | #include "../../USB.h" 55 | 56 | #include 57 | 58 | /* Enable C linkage for C++ Compilers: */ 59 | #if defined(__cplusplus) 60 | extern "C" { 61 | #endif 62 | 63 | /* Preprocessor Checks: */ 64 | #if !defined(__INCLUDE_FROM_PRINTER_DRIVER) 65 | #error Do not include this file directly. Include LUFA/Drivers/Class/Printer.h instead. 66 | #endif 67 | 68 | /* Macros: */ 69 | /** Port status mask for a printer device, indicating that an error has *not* occurred. */ 70 | #define PRNT_PORTSTATUS_NOTERROR (1 << 3) 71 | 72 | /** Port status mask for a printer device, indicating that the device is currently selected. */ 73 | #define PRNT_PORTSTATUS_SELECT (1 << 4) 74 | 75 | /** Port status mask for a printer device, indicating that the device is currently out of paper. */ 76 | #define PRNT_PORTSTATUS_PAPEREMPTY (1 << 5) 77 | 78 | /* Disable C linkage for C++ Compilers: */ 79 | #if defined(__cplusplus) 80 | } 81 | #endif 82 | 83 | #endif 84 | 85 | /** @} */ 86 | -------------------------------------------------------------------------------- /LUFA/Drivers/USB/Class/Device/Audio.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #define __INCLUDE_FROM_USB_DRIVER 32 | #include "../../HighLevel/USBMode.h" 33 | #if defined(USB_CAN_BE_DEVICE) 34 | 35 | #define __INCLUDE_FROM_AUDIO_DRIVER 36 | #include "Audio.h" 37 | 38 | void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo) 39 | { 40 | if (!(Endpoint_IsSETUPReceived())) 41 | return; 42 | 43 | if (USB_ControlRequest.wIndex != AudioInterfaceInfo->Config.StreamingInterfaceNumber) 44 | return; 45 | 46 | switch (USB_ControlRequest.bRequest) 47 | { 48 | case REQ_SetInterface: 49 | if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_INTERFACE)) 50 | { 51 | Endpoint_ClearSETUP(); 52 | 53 | AudioInterfaceInfo->State.InterfaceEnabled = ((USB_ControlRequest.wValue & 0xFF) != 0); 54 | 55 | Endpoint_ClearStatusStage(); 56 | } 57 | 58 | break; 59 | } 60 | } 61 | 62 | bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo) 63 | { 64 | memset(&AudioInterfaceInfo->State, 0x00, sizeof(AudioInterfaceInfo->State)); 65 | 66 | if (AudioInterfaceInfo->Config.DataINEndpointNumber) 67 | { 68 | if (!(Endpoint_ConfigureEndpoint(AudioInterfaceInfo->Config.DataINEndpointNumber, EP_TYPE_ISOCHRONOUS, 69 | ENDPOINT_DIR_IN, AudioInterfaceInfo->Config.DataINEndpointSize, 70 | ENDPOINT_BANK_DOUBLE))) 71 | { 72 | return false; 73 | } 74 | } 75 | 76 | if (AudioInterfaceInfo->Config.DataOUTEndpointNumber) 77 | { 78 | if (!(Endpoint_ConfigureEndpoint(AudioInterfaceInfo->Config.DataOUTEndpointNumber, EP_TYPE_ISOCHRONOUS, 79 | ENDPOINT_DIR_OUT, AudioInterfaceInfo->Config.DataOUTEndpointSize, 80 | ENDPOINT_BANK_DOUBLE))) 81 | { 82 | return false; 83 | } 84 | } 85 | 86 | return true; 87 | } 88 | 89 | #endif -------------------------------------------------------------------------------- /LUFA/Drivers/USB/HighLevel/Events.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #define __INCLUDE_FROM_EVENTS_C 32 | #define __INCLUDE_FROM_USB_DRIVER 33 | #include "Events.h" 34 | 35 | void USB_Event_Stub(void) 36 | { 37 | 38 | } 39 | -------------------------------------------------------------------------------- /LUFA/Drivers/USB/HighLevel/USBTask.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #define __INCLUDE_FROM_USBTASK_C 32 | #define __INCLUDE_FROM_USB_DRIVER 33 | #include "USBTask.h" 34 | 35 | volatile bool USB_IsInitialized; 36 | USB_Request_Header_t USB_ControlRequest; 37 | 38 | #if defined(USB_CAN_BE_HOST) && !defined(HOST_STATE_AS_GPIOR) 39 | volatile uint8_t USB_HostState; 40 | #endif 41 | 42 | #if defined(USB_CAN_BE_DEVICE) && !defined(DEVICE_STATE_AS_GPIOR) 43 | volatile uint8_t USB_DeviceState; 44 | #endif 45 | 46 | void USB_USBTask(void) 47 | { 48 | #if defined(USB_HOST_ONLY) 49 | USB_HostTask(); 50 | #elif defined(USB_DEVICE_ONLY) 51 | USB_DeviceTask(); 52 | #else 53 | if (USB_CurrentMode == USB_MODE_DEVICE) 54 | USB_DeviceTask(); 55 | else if (USB_CurrentMode == USB_MODE_HOST) 56 | USB_HostTask(); 57 | #endif 58 | } 59 | 60 | #if defined(USB_CAN_BE_DEVICE) 61 | static void USB_DeviceTask(void) 62 | { 63 | if (USB_DeviceState != DEVICE_STATE_Unattached) 64 | { 65 | uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint(); 66 | 67 | Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP); 68 | 69 | if (Endpoint_IsSETUPReceived()) 70 | USB_Device_ProcessControlRequest(); 71 | 72 | Endpoint_SelectEndpoint(PrevEndpoint); 73 | } 74 | } 75 | #endif 76 | 77 | #if defined(USB_CAN_BE_HOST) 78 | static void USB_HostTask(void) 79 | { 80 | uint8_t PrevPipe = Pipe_GetCurrentPipe(); 81 | 82 | Pipe_SelectPipe(PIPE_CONTROLPIPE); 83 | 84 | USB_Host_ProcessNextHostState(); 85 | 86 | Pipe_SelectPipe(PrevPipe); 87 | } 88 | #endif 89 | -------------------------------------------------------------------------------- /LUFA/Drivers/USB/LowLevel/Device.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #define __INCLUDE_FROM_USB_DRIVER 32 | #include "../HighLevel/USBMode.h" 33 | 34 | #if defined(USB_CAN_BE_DEVICE) 35 | 36 | #include "Device.h" 37 | 38 | void USB_Device_SendRemoteWakeup(void) 39 | { 40 | if (!(USB_Options & USB_OPT_MANUAL_PLL)) 41 | { 42 | USB_PLL_On(); 43 | while (!(USB_PLL_IsReady())); 44 | } 45 | 46 | USB_CLK_Unfreeze(); 47 | 48 | UDCON |= (1 << RMWKUP); 49 | while (!(UDCON & (1 << RMWKUP))); 50 | } 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c: -------------------------------------------------------------------------------- 1 | uint8_t TEMPLATE_FUNC_NAME (void* Buffer, 2 | uint16_t Length) 3 | { 4 | uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length)); 5 | 6 | if (!(Length)) 7 | Endpoint_ClearOUT(); 8 | 9 | while (Length) 10 | { 11 | if (Endpoint_IsSETUPReceived()) 12 | return ENDPOINT_RWCSTREAM_HostAborted; 13 | 14 | if (USB_DeviceState == DEVICE_STATE_Unattached) 15 | return ENDPOINT_RWCSTREAM_DeviceDisconnected; 16 | else if (USB_DeviceState == DEVICE_STATE_Suspended) 17 | return ENDPOINT_RWCSTREAM_BusSuspended; 18 | 19 | if (Endpoint_IsOUTReceived()) 20 | { 21 | while (Length && Endpoint_BytesInEndpoint()) 22 | { 23 | TEMPLATE_TRANSFER_BYTE(DataStream); 24 | Length--; 25 | } 26 | 27 | Endpoint_ClearOUT(); 28 | } 29 | } 30 | 31 | while (!(Endpoint_IsINReady())) 32 | { 33 | if (USB_DeviceState == DEVICE_STATE_Unattached) 34 | return ENDPOINT_RWCSTREAM_DeviceDisconnected; 35 | else if (USB_DeviceState == DEVICE_STATE_Suspended) 36 | return ENDPOINT_RWCSTREAM_BusSuspended; 37 | } 38 | 39 | return ENDPOINT_RWCSTREAM_NoError; 40 | } 41 | 42 | 43 | #undef TEMPLATE_BUFFER_OFFSET 44 | #undef TEMPLATE_FUNC_NAME 45 | #undef TEMPLATE_TRANSFER_BYTE -------------------------------------------------------------------------------- /LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c: -------------------------------------------------------------------------------- 1 | uint8_t TEMPLATE_FUNC_NAME (const void* Buffer, 2 | uint16_t Length) 3 | { 4 | uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length)); 5 | bool LastPacketFull = false; 6 | 7 | if (Length > USB_ControlRequest.wLength) 8 | Length = USB_ControlRequest.wLength; 9 | else if (!(Length)) 10 | Endpoint_ClearIN(); 11 | 12 | while (Length || LastPacketFull) 13 | { 14 | if (Endpoint_IsSETUPReceived()) 15 | return ENDPOINT_RWCSTREAM_HostAborted; 16 | 17 | if (Endpoint_IsOUTReceived()) 18 | break; 19 | 20 | if (USB_DeviceState == DEVICE_STATE_Unattached) 21 | return ENDPOINT_RWCSTREAM_DeviceDisconnected; 22 | else if (USB_DeviceState == DEVICE_STATE_Suspended) 23 | return ENDPOINT_RWCSTREAM_BusSuspended; 24 | 25 | if (Endpoint_IsINReady()) 26 | { 27 | uint8_t BytesInEndpoint = Endpoint_BytesInEndpoint(); 28 | 29 | while (Length && (BytesInEndpoint < USB_ControlEndpointSize)) 30 | { 31 | TEMPLATE_TRANSFER_BYTE(DataStream); 32 | Length--; 33 | BytesInEndpoint++; 34 | } 35 | 36 | LastPacketFull = (BytesInEndpoint == USB_ControlEndpointSize); 37 | Endpoint_ClearIN(); 38 | } 39 | } 40 | 41 | while (!(Endpoint_IsOUTReceived())) 42 | { 43 | if (USB_DeviceState == DEVICE_STATE_Unattached) 44 | return ENDPOINT_RWCSTREAM_DeviceDisconnected; 45 | else if (USB_DeviceState == DEVICE_STATE_Suspended) 46 | return ENDPOINT_RWCSTREAM_BusSuspended; 47 | } 48 | 49 | return ENDPOINT_RWCSTREAM_NoError; 50 | } 51 | 52 | #undef TEMPLATE_BUFFER_OFFSET 53 | #undef TEMPLATE_FUNC_NAME 54 | #undef TEMPLATE_TRANSFER_BYTE -------------------------------------------------------------------------------- /LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_RW.c: -------------------------------------------------------------------------------- 1 | uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE Buffer, 2 | uint16_t Length 3 | __CALLBACK_PARAM) 4 | { 5 | uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length)); 6 | uint8_t ErrorCode; 7 | 8 | if ((ErrorCode = Endpoint_WaitUntilReady())) 9 | return ErrorCode; 10 | 11 | #if defined(FAST_STREAM_TRANSFERS) 12 | uint8_t BytesRemToAlignment = (Endpoint_BytesInEndpoint() & 0x07); 13 | 14 | if (Length >= 8) 15 | { 16 | Length -= BytesRemToAlignment; 17 | 18 | switch (BytesRemToAlignment) 19 | { 20 | default: 21 | do 22 | { 23 | if (!(Endpoint_IsReadWriteAllowed())) 24 | { 25 | TEMPLATE_CLEAR_ENDPOINT(); 26 | 27 | #if !defined(NO_STREAM_CALLBACKS) 28 | if ((Callback != NULL) && (Callback() == STREAMCALLBACK_Abort)) 29 | return ENDPOINT_RWSTREAM_CallbackAborted; 30 | #endif 31 | 32 | if ((ErrorCode = Endpoint_WaitUntilReady())) 33 | return ErrorCode; 34 | } 35 | 36 | Length -= 8; 37 | 38 | TEMPLATE_TRANSFER_BYTE(DataStream); 39 | case 7: TEMPLATE_TRANSFER_BYTE(DataStream); 40 | case 6: TEMPLATE_TRANSFER_BYTE(DataStream); 41 | case 5: TEMPLATE_TRANSFER_BYTE(DataStream); 42 | case 4: TEMPLATE_TRANSFER_BYTE(DataStream); 43 | case 3: TEMPLATE_TRANSFER_BYTE(DataStream); 44 | case 2: TEMPLATE_TRANSFER_BYTE(DataStream); 45 | case 1: TEMPLATE_TRANSFER_BYTE(DataStream); 46 | } while (Length >= 8); 47 | } 48 | } 49 | #endif 50 | 51 | while (Length) 52 | { 53 | if (!(Endpoint_IsReadWriteAllowed())) 54 | { 55 | TEMPLATE_CLEAR_ENDPOINT(); 56 | 57 | #if !defined(NO_STREAM_CALLBACKS) 58 | if ((Callback != NULL) && (Callback() == STREAMCALLBACK_Abort)) 59 | return ENDPOINT_RWSTREAM_CallbackAborted; 60 | #endif 61 | 62 | if ((ErrorCode = Endpoint_WaitUntilReady())) 63 | return ErrorCode; 64 | } 65 | else 66 | { 67 | TEMPLATE_TRANSFER_BYTE(DataStream); 68 | Length--; 69 | } 70 | } 71 | 72 | return ENDPOINT_RWSTREAM_NoError; 73 | } 74 | 75 | #undef TEMPLATE_FUNC_NAME 76 | #undef TEMPLATE_BUFFER_TYPE 77 | #undef TEMPLATE_TRANSFER_BYTE 78 | #undef TEMPLATE_CLEAR_ENDPOINT 79 | #undef TEMPLATE_BUFFER_OFFSET -------------------------------------------------------------------------------- /LUFA/Drivers/USB/LowLevel/Template/Template_Pipe_RW.c: -------------------------------------------------------------------------------- 1 | uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE Buffer, 2 | uint16_t Length 3 | __CALLBACK_PARAM) 4 | { 5 | uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length)); 6 | uint8_t ErrorCode; 7 | 8 | Pipe_SetPipeToken(TEMPLATE_TOKEN); 9 | 10 | if ((ErrorCode = Pipe_WaitUntilReady())) 11 | return ErrorCode; 12 | 13 | #if defined(FAST_STREAM_TRANSFERS) 14 | uint8_t BytesRemToAlignment = (Pipe_BytesInPipe() & 0x07); 15 | 16 | if (Length >= 8) 17 | { 18 | Length -= BytesRemToAlignment; 19 | 20 | switch (BytesRemToAlignment) 21 | { 22 | default: 23 | do 24 | { 25 | if (!(Pipe_IsReadWriteAllowed())) 26 | { 27 | TEMPLATE_CLEAR_PIPE(); 28 | 29 | #if !defined(NO_STREAM_CALLBACKS) 30 | if ((Callback != NULL) && (Callback() == STREAMCALLBACK_Abort)) 31 | return PIPE_RWSTREAM_CallbackAborted; 32 | #endif 33 | 34 | if ((ErrorCode = Pipe_WaitUntilReady())) 35 | return ErrorCode; 36 | } 37 | 38 | Length -= 8; 39 | 40 | TEMPLATE_TRANSFER_BYTE(DataStream); 41 | case 7: TEMPLATE_TRANSFER_BYTE(DataStream); 42 | case 6: TEMPLATE_TRANSFER_BYTE(DataStream); 43 | case 5: TEMPLATE_TRANSFER_BYTE(DataStream); 44 | case 4: TEMPLATE_TRANSFER_BYTE(DataStream); 45 | case 3: TEMPLATE_TRANSFER_BYTE(DataStream); 46 | case 2: TEMPLATE_TRANSFER_BYTE(DataStream); 47 | case 1: TEMPLATE_TRANSFER_BYTE(DataStream); 48 | } while (Length >= 8); 49 | } 50 | } 51 | #endif 52 | 53 | while (Length) 54 | { 55 | if (!(Pipe_IsReadWriteAllowed())) 56 | { 57 | TEMPLATE_CLEAR_PIPE(); 58 | 59 | #if !defined(NO_STREAM_CALLBACKS) 60 | if ((Callback != NULL) && (Callback() == STREAMCALLBACK_Abort)) 61 | return PIPE_RWSTREAM_CallbackAborted; 62 | #endif 63 | 64 | if ((ErrorCode = Pipe_WaitUntilReady())) 65 | return ErrorCode; 66 | } 67 | else 68 | { 69 | TEMPLATE_TRANSFER_BYTE(DataStream); 70 | Length--; 71 | } 72 | } 73 | 74 | return PIPE_RWSTREAM_NoError; 75 | } 76 | 77 | #undef TEMPLATE_FUNC_NAME 78 | #undef TEMPLATE_BUFFER_TYPE 79 | #undef TEMPLATE_TOKEN 80 | #undef TEMPLATE_TRANSFER_BYTE 81 | #undef TEMPLATE_CLEAR_PIPE 82 | #undef TEMPLATE_BUFFER_OFFSET 83 | -------------------------------------------------------------------------------- /LUFA/License.txt: -------------------------------------------------------------------------------- 1 | Permission to use, copy, modify, and distribute this software 2 | and its documentation for any purpose is hereby granted without 3 | fee, provided that the above copyright notice appear in all 4 | copies and that both that the copyright notice and this 5 | permission notice and warranty disclaimer appear in supporting 6 | documentation, and that the name of the author not be used in 7 | advertising or publicity pertaining to distribution of the 8 | software without specific, written prior permission. 9 | 10 | The author disclaim all warranties with regard to this 11 | software, including all implied warranties of merchantability 12 | and fitness. In no event shall the author be liable for any 13 | special, indirect or consequential damages or any damages 14 | whatsoever resulting from loss of use, data or profits, whether 15 | in an action of contract, negligence or other tortious action, 16 | arising out of or in connection with the use or performance of 17 | this software. 18 | -------------------------------------------------------------------------------- /LUFA/ManPages/AboutLUFA.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** 8 | * \page Page_AboutLUFA About LUFA 9 | * 10 | * This section of the manual contains information about the library as a whole, including its supported targets, 11 | * past and planned changes, and links to other projects incorporating LUFA. 12 | * 13 | * Subsections: 14 | * \li \subpage Page_DeviceSupport - Current Device and Hardware Support 15 | * \li \subpage Page_Resources - LUFA and USB Related Resources 16 | * \li \subpage Page_ChangeLog - Project Changelog 17 | * \li \subpage Page_FutureChanges - Planned Changes to the Library 18 | * \li \subpage Page_LUFAPoweredProjects - Other Projects Using LUFA 19 | */ 20 | -------------------------------------------------------------------------------- /LUFA/ManPages/Author.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/ManPages/Author.jpg -------------------------------------------------------------------------------- /LUFA/ManPages/BuildingLinkableLibraries.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** \page Page_BuildLibrary Building as a Linkable Library 8 | * 9 | * The LUFA library can be built as a proper linkable library (with the extention .a) under AVR-GCC, so that 10 | * the library does not need to be recompiled with each revision of a user project. Instructions for creating 11 | * a library from a given source tree can be found in the AVR-GCC user manual included in the WinAVR install 12 | * /Docs/ directory. 13 | * 14 | * However, building the library is not recommended, as the static (compile-time) options will be 15 | * unable to be changed without a recompilation of the LUFA code. Therefore, if the library is to be built 16 | * from the LUFA source, it should be made to be application-specific and compiled with the static options 17 | * that are required for each project (which should be recorded along with the library). 18 | * 19 | * Normal library use has the library components compiled in at the same point as the application code, as 20 | * demonstrated in the library demos and applications. This is the preferred method, as the library is recompiled 21 | * each time to ensure that all static options for a particular application are applied. 22 | */ 23 | -------------------------------------------------------------------------------- /LUFA/ManPages/ChangeLog.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/ManPages/ChangeLog.txt -------------------------------------------------------------------------------- /LUFA/ManPages/CompilingApps.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** \page Page_CompilingApps Compiling the Demos, Bootloaders and Projects 8 | * 9 | * The following details how to compile the included LUFA demos, applications and bootloaders using AVR-GCC. 10 | * 11 | * \section Sec_Prerequisites Prerequisites 12 | * Before you can compile any of the LUFA library code or demos, you will need a recent distribution of avr-libc (1.6.2+) 13 | * and the AVR-GCC (4.2+) compiler. For Windows users, the best way to obtain these is the WinAVR project 14 | * (http://winavr.sourceforge.net) as this provides a single-file setup for everything required to compile your 15 | * own AVR projects. 16 | * 17 | * \section Sec_Compiling Compiling a LUFA Application 18 | * Compiling the LUFA demos, applications and/or bootloaders is very simple. LUFA comes with makefile scripts for 19 | * each individual demo, bootloader and project folder, as well as scripts in the /Demos/, /Bootloaders/, /Projects/ 20 | * and the LUFA root directory. This means that compilation can be started from any of the above directories, with 21 | * a build started from an upper directory in the directory structure executing build of all child directories under it. 22 | * This means that while a build inside a particular demo directory will build only that particular demo, a build stated 23 | * from the /Demos/ directory will build all LUFA demo projects sequentially. 24 | * 25 | * To build a project from the source via the command line, the command "make all" should be executed from the command line in the directory 26 | * of interest. To remove compiled files (including the binary output, all intermediately files and all diagnostic output 27 | * files), execute "make clean". Once a "make all" has been run and no errors were encountered, the resulting binary will 28 | * be located in the generated ".HEX" file. If your project makes use of pre-initialized EEPROM variables, the generated ".EEP" 29 | * file will contain the project's EEPROM data. 30 | */ -------------------------------------------------------------------------------- /LUFA/ManPages/DevelopingWithLUFA.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** 8 | * \page Page_DevelopingWithLUFA Developing With LUFA 9 | * 10 | * This section of the manual contains information on LUFA development, such as Getting Started information, 11 | * information on compile-time tuning of the library and other developer-related sections. 12 | * 13 | * Subsections: 14 | * \li \subpage Page_TokenSummary - Summary of Compile Time Tokens 15 | * \li \subpage Page_Migration - Migrating from an Older LUFA Version 16 | * \li \subpage Page_VIDPID - Allocated USB VID and PID Values 17 | * \li \subpage Page_BuildLibrary - Building as a Linkable Library 18 | * \li \subpage Page_WritingBoardDrivers - How to Write Custom Board Drivers 19 | * \li \subpage Page_SoftwareBootloaderStart - How to jump to the bootloader in software 20 | * \li \subpage Page_SchedulerOverview - Overview of the Simple LUFA Scheduler (DEPRECATED) 21 | */ 22 | -------------------------------------------------------------------------------- /LUFA/ManPages/DeviceSupport.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** 8 | * \page Page_DeviceSupport Device and Hardware Support 9 | * 10 | * Currently supported AVR models: 11 | * - AT90USB82 (USB Device Only) 12 | * - ATMEGA8U2 (USB Device Only) 13 | * - AT90USB162 (USB Device Only) 14 | * - ATMEGA16U2 (USB Device Only) 15 | * - ATMEGA16U4 (USB Device Only) 16 | * - ATMEGA32U2 (USB Device Only) 17 | * - ATMEGA32U4 (USB Device Only) 18 | * - ATMEGA32U6 (USB Device Only) 19 | * - AT90USB646 (USB Device Only) 20 | * - AT90USB647 (USB Host and Device) 21 | * - AT90USB1286 (USB Device Only) 22 | * - AT90USB1287 (USB Host and Device) 23 | * 24 | * Currently supported Atmel boards (see \ref Group_BoardTypes): 25 | * - AT90USBKEY 26 | * - ATAVRUSBRF01 27 | * - EVK527 28 | * - RZUSBSTICK 29 | * - STK525 30 | * - STK526 31 | * - XPLAIN (Both original first revision board, and newer boards with a different Dataflash model) 32 | * 33 | * Currently supported third-party boards (see \ref Group_BoardTypes): 34 | * - Bumble-B (using officially recommended peripheral layout) 35 | * - Benito 36 | * - JM-DB-U2 37 | * - Teensy (all revisions and versions) 38 | * - USBTINY MKII (all revisions and versions) 39 | * - Any Other Custom User Boards (with Board Drivers if desired, see \ref Page_WritingBoardDrivers) 40 | */ 41 | -------------------------------------------------------------------------------- /LUFA/ManPages/Donating.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** 8 | * \page Page_Donating Donating to Support This Project 9 | * 10 | * \image html Author.jpg "Dean Camera, LUFA Developer" 11 | * 12 | * I am a 20 year old University student studying for a double degree in Computer Science and Electronics Engineering. 13 | * The development and support of this library requires much effort from myself, as I am the sole developer, maintainer 14 | * and supporter. Please consider donating a small amount to support this and my future Open Source projects - All 15 | * donations are greatly appreciated. 16 | * 17 | * Note that commercial entities can remove the attribution portion of the LUFA license by a one-time fee - see 18 | * \ref Page_LicenseInfo for more details (Note: Please do NOT pay this in advance through the donation link below - 19 | * contact author for payment details.). 20 | * 21 | * \image html "http://www.pledgie.com/campaigns/6927.png?skin_name=chrome" 22 | * Donate to this project via PayPal - Thanks in Advance! 23 | */ 24 | 25 | -------------------------------------------------------------------------------- /LUFA/ManPages/FutureChanges.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** \page Page_FutureChanges Future Changes 8 | * 9 | * Below is a list of future changes which are proposed for the LUFA library, but not yet started/complete. 10 | * This gives an unordered list of future changes which will be available in future releases of the library. 11 | * If you have an item to add to this list, please contact the library author via email, the LUFA mailing list, 12 | * or post your suggestion as an enhancement request to the project bug tracker. 13 | * 14 | * Targeted for Future Releases: 15 | * - Code Features 16 | * -# Add hub support when in Host mode for multiple devices 17 | * -# Add ability to get number of bytes not written with pipe/endpoint write routines after an error 18 | * -# Add standardized descriptor names to class driver structures 19 | * -# Change makefiles to allow for absolute LUFA location to be used 20 | * - Documentation/Support 21 | * -# Add detailed overviews of how each demo works 22 | * -# Add board overviews 23 | * -# Write LUFA tutorials 24 | * - Demos/Projects 25 | * -# Multiple-Report HID device 26 | * -# Device/Host USB bridge 27 | * -# Alternative (USB-IF endorsed) USB-CDC Ethernet Class 28 | * -# Finish Test and Measurement Class demo 29 | * -# Finish BluetoothHost demo 30 | * -# Finish SideShow demo 31 | * -# Finish StandaloneProgrammer project 32 | * -# Finish MIDIToneGenerator project 33 | * -# Correct mishandling of error cases in Mass Storage demos 34 | * - Ports 35 | * -# AVR32 UC3B series microcontrollers 36 | * -# Atmel ARM7 series microcontrollers 37 | * -# Other (commercial) C compilers 38 | */ 39 | -------------------------------------------------------------------------------- /LUFA/ManPages/GettingStarted.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** \page Page_GettingStarted Getting Started 8 | * 9 | * Out of the box, LUFA contains a large number of pre-made class demos for you to test, experiment with and 10 | * ultimately build upon for your own projects. All the demos (where possible) come pre-configured to build and 11 | * run correctly on the AT90USB1287 AVR microcontroller, mounted on the Atmel USBKEY board and running at an 8MHz 12 | * master clock. This is due to two reasons; one, it is the hardware the author possesses, and two, it is the most 13 | * popular Atmel USB demonstration board to date. To learn how to reconfigure, recompile and program the included 14 | * LUFA applications using different settings, see the subsections below. 15 | * 16 | * Most of the included demos in the /Demos/ folder come in both ClassDriver and LowLevel varieties. If you are new 17 | * to LUFA, it is highly recommended that you look at the ClassDriver versions first, which use the pre-made USB 18 | * Class Drivers (\ref Group_USBClassDrivers) to simplify the use of the standard USB classes in user applications. 19 | * 20 | * For an overview of the included library applications, bootloaders and demos, see \ref Page_LibraryApps. 21 | * 22 | * Subsections: 23 | * \li \subpage Page_ConfiguringApps - How to Configure the Included Demos, Projects and Bootloaders 24 | * \li \subpage Page_CompilingApps - How to Compile the Included Demos, Projects and Bootloaders 25 | * \li \subpage Page_ProgrammingApps - How to Program an AVR with the Included Demos, Projects and Bootloaders 26 | */ 27 | -------------------------------------------------------------------------------- /LUFA/ManPages/Groups.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** @defgroup Group_BoardDrivers Board Drivers 8 | * 9 | * Functions, macros, variables, enums and types related to the control of physical board hardware. 10 | */ 11 | 12 | /** @defgroup Group_PeripheralDrivers On-chip Peripheral Drivers 13 | * 14 | * Functions, macros, variables, enums and types related to the control of AVR subsystems. 15 | */ 16 | 17 | /** @defgroup Group_MiscDrivers Miscellaneous Drivers 18 | * 19 | * Miscellaneous driver Functions, macros, variables, enums and types. 20 | */ 21 | -------------------------------------------------------------------------------- /LUFA/ManPages/LUFA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/LUFA/ManPages/LUFA.png -------------------------------------------------------------------------------- /LUFA/ManPages/LibraryResources.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** 8 | * \page Page_Resources Library Resources 9 | * 10 | * \section Sec_ProjectPages LUFA Related Webpages 11 | * Project Homepage: http://www.fourwalledcubicle.com/LUFA.php \n 12 | * Author's Website: http://www.fourwalledcubicle.com \n 13 | * Development Blog: http://www.fourwalledcubicle.com/blog \n 14 | * Commercial Licenses: http://fourwalledcubicle.com/PurchaseLUFA.php \n 15 | * 16 | * \section Sec_ProjectHelp Assistance With LUFA 17 | * Discussion Group: http://groups.google.com/group/myusb-support-list \n 18 | * Author's Email: dean [at] fourwalledcubicle [dot] com 19 | * Author's Skype: abcminiuser 20 | * 21 | * \section Sec_InDevelopment Latest In-Development Source Code 22 | * Official Releases, SVN Access, Issue Tracker: http://code.google.com/p/lufa-lib/ \n 23 | * Git Access: http://github.com/abcminiuser/lufa-lib \n 24 | * Mercurial Access: http://bitbucket.org/abcminiuser/lufa-lib \n 25 | * Latest Repository Source Archive: http://github.com/abcminiuser/lufa-lib/archives/master \n 26 | * Commit RSS Feed: http://github.com/feeds/abcminiuser/commits/lufa-lib/master \n 27 | * 28 | * \section Sec_Toolchain AVR Toolchain 29 | * WinAVR Website: http://winavr.sourceforge.net \n 30 | * avr-libc Website: http://www.nongnu.org/avr-libc/ \n 31 | * 32 | * \section Sec_USBResources USB Resources 33 | * USB-IF Website: http://www.usb.org \n 34 | */ 35 | 36 | -------------------------------------------------------------------------------- /LUFA/ManPages/LicenseInfo.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** 8 | * \page Page_LicenseInfo Source Code License 9 | * 10 | * The LUFA library is currently released under the MIT license, included below. 11 | * 12 | * Commercial entities can opt out of the public disclosure clause in this license 13 | * for a one-time US$1500 payment. This provides a non-exclusive modified MIT licensed which 14 | * allows for the free use of the LUFA library, bootloaders and (where the sole copyright 15 | * is attributed to Dean Camera) demos without public disclosure within an organization, in 16 | * addition to three free hours of consultation with the library author, and priority support. 17 | * Please visit the Commercial License link on \ref Page_Resources for more information on 18 | * ordering a commercial license for your company. 19 | * 20 | * \verbinclude License.txt 21 | */ 22 | -------------------------------------------------------------------------------- /LUFA/ManPages/MainPage.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** 8 | * \mainpage 9 | * 10 | * \image html LUFA.png 11 | *
Logo design by Ryo - http://ryophotography.wordpress.com
12 | * \n 13 | * 14 | * LUFA is donationware. For author and donation information, see \ref Page_Donating. 15 | * 16 | * LUFA is an open-source USB library for the USB-enabled AVR microcontrollers, released under the MIT license (see \ref Page_LicenseInfo). 17 | * It supports a large number of USB AVR models and boards (see \ref Page_DeviceSupport). It is designed to provide an easy to use, 18 | * feature rich framework for the development of USB peripherals and hosts. 19 | * 20 | * LUFA focuses on the microcontroller side of USB development only; it includes no PC host USB driver development facilities - other projects 21 | * such as the Windows Driver Development Kit, Windows USB Device Mode Framework and libusb may be of interest for developing custom OS drivers. 22 | * While custom USB devices can be made with LUFA using such tools, the included demos all use the inbuilt OS drivers for each USB class for 23 | * simplicity. 24 | * 25 | * The library is currently in a stable release, suitable for download and incorporation into user projects for 26 | * both host and device modes. For information about the project progression, see the blog link at \ref Page_Resources. 27 | * 28 | * LUFA is written specifically for the free AVR-GCC compiler, and uses several GCC-only extensions to make the 29 | * library API more streamlined and robust. You can download AVR-GCC for free in a convenient windows package, 30 | * from the the WinAVR website (see \ref Page_Resources). 31 | * 32 | * The only required AVR peripherals for LUFA is the USB controller itself and interrupts - LUFA does not require the use of the 33 | * microcontroller's timers or other hardware, leaving more hardware to the application developer. 34 | * 35 | * Accompanying LUFA in the download package is a set of example demo applications, plus several Bootloaders of different classes 36 | * and open source LUFA powered projects. 37 | * 38 | * Subsections: 39 | * \li \subpage Page_WhyUseLUFA - What are the advantages of using LUFA? 40 | * \li \subpage Page_LUFAvsAtmelStack - How does LUFA compare to the Atmel USB AVR stack? 41 | * \li \subpage Page_AlternativeStacks - Alternative USB AVR Stacks 42 | * \li \subpage Page_LicenseInfo - Project source license and commercial use information 43 | * \li \subpage Page_Donating - Donating to support this project 44 | * \li \subpage Page_LibraryApps - Overview of included Demos, Bootloaders and Projects 45 | */ 46 | -------------------------------------------------------------------------------- /LUFA/ManPages/ProgrammingApps.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** \page Page_ProgrammingApps Programming an Application into a USB AVR 8 | * 9 | * Once you have built an application, you will need a way to program in the resulting ".HEX" file (and, if your 10 | * application uses EEPROM variables with initial values, also a ".EEP" file) into your USB AVR. Normally, the 11 | * reprogramming of an AVR device must be performed using a special piece of programming hardware, through one of the 12 | * supported AVR programming protocols - ISP, HVSP, HVPP, JTAG or dW. This can be done through a custom programmer, 13 | * a third party programmer, or an official Atmel AVR tool - for more information, see the Atmel.com website. 14 | * 15 | * Alternatively, you can use the bootloader. From the Atmel factory, each USB AVR comes preloaded with the Atmel 16 | * DFU (Device Firmware Update) class bootloader, a small piece of AVR firmware which allows the remainder of the 17 | * AVR to be programmed through a non-standard interface such as the serial USART port, SPI, or (in this case) USB. 18 | * Bootloaders have the advantage of not requiring any special hardware for programming, and cannot usually be erased 19 | * or broken without an external programming device. They have disadvantages however; they cannot change the fuses of 20 | * the AVR (special configuration settings that control the operation of the chip itself) and a small portion of the 21 | * AVR's FLASH program memory must be reserved to contain the bootloader firmware, and thus cannot be used by the 22 | * loaded application. Atmel's DFU bootloader is either 4KB (for the smaller USB AVRs) or 8KB (for the larger USB AVRs). 23 | * 24 | * If you wish to use the DFU bootloader to program in your application, refer to your DFU programmer's documentation. 25 | * Atmel provides a free utility called FLIP which is USB AVR compatible, and an open source (Linux compatible) 26 | * alternative exists called "dfu-programmer". 27 | */ -------------------------------------------------------------------------------- /LUFA/ManPages/SchedulerOverview.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** \page Page_SchedulerOverview LUFA Scheduler Overview 8 | * 9 | * THE LUFA SCHEDULER IS NOW DEPRECATED AND WILL BE REMOVED IN A FUTURE RELEASE. EXISTING CODE SHOULD CONVERT 10 | * TO STANDARD LOOPS AS SHOWN IN THE CURRENT LIBRARY DEMOS. 11 | * 12 | * 13 | * The LUFA library comes with a small, basic round-robbin scheduler which allows for small "tasks" to be executed 14 | * continuously in sequence, and enabled/disabled at runtime. Unlike a conventional, complex RTOS scheduler, the 15 | * LUFA scheduler is very simple in design and operation and is essentially a loop conditionally executing a series 16 | * of functions. 17 | * 18 | * Each LUFA scheduler task should be written similar to an ISR; it should execute quickly (so that no one task 19 | * hogs the processor, preventing another from running before some sort of timeout is exceeded). Unlike normal RTOS 20 | * tasks, each LUFA scheduler task is a regular function, and thus must be designed to be called, and designed to 21 | * return to the calling scheduler function repeatedly. Data which must be preserved between task calls should be 22 | * declared as global or (preferably) as a static local variable inside the task. 23 | * 24 | * The scheduler consists of a task list, listing all the tasks which can be executed by the scheduler. Once started, 25 | * each task is then called one after another, unless the task is stopped by another running task or interrupt. 26 | * 27 | * 28 | * If desired, the LUFA scheduler does not need to be used in a LUFA powered application. A more conventional 29 | * approach to application design can be used, or a proper scheduling RTOS inserted in the place of the LUFA scheduler. 30 | * In the case of the former the USB task must be run manually repeatedly to maintain USB communications, and in the 31 | * case of the latter a proper RTOS task must be set up to do the same. 32 | * 33 | * 34 | * For more information on the LUFA scheduler, see the Scheduler.h file documentation. 35 | */ 36 | -------------------------------------------------------------------------------- /LUFA/ManPages/SoftwareBootloaderJump.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** 8 | * \page Page_SoftwareBootloaderStart Entering the Bootloader via Software 9 | * 10 | * A common requirement of many applications is the ability to jump to the programmed bootloader of a chip 11 | * on demand, via the code's firmware (i.e. not as a result of any physical user interaction with the 12 | * hardware). This might be required because the device does not have any physical user input, or simply 13 | * just to streamline the device upgrade process on the host PC. 14 | * 15 | * The following C code snippet may be used to enter the bootloader upon request by the user application. 16 | * By using the watchdog to physically reset the controller, it is ensured that all system hardware is 17 | * completely reset to their defaults before the bootloader is run. This is important; since bootloaders 18 | * are written to occupy a very limited space, they usually make assumptions about the register states based 19 | * on the default values after a hard-reset of the chip. 20 | * 21 | * \code 22 | * #include 23 | * #include 24 | * #include 25 | * 26 | * #include 27 | * #include 28 | * 29 | * uint32_t Boot_Key ATTR_NO_INIT; 30 | * 31 | * #define MAGIC_BOOT_KEY 0xDC42ACCA 32 | * #define BOOTLOADER_START_ADDRESS (FLASH_SIZE_BYTES - BOOTLOADER_SEC_SIZE_BYTES) 33 | * 34 | * void Bootloader_Jump_Check(void) ATTR_INIT_SECTION(3); 35 | * void Bootloader_Jump_Check(void) 36 | * { 37 | * // If the reset source was the bootloader and the key is correct, clear it and jump to the bootloader 38 | * if ((MCUSR & (1<FLASH_SIZE_BYTES and 65 | * BOOTLOADER_SEC_SIZE_BYTES tokens should be replaced with the total flash size of the AVR 66 | * in bytes, and the allocated size of the bootloader section for the target AVR. 67 | * 68 | */ 69 | -------------------------------------------------------------------------------- /LUFA/ManPages/WhyUseLUFA.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** 8 | * \page Page_WhyUseLUFA Why Use LUFA? 9 | * 10 | * The LUFA Library has many advantages over implementing the code required to drive the USB AVRs directly. 11 | * It is much more preferable to incorporate LUFA into your existing projects - or even make a new project 12 | * using LUFA - than it is to start from scratch and use the USB AVR registers directly. Some of these reasons 13 | * are: 14 | * 15 | * - Portability: 16 | * The LUFA stack is designed to run (at some capacity) on the entire Atmel range of USB AVRs, regardless of the 17 | * exact USB controller revision used. If you decide to implement your own USB stack, you will either need to 18 | * code around the differences between each USB AVR controller's implementation between different chip models, or 19 | * require your code to run on only one specific USB AVR model series. 20 | * 21 | * - Speed of Development: 22 | * LUFA ships with a wide range of pre-made demos, bootloaders and projects for you to try, learn and extend. Each 23 | * of these demos are tested (where possible) across as many USB AVRs and Operating Systems as possible, to ensure 24 | * that they work under as many conditions as possible. In addition, there are inbuilt class drivers for several of 25 | * the USB classes which you can make use of in your projects with minimal effort. 26 | * 27 | * - Maintainability: 28 | * As LUFA takes care of much of the USB implementation, you can be left to focusing on your actual project's 29 | * functionality, rather than being held back developing and debugging the USB stack code. Since LUFA uses clear APIs 30 | * for USB development, your code will be more readable than if it had the low level USB stack code integrated into 31 | * it directly. Updating the LUFA library is a simple folder-replacement and gives new features and bug fixes in 32 | * seconds each time a new release is made. 33 | * 34 | * - Size: 35 | * Not just requiring less code to make complex USB devices, LUFA (under most cases with the correct compile options) 36 | * requires less FLASH space than Atmel's stack, meaning more space for the user application*. 37 | * 38 | * - Support: 39 | * Since many people are now using LUFA in their own projects, you can take advantage of other's knowledge when you run 40 | * into difficulties or need some advice. In addition, you can also email the library author to receive personalized 41 | * support when you need it (subject to author's schedule). 42 | * 43 | * * Atmel Stack Mouse Device Demo 4292 bytes, LUFA Mouse Low Level Device Demo 3372 bytes, under identical build 44 | * environments 45 | */ 46 | 47 | -------------------------------------------------------------------------------- /LUFA/ManPages/WritingBoardDrivers.txt: -------------------------------------------------------------------------------- 1 | /** \file 2 | * 3 | * This file contains special DoxyGen information for the generation of the main page and other special 4 | * documentation pages. It is not a project source file. 5 | */ 6 | 7 | /** \page Page_WritingBoardDrivers Writing LUFA Board Drivers 8 | * 9 | * LUFA ships with several basic pre-made board drivers, to control hardware present on the supported board 10 | * hardware - such as Dataflash ICs, LEDs, Joysticks, or other hardware peripherals. When compiling an application 11 | * which makes use of one or more board drivers located in LUFA/Drivers/Board, you must also indicate what board 12 | * hardware you are using in your project makefile. This is done by defining the BOARD macro using the -D switch 13 | * passed to the compiler, with a constant of BOARD_{Name}. For example -DBOARD=BOARD_USBKEY instructs the 14 | * compiler to use the USBKEY board hardware drivers. 15 | * 16 | * If your application does not use *any* board level drivers, you can omit the definition of the BOARD macro. 17 | * However, some users may wish to write their own custom board hardware drivers which are to remain compatible 18 | * with the LUFA hardware API. To do this, the BOARD macro should be defined to the value BOARD_USER. This indicates 19 | * that the board level drivers should be located in a folder named "Board" located inside the application's folder. 20 | * 21 | * When used, the driver stub files located in the DriverStubs folder should be copied to the user Board directory, 22 | * and fleshed out to include the values and code needed to control the custom board hardware. Once done, the existing 23 | * LUFA board level APIs (accessed in the regular LUFA/Drivers/Board/ folder) will redirect to the user board drivers, 24 | * maintaining code compatibility and allowing for a different board to be selected through the project makefile with 25 | * no code changes. 26 | */ 27 | -------------------------------------------------------------------------------- /LUFA/Scheduler/Scheduler.c: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | #include "Scheduler.h" 32 | 33 | volatile SchedulerDelayCounter_t Scheduler_TickCounter; 34 | volatile uint8_t Scheduler_TotalTasks; 35 | 36 | bool Scheduler_HasDelayElapsed(const uint16_t Delay, 37 | SchedulerDelayCounter_t* const DelayCounter) 38 | { 39 | SchedulerDelayCounter_t CurrentTickValue_LCL; 40 | SchedulerDelayCounter_t DelayCounter_LCL; 41 | 42 | ATOMIC_BLOCK(ATOMIC_RESTORESTATE) 43 | { 44 | CurrentTickValue_LCL = Scheduler_TickCounter; 45 | } 46 | 47 | DelayCounter_LCL = *DelayCounter; 48 | 49 | if (CurrentTickValue_LCL >= DelayCounter_LCL) 50 | { 51 | if ((CurrentTickValue_LCL - DelayCounter_LCL) >= Delay) 52 | { 53 | *DelayCounter = CurrentTickValue_LCL; 54 | return true; 55 | } 56 | } 57 | else 58 | { 59 | if (((MAX_DELAYCTR_COUNT - DelayCounter_LCL) + CurrentTickValue_LCL) >= Delay) 60 | { 61 | *DelayCounter = CurrentTickValue_LCL; 62 | return true; 63 | } 64 | } 65 | 66 | return false; 67 | } 68 | 69 | void Scheduler_SetTaskMode(const TaskPtr_t Task, 70 | const bool TaskStatus) 71 | { 72 | TaskEntry_t* CurrTask = &Scheduler_TaskList[0]; 73 | 74 | while (CurrTask != &Scheduler_TaskList[Scheduler_TotalTasks]) 75 | { 76 | if (CurrTask->Task == Task) 77 | { 78 | CurrTask->TaskStatus = TaskStatus; 79 | break; 80 | } 81 | 82 | CurrTask++; 83 | } 84 | } 85 | 86 | void Scheduler_SetGroupTaskMode(const uint8_t GroupID, 87 | const bool TaskStatus) 88 | { 89 | TaskEntry_t* CurrTask = &Scheduler_TaskList[0]; 90 | 91 | while (CurrTask != &Scheduler_TaskList[Scheduler_TotalTasks]) 92 | { 93 | if (CurrTask->GroupID == GroupID) 94 | CurrTask->TaskStatus = TaskStatus; 95 | 96 | CurrTask++; 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /LUFA/Version.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * 33 | * \brief LUFA library version constants. 34 | * 35 | * Version constants for informational purposes and version-specific macro creation. This header file contains the 36 | * current LUFA version number in several forms, for use in the user-application (for example, for printing out 37 | * whilst debugging, or for testing for version compatibility). 38 | */ 39 | 40 | #ifndef __LUFA_VERSION_H__ 41 | #define __LUFA_VERSION_H__ 42 | 43 | /* Public Interface - May be used in end-application: */ 44 | /* Macros: */ 45 | /** Indicates the version number of the library, as an integer. */ 46 | #define LUFA_VERSION_INTEGER 0x100807 47 | 48 | /** Indicates the version number of the library, as a string. */ 49 | #define LUFA_VERSION_STRING "100807" 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /examples/big_joystick_demo.ino: -------------------------------------------------------------------------------- 1 | /* Arduino USB Joystick HID demo */ 2 | 3 | /* Author: Darran Hunt 4 | * Released into the public domain. 5 | */ 6 | 7 | #undef DEBUG 8 | 9 | #define NUM_BUTTONS 40 10 | #define NUM_AXES 8 // 8 axes, X, Y, Z, etc 11 | 12 | typedef struct joyReport_t { 13 | int16_t axis[NUM_AXES]; 14 | uint8_t button[(NUM_BUTTONS+7)/8]; // 8 buttons per byte 15 | } joyReport_t; 16 | 17 | joyReport_t joyReport; 18 | 19 | 20 | void setup(void); 21 | void loop(void); 22 | void setButton(joyReport_t *joy, uint8_t button); 23 | void clearButton(joyReport_t *joy, uint8_t button); 24 | void sendJoyReport(joyReport_t *report); 25 | 26 | 27 | void setup() 28 | { 29 | Serial.begin(115200); 30 | delay(200); 31 | 32 | for (uint8_t ind=0; ind<8; ind++) { 33 | joyReport.axis[ind] = ind*1000; 34 | } 35 | for (uint8_t ind=0; indbutton[index] |= 1 << bit; 73 | } 74 | 75 | // turn a button off 76 | void clearButton(joyReport_t *joy, uint8_t button) 77 | { 78 | uint8_t index = button/8; 79 | uint8_t bit = button - 8*index; 80 | 81 | joy->button[index] &= ~(1 << bit); 82 | } 83 | 84 | uint8_t button=0; // current button 85 | bool press = true; // turn buttons on? 86 | 87 | /* Turn each button on in sequence 1 - 40, then off 1 - 40 88 | * add values to each axis each loop 89 | */ 90 | void loop() 91 | { 92 | // Turn on a different button each time 93 | if (press) { 94 | setButton(&joyReport, button); 95 | } else { 96 | clearButton(&joyReport, button); 97 | } 98 | 99 | /* Move all of the axes */ 100 | for (uint8_t ind=0; ind<8; ind++) { 101 | joyReport.axis[ind] += 10 * (ind+1); 102 | } 103 | 104 | sendJoyReport(&joyReport); 105 | 106 | button++; 107 | if (button >= 40) { 108 | button = 0; 109 | press = !press; 110 | } 111 | delay(100); 112 | } 113 | -------------------------------------------------------------------------------- /examples/joystick_usb_demo.ino: -------------------------------------------------------------------------------- 1 | /* Arduino USB Joystick HID demo */ 2 | 3 | /* Author: Darran Hunt 4 | * Released into the public domain. 5 | */ 6 | 7 | struct { 8 | int8_t x; 9 | int8_t y; 10 | uint8_t buttons; 11 | uint8_t rfu; /* reserved for future use */ 12 | } joyReport; 13 | 14 | void setup(); 15 | void loop(); 16 | 17 | void setup() 18 | { 19 | Serial.begin(115200); 20 | delay(200); 21 | } 22 | 23 | /* Move the joystick in a clockwise square every 5 seconds, 24 | * and press button 1 then button 2. 25 | */ 26 | void loop() 27 | { 28 | int ind; 29 | delay(5000); 30 | 31 | joyReport.buttons = 0; 32 | joyReport.x = 0; 33 | joyReport.y = 0; 34 | joyReport.rfu = 0; 35 | 36 | /* Move the joystick in a clockwise direction */ 37 | joyReport.x = 100; 38 | Serial.write((uint8_t *)&joyReport, 4); 39 | delay(1000); 40 | 41 | joyReport.x = 0; 42 | joyReport.y = 100; 43 | Serial.write((uint8_t *)&joyReport, 4); 44 | delay(1000); 45 | 46 | joyReport.x = -100; 47 | joyReport.y = 0; 48 | Serial.write((uint8_t *)&joyReport, 4); 49 | delay(1000); 50 | 51 | joyReport.x = 0; 52 | joyReport.y = -100; 53 | Serial.write((uint8_t *)&joyReport, 4); 54 | delay(1000); 55 | 56 | /* Send button 1 then button 2 */ 57 | joyReport.y = 0; 58 | joyReport.buttons = 1; 59 | Serial.write((uint8_t *)&joyReport, 4); 60 | delay(1000); 61 | 62 | joyReport.buttons = 2; 63 | Serial.write((uint8_t *)&joyReport, 4); 64 | delay(1000); 65 | 66 | joyReport.buttons = 0; 67 | Serial.write((uint8_t *)&joyReport, 4); 68 | } 69 | -------------------------------------------------------------------------------- /examples/kbd_usb_demo.ino: -------------------------------------------------------------------------------- 1 | /* Arduino USB Keyboard HID demo 2 | * 3 | * Sends Volume up, hello world, and Volume Down to the host PC 4 | * 5 | */ 6 | 7 | /* Author: Darran Hunt 8 | * Released into the public domain. 9 | */ 10 | 11 | uint8_t buf[8] = { 0 }; /* Keyboard report buffer */ 12 | 13 | void setup(); 14 | void loop(); 15 | 16 | #define KEY_LEFT_CTRL 0x01 17 | #define KEY_LEFT_SHIFT 0x02 18 | #define KEY_RIGHT_CTRL 0x10 19 | #define KEY_RIGHT_SHIFT 0x20 20 | 21 | void setup() 22 | { 23 | Serial.begin(9600); 24 | delay(200); 25 | } 26 | 27 | char *str = "+hello world-"; 28 | 29 | void loop() 30 | { 31 | char *chp = str; 32 | delay(5000); 33 | while (*chp) { 34 | 35 | if ((*chp >= 'a') && (*chp <= 'z')) { 36 | buf[2] = *chp - 'a' + 4; 37 | } else if ((*chp >= 'A') && (*chp <= 'Z')) { 38 | buf[0] = KEY_LEFT_SHIFT; /* Caps */ 39 | buf[2] = *chp - 'A' + 4; 40 | } else { 41 | switch (*chp) { 42 | case ' ': 43 | buf[2] = 0x2c; // Space 44 | break; 45 | case '+': 46 | buf[2] = 128; // Volume up 47 | break; 48 | case '-': 49 | buf[2] = 129; // Volume down 50 | break; 51 | default: 52 | /* Character not handled. To do: add rest of chars from HUT1_11.pdf */ 53 | buf[2] = 0x37; // Period 54 | break; 55 | } 56 | } 57 | 58 | Serial.write(buf, 8); // Send keypress 59 | buf[0] = 0; 60 | buf[2] = 0; 61 | Serial.write(buf, 8); // Release key 62 | chp++; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /examples/midi_usb_demo.ino: -------------------------------------------------------------------------------- 1 | /* Arduino USB MIDI demo */ 2 | 3 | /* Author: Darran Hunt 4 | * Released into the public domain. 5 | */ 6 | 7 | #define MIDI_COMMAND_NOTE_OFF 0x80 8 | #define MIDI_COMMAND_NOTE_ON 0x90 9 | 10 | /* The format of the message to send via serial */ 11 | typedef union { 12 | struct { 13 | uint8_t command; 14 | uint8_t channel; 15 | uint8_t data2; 16 | uint8_t data3; 17 | } msg; 18 | uint8_t raw[4]; 19 | } t_midiMsg; 20 | 21 | void setup(); 22 | void loop(); 23 | 24 | void setup() 25 | { 26 | Serial.begin(115200); 27 | delay(200); 28 | } 29 | 30 | /* List of notes to play, zero terminated */ 31 | uint8_t note[] = { 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0 }; 32 | 33 | void loop() 34 | { 35 | t_midiMsg midiMsg; 36 | int ind; 37 | 38 | delay(10000); 39 | 40 | /* Send the notes */ 41 | for (ind=0; note[ind] != 0; ind++) { 42 | midiMsg.msg.command = MIDI_COMMAND_NOTE_ON; 43 | midiMsg.msg.channel = 1; 44 | midiMsg.msg.data2 = note[ind]; 45 | midiMsg.msg.data3 = 64; /* Velocity */ 46 | 47 | /* Send note on */ 48 | Serial.write(midiMsg.raw, sizeof(midiMsg)); 49 | delay(500); 50 | 51 | /* Send note off */ 52 | midiMsg.msg.command = MIDI_COMMAND_NOTE_OFF; 53 | Serial.write(midiMsg.raw, sizeof(midiMsg)); 54 | } 55 | 56 | /* Check for MIDI commands from the host */ 57 | if (Serial.available() >= sizeof(midiMsg)) { 58 | for (ind=0; ind 41 | 42 | #include 43 | #include 44 | 45 | /* Type Defines: */ 46 | /** Type define for the device configuration descriptor structure. This must be defined in the 47 | * application code, as the configuration descriptor contains several sub-descriptors which 48 | * vary between devices, and which describe the device's usage to the host. 49 | */ 50 | typedef struct 51 | { 52 | USB_Descriptor_Configuration_Header_t Config; 53 | USB_Descriptor_Interface_t HID_Interface; 54 | USB_HID_Descriptor_t HID_JoystickHID; 55 | USB_Descriptor_Endpoint_t HID_ReportINEndpoint; 56 | } USB_Descriptor_Configuration_t; 57 | 58 | /* Macros: */ 59 | /** Endpoint number of the Joystick HID reporting IN endpoint. */ 60 | #define JOYSTICK_EPNUM 1 61 | 62 | /** Size in bytes of the Joystick HID reporting IN endpoint. */ 63 | #define JOYSTICK_EPSIZE 8 64 | 65 | /* Function Prototypes: */ 66 | uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, 67 | const uint8_t wIndex, 68 | void** const DescriptorAddress) 69 | ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /firmwares/arduino-big-joystick/makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/firmwares/arduino-big-joystick/makefile -------------------------------------------------------------------------------- /firmwares/arduino-big-joystick/readme.txt: -------------------------------------------------------------------------------- 1 | To setup the project and upload the Arduino usbserial application firmware to an ATMEGA8U2 using the Arduino USB DFU bootloader: 2 | 1. unpack the source into LUFA's Projects directory 3 | 2. set ARDUINO_MODEL_PID in the makefile as appropriate 4 | 3. do "make clean; make" 5 | 4. put the 8U2 into USB DFU mode: 6 | 4.a. assert and hold the 8U2's RESET line 7 | 4.b. assert and hold the 8U2's HWB line 8 | 4.c. release the 8U2's RESET line 9 | 4.d. release the 8U2's HWB line 10 | 5. confirm that the board enumerates as either "Arduino Uno DFU" or "Arduino Mega 2560 DFU" 11 | 6. do "make dfu" (OS X or Linux - dfu-programmer must be installed first) or "make flip" (Windows - Flip must be installed first) 12 | 13 | -------------------------------------------------------------------------------- /firmwares/arduino-joystick/Descriptors.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * 33 | * Header file for Descriptors.c. 34 | */ 35 | 36 | #ifndef _DESCRIPTORS_H_ 37 | #define _DESCRIPTORS_H_ 38 | 39 | /* Includes: */ 40 | #include 41 | 42 | #include 43 | #include 44 | 45 | /* Type Defines: */ 46 | /** Type define for the device configuration descriptor structure. This must be defined in the 47 | * application code, as the configuration descriptor contains several sub-descriptors which 48 | * vary between devices, and which describe the device's usage to the host. 49 | */ 50 | typedef struct 51 | { 52 | USB_Descriptor_Configuration_Header_t Config; 53 | USB_Descriptor_Interface_t HID_Interface; 54 | USB_HID_Descriptor_t HID_JoystickHID; 55 | USB_Descriptor_Endpoint_t HID_ReportINEndpoint; 56 | } USB_Descriptor_Configuration_t; 57 | 58 | /* Macros: */ 59 | /** Endpoint number of the Joystick HID reporting IN endpoint. */ 60 | #define JOYSTICK_EPNUM 1 61 | 62 | /** Size in bytes of the Joystick HID reporting IN endpoint. */ 63 | #define JOYSTICK_EPSIZE 8 64 | 65 | /* Function Prototypes: */ 66 | uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, 67 | const uint8_t wIndex, 68 | void** const DescriptorAddress) 69 | ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /firmwares/arduino-joystick/makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/firmwares/arduino-joystick/makefile -------------------------------------------------------------------------------- /firmwares/arduino-joystick/readme.txt: -------------------------------------------------------------------------------- 1 | To setup the project and upload the Arduino usbserial application firmware to an ATMEGA8U2 using the Arduino USB DFU bootloader: 2 | 1. unpack the source into LUFA's Projects directory 3 | 2. set ARDUINO_MODEL_PID in the makefile as appropriate 4 | 3. do "make clean; make" 5 | 4. put the 8U2 into USB DFU mode: 6 | 4.a. assert and hold the 8U2's RESET line 7 | 4.b. assert and hold the 8U2's HWB line 8 | 4.c. release the 8U2's RESET line 9 | 4.d. release the 8U2's HWB line 10 | 5. confirm that the board enumerates as either "Arduino Uno DFU" or "Arduino Mega 2560 DFU" 11 | 6. do "make dfu" (OS X or Linux - dfu-programmer must be installed first) or "make flip" (Windows - Flip must be installed first) 12 | 13 | -------------------------------------------------------------------------------- /firmwares/arduino-keyboard/Arduino-keyboard.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * 33 | * Header file for Arduino-keyboard.c. 34 | */ 35 | 36 | #ifndef _ARDUINO_KEYBOARD_H_ 37 | #define _ARDUINO_KEYBOARD_H_ 38 | 39 | /* Includes: */ 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #include "Descriptors.h" 46 | 47 | #include "Lib/LightweightRingBuff.h" 48 | 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | 55 | /* Macros: */ 56 | /** LED mask for the library LED driver, to indicate TX activity. */ 57 | #define LEDMASK_TX LEDS_LED1 58 | 59 | /** LED mask for the library LED driver, to indicate RX activity. */ 60 | #define LEDMASK_RX LEDS_LED2 61 | 62 | /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */ 63 | #define LEDMASK_ERROR (LEDS_LED1 | LEDS_LED2) 64 | 65 | /** LED mask for the library LED driver, to indicate that the USB interface is busy. */ 66 | #define LEDMASK_BUSY (LEDS_LED1 | LEDS_LED2) 67 | 68 | /* Function Prototypes: */ 69 | void SetupHardware(void); 70 | 71 | void EVENT_USB_Device_Connect(void); 72 | void EVENT_USB_Device_Disconnect(void); 73 | void EVENT_USB_Device_ConfigurationChanged(void); 74 | void EVENT_USB_Device_UnhandledControlRequest(void); 75 | 76 | void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo); 77 | void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo); 78 | 79 | #endif /* _ARDUINO_KEYBOARD_H_ */ 80 | -------------------------------------------------------------------------------- /firmwares/arduino-keyboard/Descriptors.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * 33 | * Header file for Descriptors.c. 34 | */ 35 | 36 | #ifndef _DESCRIPTORS_H_ 37 | #define _DESCRIPTORS_H_ 38 | 39 | /* Includes: */ 40 | #include 41 | 42 | #include 43 | #include 44 | 45 | /* Type Defines: */ 46 | /** Type define for the device configuration descriptor structure. This must be defined in the 47 | * application code, as the configuration descriptor contains several sub-descriptors which 48 | * vary between devices, and which describe the device's usage to the host. 49 | */ 50 | typedef struct 51 | { 52 | USB_Descriptor_Configuration_Header_t Config; 53 | USB_Descriptor_Interface_t HID_Interface; 54 | USB_HID_Descriptor_t HID_KeyboardHID; 55 | USB_Descriptor_Endpoint_t HID_ReportINEndpoint; 56 | } USB_Descriptor_Configuration_t; 57 | 58 | /* Macros: */ 59 | /** Endpoint number of the Keyboard HID reporting IN endpoint. */ 60 | #define KEYBOARD_EPNUM 1 61 | 62 | /** Size in bytes of the Keyboard HID reporting IN and OUT endpoints. */ 63 | #define KEYBOARD_EPSIZE 8 64 | 65 | /* Function Prototypes: */ 66 | uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, 67 | const uint8_t wIndex, 68 | void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /firmwares/arduino-keyboard/makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/firmwares/arduino-keyboard/makefile -------------------------------------------------------------------------------- /firmwares/arduino-keyboard/readme.txt: -------------------------------------------------------------------------------- 1 | To setup the project and upload the Arduino usbserial application firmware to an ATMEGA8U2 using the Arduino USB DFU bootloader: 2 | 1. unpack the source into LUFA's Projects directory 3 | 2. set ARDUINO_MODEL_PID in the makefile as appropriate 4 | 3. do "make clean; make" 5 | 4. put the 8U2 into USB DFU mode: 6 | 4.a. assert and hold the 8U2's RESET line 7 | 4.b. assert and hold the 8U2's HWB line 8 | 4.c. release the 8U2's RESET line 9 | 4.d. release the 8U2's HWB line 10 | 5. confirm that the board enumerates as either "Arduino Uno DFU" or "Arduino Mega 2560 DFU" 11 | 6. do "make dfu" (OS X or Linux - dfu-programmer must be installed first) or "make flip" (Windows - Flip must be installed first) 12 | -------------------------------------------------------------------------------- /firmwares/arduino-mouse/Descriptors.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * 33 | * Header file for Descriptors.c. 34 | */ 35 | 36 | #ifndef _DESCRIPTORS_H_ 37 | #define _DESCRIPTORS_H_ 38 | 39 | /* Includes: */ 40 | #include 41 | #include 42 | 43 | #include 44 | 45 | /* Type Defines: */ 46 | /** Type define for the device configuration descriptor structure. This must be defined in the 47 | * application code, as the configuration descriptor contains several sub-descriptors which 48 | * vary between devices, and which describe the device's usage to the host. 49 | */ 50 | typedef struct 51 | { 52 | USB_Descriptor_Configuration_Header_t Config; 53 | USB_Descriptor_Interface_t HID_Interface; 54 | USB_HID_Descriptor_t HID_MouseHID; 55 | USB_Descriptor_Endpoint_t HID_ReportINEndpoint; 56 | } USB_Descriptor_Configuration_t; 57 | 58 | /* Macros: */ 59 | /** Endpoint number of the Mouse HID reporting IN endpoint. */ 60 | #define MOUSE_EPNUM 1 61 | 62 | /** Size in bytes of the Mouse HID reporting IN endpoint. */ 63 | #define MOUSE_EPSIZE 8 64 | 65 | /* Function Prototypes: */ 66 | uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, 67 | const uint8_t wIndex, 68 | void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /firmwares/arduino-mouse/makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/firmwares/arduino-mouse/makefile -------------------------------------------------------------------------------- /firmwares/arduino-mouse/readme.txt: -------------------------------------------------------------------------------- 1 | To setup the project and upload the Arduino usbserial application firmware to an ATMEGA8U2 using the Arduino USB DFU bootloader: 2 | 1. unpack the source into LUFA's Projects directory 3 | 2. set ARDUINO_MODEL_PID in the makefile as appropriate 4 | 3. do "make clean; make" 5 | 4. put the 8U2 into USB DFU mode: 6 | 4.a. assert and hold the 8U2's RESET line 7 | 4.b. assert and hold the 8U2's HWB line 8 | 4.c. release the 8U2's RESET line 9 | 4.d. release the 8U2's HWB line 10 | 5. confirm that the board enumerates as either "Arduino Uno DFU" or "Arduino Mega 2560 DFU" 11 | 6. do "make dfu" (OS X or Linux - dfu-programmer must be installed first) or "make flip" (Windows - Flip must be installed first) 12 | 13 | Check that the board enumerates as either "Arduino Uno" or "Arduino Mega 2560". Test by uploading a new Arduino sketch from the Arduino IDE. 14 | -------------------------------------------------------------------------------- /firmwares/arduino-usbmidi/Arduino-usbmidi.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * 33 | * Header file for Arduino-keyboard.c. 34 | */ 35 | 36 | #ifndef _ARDUINO_KEYBOARD_H_ 37 | #define _ARDUINO_KEYBOARD_H_ 38 | 39 | /* Includes: */ 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #include "Descriptors.h" 46 | 47 | #include "Lib/LightweightRingBuff.h" 48 | 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | 55 | /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ 56 | #define LEDMASK_USB_NOTREADY LEDS_LED1 57 | 58 | /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */ 59 | #define LEDMASK_USB_ENUMERATING (LEDS_LED2) 60 | 61 | /** LED mask for the library LED driver, to indicate that the USB interface is ready. */ 62 | #define LEDMASK_USB_READY 0 63 | 64 | /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */ 65 | #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED2) 66 | 67 | /* Function Prototypes: */ 68 | void SetupHardware(void); 69 | 70 | void EVENT_USB_Device_Connect(void); 71 | void EVENT_USB_Device_Disconnect(void); 72 | void EVENT_USB_Device_ConfigurationChanged(void); 73 | void EVENT_USB_Device_UnhandledControlRequest(void); 74 | 75 | #endif /* _ARDUINO_KEYBOARD_H_ */ 76 | -------------------------------------------------------------------------------- /firmwares/arduino-usbmidi/MIDI.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * 33 | * Header file for AudioOutput.c. 34 | */ 35 | 36 | #ifndef _AUDIO_OUTPUT_H_ 37 | #define _AUDIO_OUTPUT_H_ 38 | 39 | /* Includes: */ 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | 47 | #include "Descriptors.h" 48 | 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | #include 55 | #include 56 | 57 | /* Macros: */ 58 | /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ 59 | #define LEDMASK_USB_NOTREADY LEDS_LED1 60 | 61 | /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */ 62 | #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3) 63 | 64 | /** LED mask for the library LED driver, to indicate that the USB interface is ready. */ 65 | #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4) 66 | 67 | /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */ 68 | #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3) 69 | 70 | /* Function Prototypes: */ 71 | void SetupHardware(void); 72 | void CheckJoystickMovement(void); 73 | 74 | void EVENT_USB_Device_Connect(void); 75 | void EVENT_USB_Device_Disconnect(void); 76 | void EVENT_USB_Device_ConfigurationChanged(void); 77 | void EVENT_USB_Device_UnhandledControlRequest(void); 78 | 79 | #endif 80 | -------------------------------------------------------------------------------- /firmwares/arduino-usbmidi/makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/firmwares/arduino-usbmidi/makefile -------------------------------------------------------------------------------- /firmwares/arduino-usbmidi/readme.txt: -------------------------------------------------------------------------------- 1 | To setup the project and upload the Arduino usbmidi application firmware to an ATMEGA8U2 using the Arduino USB DFU bootloader: 2 | 1. unpack the source into LUFA's Projects directory 3 | 2. set ARDUINO_MODEL_PID in the makefile as appropriate 4 | 3. do "make clean; make" 5 | 4. put the 8U2 into USB DFU mode: 6 | 4.a. assert and hold the 8U2's RESET line 7 | 4.b. assert and hold the 8U2's HWB line 8 | 4.c. release the 8U2's RESET line 9 | 4.d. release the 8U2's HWB line 10 | 5. confirm that the board enumerates as either "Arduino Uno DFU" or "Arduino Mega 2560 DFU" 11 | 6. do "make dfu" (OS X or Linux - dfu-programmer must be installed first) or "make flip" (Windows - Flip must be installed first) 12 | 13 | Check that the board enumerates as "Arduino MIDI". 14 | -------------------------------------------------------------------------------- /firmwares/arduino-usbserial/Arduino-usbserial.h: -------------------------------------------------------------------------------- 1 | /* 2 | LUFA Library 3 | Copyright (C) Dean Camera, 2010. 4 | 5 | dean [at] fourwalledcubicle [dot] com 6 | www.fourwalledcubicle.com 7 | */ 8 | 9 | /* 10 | Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) 11 | 12 | Permission to use, copy, modify, distribute, and sell this 13 | software and its documentation for any purpose is hereby granted 14 | without fee, provided that the above copyright notice appear in 15 | all copies and that both that the copyright notice and this 16 | permission notice and warranty disclaimer appear in supporting 17 | documentation, and that the name of the author not be used in 18 | advertising or publicity pertaining to distribution of the 19 | software without specific, written prior permission. 20 | 21 | The author disclaim all warranties with regard to this 22 | software, including all implied warranties of merchantability 23 | and fitness. In no event shall the author be liable for any 24 | special, indirect or consequential damages or any damages 25 | whatsoever resulting from loss of use, data or profits, whether 26 | in an action of contract, negligence or other tortious action, 27 | arising out of or in connection with the use or performance of 28 | this software. 29 | */ 30 | 31 | /** \file 32 | * 33 | * Header file for Arduino-usbserial.c. 34 | */ 35 | 36 | #ifndef _ARDUINO_USBSERIAL_H_ 37 | #define _ARDUINO_USBSERIAL_H_ 38 | 39 | /* Includes: */ 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #include "Descriptors.h" 46 | 47 | #include "Lib/LightweightRingBuff.h" 48 | 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | 55 | /* Macros: */ 56 | /** LED mask for the library LED driver, to indicate TX activity. */ 57 | #define LEDMASK_TX LEDS_LED1 58 | 59 | /** LED mask for the library LED driver, to indicate RX activity. */ 60 | #define LEDMASK_RX LEDS_LED2 61 | 62 | /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */ 63 | #define LEDMASK_ERROR (LEDS_LED1 | LEDS_LED2) 64 | 65 | /** LED mask for the library LED driver, to indicate that the USB interface is busy. */ 66 | #define LEDMASK_BUSY (LEDS_LED1 | LEDS_LED2) 67 | 68 | /* Function Prototypes: */ 69 | void SetupHardware(void); 70 | 71 | void EVENT_USB_Device_Connect(void); 72 | void EVENT_USB_Device_Disconnect(void); 73 | void EVENT_USB_Device_ConfigurationChanged(void); 74 | void EVENT_USB_Device_UnhandledControlRequest(void); 75 | 76 | void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo); 77 | void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo); 78 | 79 | #endif /* _ARDUINO_USBSERIAL_H_ */ 80 | -------------------------------------------------------------------------------- /firmwares/arduino-usbserial/makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harlequin-tech/arduino-usb/0a0cfc772741a97581040fea32d0553febb6f284/firmwares/arduino-usbserial/makefile -------------------------------------------------------------------------------- /firmwares/arduino-usbserial/readme.txt: -------------------------------------------------------------------------------- 1 | To setup the project and upload the Arduino usbserial application firmware to an ATMEGA8U2 using the Arduino USB DFU bootloader: 2 | 1. unpack the source into LUFA's Projects directory 3 | 2. set ARDUINO_MODEL_PID in the makefile as appropriate 4 | 3. do "make clean; make" 5 | 4. put the 8U2 into USB DFU mode: 6 | 4.a. assert and hold the 8U2's RESET line 7 | 4.b. assert and hold the 8U2's HWB line 8 | 4.c. release the 8U2's RESET line 9 | 4.d. release the 8U2's HWB line 10 | 5. confirm that the board enumerates as either "Arduino Uno DFU" or "Arduino Mega 2560 DFU" 11 | 6. do "make dfu" (OS X or Linux - dfu-programmer must be installed first) or "make flip" (Windows - Flip must be installed first) 12 | 13 | Check that the board enumerates as either "Arduino Uno" or "Arduino Mega 2560". Test by uploading a new Arduino sketch from the Arduino IDE. 14 | --------------------------------------------------------------------------------