more stuff
This commit is contained in:
parent
17f94ebf3a
commit
d867a2260d
@ -0,0 +1,229 @@
|
||||
/*
|
||||
This software is based on the LUFA library. Modifications of the
|
||||
software are released under GPL but LUFA library itself is copyrigthed
|
||||
by its creator Dean Camera. Refer to the license below on the usage of
|
||||
LUFA library.
|
||||
|
||||
Chris Boudacoff @ Olimex Ltd
|
||||
chris <at> protonic <dot> co <dot> uk
|
||||
*/
|
||||
|
||||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2015.
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.lufa-lib.org
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaims all warranties with regard to this
|
||||
software, including all implied warranties of merchantability
|
||||
and fitness. In no event shall the author be liable for any
|
||||
special, indirect or consequential damages or any damages
|
||||
whatsoever resulting from loss of use, data or profits, whether
|
||||
in an action of contract, negligence or other tortious action,
|
||||
arising out of or in connection with the use or performance of
|
||||
this software.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* Main source file for the HID class bootloader. This file contains the complete bootloader logic.
|
||||
*/
|
||||
|
||||
#include "BootloaderHID.h"
|
||||
|
||||
/** Flag to indicate if the bootloader should be running, or should exit and allow the application code to run
|
||||
* via a soft reset. When cleared, the bootloader will abort, the USB interface will shut down and the application
|
||||
* started via a forced watchdog reset.
|
||||
*/
|
||||
static bool RunBootloader = true;
|
||||
|
||||
/** Magic lock for forced application start. If the HWBE fuse is programmed and BOOTRST is unprogrammed, the bootloader
|
||||
* will start if the /HWB line of the AVR is held low and the system is reset. However, if the /HWB line is still held
|
||||
* low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
|
||||
* \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
|
||||
*/
|
||||
uint16_t MagicBootKey ATTR_NO_INIT;
|
||||
uint16_t boottime;
|
||||
|
||||
/** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application
|
||||
* start key has been loaded into \ref MagicBootKey. If the bootloader started via the watchdog and the key is valid,
|
||||
* this will force the user application to start via a software jump.
|
||||
*/
|
||||
void Application_Jump_Check(void)
|
||||
|
||||
|
||||
|
||||
{
|
||||
|
||||
/* Don't run the user application if the reset vector is blank (no app loaded) */
|
||||
bool ApplicationValid = (pgm_read_word_near(0) != 0xFFFF);
|
||||
/* If the reset source was the bootloader and the key is correct, clear it and jump to the application */
|
||||
if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY) && (ApplicationValid))
|
||||
{
|
||||
|
||||
MagicBootKey = 0;
|
||||
|
||||
// cppcheck-suppress constStatement
|
||||
((void (*)(void))0x0000)();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** Main program entry point. This routine configures the hardware required by the bootloader, then continuously
|
||||
* runs the bootloader processing routine until instructed to soft-exit.
|
||||
*/
|
||||
int main(void)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
/* Setup hardware required for the bootloader */
|
||||
SetupHardware();
|
||||
boottime = BOOTLOADER_TIMEOUT;
|
||||
/* Enable global interrupts so that the USB stack can function */
|
||||
GlobalInterruptEnable();
|
||||
|
||||
while (RunBootloader)
|
||||
USB_USBTask();
|
||||
|
||||
/* Disconnect from the host - USB interface will be reset later along with the AVR */
|
||||
USB_Detach();
|
||||
|
||||
/* Unlock the forced application start mode of the bootloader if it is restarted */
|
||||
MagicBootKey = MAGIC_BOOT_KEY;
|
||||
|
||||
/* Enable the watchdog and force a timeout to reset the AVR */
|
||||
wdt_enable(WDTO_250MS);
|
||||
|
||||
for (;;);
|
||||
}
|
||||
|
||||
/** Configures all hardware required for the bootloader. */
|
||||
static void SetupHardware(void)
|
||||
{
|
||||
/* Disable watchdog if enabled by bootloader/fuses */
|
||||
MCUSR &= ~(1 << WDRF);
|
||||
wdt_disable();
|
||||
|
||||
/* Relocate the interrupt vector table to the bootloader section */
|
||||
MCUCR = (1 << IVCE);
|
||||
MCUCR = (1 << IVSEL);
|
||||
|
||||
|
||||
// set timer0 counter initial value to 0
|
||||
TCNT0=0x00;
|
||||
// start timer0 with /1024 prescaler
|
||||
TCCR0B = (1<<CS02) | (1<<CS00);
|
||||
TIMSK0=1<<TOIE0;
|
||||
|
||||
/* Initialize USB subsystem */
|
||||
USB_Init();
|
||||
}
|
||||
|
||||
/** Event handler for the USB_ConfigurationChanged event. This configures the device's endpoints ready
|
||||
* to relay data to and from the attached USB host.
|
||||
*/
|
||||
void EVENT_USB_Device_ConfigurationChanged(void)
|
||||
{
|
||||
/* Setup HID Report Endpoint */
|
||||
Endpoint_ConfigureEndpoint(HID_IN_EPADDR, EP_TYPE_INTERRUPT, HID_IN_EPSIZE, 1);
|
||||
}
|
||||
|
||||
/** Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to
|
||||
* the device from the USB host before passing along unhandled control requests to the library for processing
|
||||
* internally.
|
||||
*/
|
||||
void EVENT_USB_Device_ControlRequest(void)
|
||||
{
|
||||
/* Ignore any requests that aren't directed to the HID interface */
|
||||
if ((USB_ControlRequest.bmRequestType & (CONTROL_REQTYPE_TYPE | CONTROL_REQTYPE_RECIPIENT)) !=
|
||||
(REQTYPE_CLASS | REQREC_INTERFACE))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Process HID specific control requests */
|
||||
switch (USB_ControlRequest.bRequest)
|
||||
{
|
||||
case HID_REQ_SetReport:
|
||||
Endpoint_ClearSETUP();
|
||||
|
||||
/* Wait until the command has been sent by the host */
|
||||
while (!(Endpoint_IsOUTReceived()));
|
||||
|
||||
/* Read in the write destination address */
|
||||
#if (FLASHEND > 0xFFFF)
|
||||
uint32_t PageAddress = ((uint32_t)Endpoint_Read_16_LE() << 8);
|
||||
#else
|
||||
uint16_t PageAddress = Endpoint_Read_16_LE();
|
||||
#endif
|
||||
|
||||
/* Check if the command is a program page command, or a start application command */
|
||||
#if (FLASHEND > 0xFFFF)
|
||||
if ((uint16_t)(PageAddress >> 8) == COMMAND_STARTAPPLICATION)
|
||||
#else
|
||||
if (PageAddress == COMMAND_STARTAPPLICATION)
|
||||
#endif
|
||||
{
|
||||
RunBootloader = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
boottime = BOOTLOADER_TIMEOUT;
|
||||
/* Erase the given FLASH page, ready to be programmed */
|
||||
boot_page_erase(PageAddress);
|
||||
boot_spm_busy_wait();
|
||||
|
||||
/* Write each of the FLASH page's bytes in sequence */
|
||||
for (uint8_t PageWord = 0; PageWord < (SPM_PAGESIZE / 2); PageWord++)
|
||||
{
|
||||
/* Check if endpoint is empty - if so clear it and wait until ready for next packet */
|
||||
if (!(Endpoint_BytesInEndpoint()))
|
||||
{
|
||||
Endpoint_ClearOUT();
|
||||
while (!(Endpoint_IsOUTReceived()));
|
||||
}
|
||||
|
||||
/* Write the next data word to the FLASH page */
|
||||
boot_page_fill(PageAddress + ((uint16_t)PageWord << 1), Endpoint_Read_16_LE());
|
||||
}
|
||||
|
||||
/* Write the filled FLASH page to memory */
|
||||
boot_page_write(PageAddress);
|
||||
boot_spm_busy_wait();
|
||||
|
||||
/* Re-enable RWW section */
|
||||
boot_rww_enable();
|
||||
}
|
||||
|
||||
Endpoint_ClearOUT();
|
||||
|
||||
Endpoint_ClearStatusStage();
|
||||
break;
|
||||
}
|
||||
}
|
||||
// timer0 overflow 60hz
|
||||
ISR(TIMER0_OVF_vect) {
|
||||
if (boottime!=0)
|
||||
boottime--;
|
||||
else
|
||||
RunBootloader = false;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
/*
|
||||
This software is based on the LUFA library. Modifications of the
|
||||
software are released under GPL but LUFA library itself is copyrigthed
|
||||
by its creator Dean Camera. Refer to the license below on the usage of
|
||||
LUFA library.
|
||||
|
||||
Chris Boudacoff @ Olimex Ltd
|
||||
chris <at> protonic <dot> co <dot> uk
|
||||
*/
|
||||
|
||||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2015.
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.lufa-lib.org
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaims all warranties with regard to this
|
||||
software, including all implied warranties of merchantability
|
||||
and fitness. In no event shall the author be liable for any
|
||||
special, indirect or consequential damages or any damages
|
||||
whatsoever resulting from loss of use, data or profits, whether
|
||||
in an action of contract, negligence or other tortious action,
|
||||
arising out of or in connection with the use or performance of
|
||||
this software.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* Header file for BootloaderHID.c.
|
||||
*/
|
||||
|
||||
#ifndef _BOOTLOADERHID_H_
|
||||
#define _BOOTLOADERHID_H_
|
||||
|
||||
/* Includes: */
|
||||
#include <avr/io.h>
|
||||
#include <avr/wdt.h>
|
||||
#include <avr/boot.h>
|
||||
#include <avr/power.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "Descriptors.h"
|
||||
|
||||
#include <LUFA/Drivers/USB/USB.h>
|
||||
#include <LUFA/Platform/Platform.h>
|
||||
|
||||
/* Preprocessor Checks: */
|
||||
#if !defined(__OPTIMIZE_SIZE__)
|
||||
#error This bootloader requires that it be optimized for size, not speed, to fit into the target device. Change optimization settings and try again.
|
||||
#endif
|
||||
|
||||
/* Macros: */
|
||||
/** Bootloader special address to start the user application */
|
||||
#define COMMAND_STARTAPPLICATION 0xFFFF
|
||||
|
||||
/** Magic bootloader key to unlock forced application start mode. */
|
||||
#define MAGIC_BOOT_KEY 0xDC42
|
||||
|
||||
#define BOOTLOADER_TIMEOUT 20
|
||||
// abt 10 sec
|
||||
|
||||
|
||||
/* Function Prototypes: */
|
||||
static void SetupHardware(void);
|
||||
|
||||
void Application_Jump_Check(void) ATTR_INIT_SECTION(3);
|
||||
|
||||
void EVENT_USB_Device_ConfigurationChanged(void);
|
||||
void EVENT_USB_Device_UnhandledControlRequest(void);
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,141 @@
|
||||
:1070000055C0000086C0000084C0000082C000009F
|
||||
:1070100080C000007EC000007CC000007AC000007C
|
||||
:1070200078C0000076C0000044C2000072C00000BA
|
||||
:1070300070C000006EC000006CC000006AC000009C
|
||||
:1070400068C0000066C0000064C0000062C00000AC
|
||||
:1070500060C000005EC000005CC0000007C100000E
|
||||
:1070600058C0000056C0000054C0000052C00000CC
|
||||
:1070700050C000004EC000004CC000004AC00000DC
|
||||
:1070800048C0000046C0000044C0000042C00000EC
|
||||
:1070900040C000003EC000003CC000003AC00000FC
|
||||
:1070A00038C0000036C0000034C0000011241FBEEC
|
||||
:1070B000CFEFDAE0DEBFCDBF20E030E0F90145914F
|
||||
:1070C000549104B603FE10C080915601909157016F
|
||||
:1070D00082349C4D49F44F3F5F4F31F0109257017D
|
||||
:1070E00010925601F901099511E0A0E0B1E0E6E542
|
||||
:1070F000F8E702C005900D92AA34B107D9F721E054
|
||||
:10710000AAE4B1E001C01D92A635B207E1F702D0B2
|
||||
:10711000A0C376CF84B7877F84BF0FB6F894A895B5
|
||||
:1071200080916000886180936000109260000FBEC3
|
||||
:1071300081E085BF92E095BF16BC95E095BD809338
|
||||
:107140006E009AD184E690E090934B0180934A01BF
|
||||
:10715000789480910001882311F062D3FACF809156
|
||||
:10716000E00081608093E00082E49CED9093570101
|
||||
:10717000809356019CE088E10FB6F894A89580931F
|
||||
:1071800060000FBE90936000FFCF42E361EC81E0AE
|
||||
:1071900007C180914E018F77813209F066C08091DE
|
||||
:1071A0004F01893009F061C08091E800877F8093AA
|
||||
:1071B000E8008091E80082FFFCCF3091F10020913F
|
||||
:1071C000F100832F922F8F3F2FEF920719F4109227
|
||||
:1071D000000145C024E630E030934B0120934A0182
|
||||
:1071E00023E0FC0120935700E89507B600FCFDCF93
|
||||
:1071F00040E050E061E07091F3002091F20030E057
|
||||
:10720000372B232BD9F0E091F1007091F1002E2F54
|
||||
:10721000372FFA01EE0FFF1FE80FF91F09016093E6
|
||||
:107220005700E89511244F5F5F4F4034510519F71F
|
||||
:1072300025E0FC0120935700E8950AC02091E80062
|
||||
:107240002B772093E8002091E80022FFFCCFDBCFD2
|
||||
:1072500007B600FCFDCF81E180935700E89580914F
|
||||
:10726000E8008B778093E800AFC008951F920F92DB
|
||||
:107270000FB60F9211248F939F9380914A019091A2
|
||||
:107280004B01009731F0019790934B0180934A0195
|
||||
:1072900002C0109200019F918F910F900FBE0F902E
|
||||
:1072A0001F901895913049F0923061F0913279F049
|
||||
:1072B00085E190E025E331E00EC082E190E023E239
|
||||
:1072C00031E009C082E290E021E031E004C089E0D1
|
||||
:1072D00090E023E131E0FA01318320830895209189
|
||||
:1072E0005401309155012617370748F06115710593
|
||||
:1072F00039F42091E8002E772093E80001C0B9010D
|
||||
:1073000040E061157105A1F12EB3222309F442C0BA
|
||||
:10731000253009F441C02091E80023FD3FC02091B1
|
||||
:10732000E80022FD31C02091E80020FFEACF409123
|
||||
:10733000F3002091F20030E0342BFC01CF01611505
|
||||
:10734000710559F02830310540F481918093F100A6
|
||||
:10735000615071092F5F3F4FF1CF41E02830310577
|
||||
:1073600009F040E02091E8002E772093E800C9CF93
|
||||
:107370004111CACF09C08EB3882361F0853061F016
|
||||
:107380008091E80083FD0AC08091E80082FFF3CF7E
|
||||
:1073900080E0089582E0089583E0089581E00895F3
|
||||
:1073A0008F708093E900EBEEF0E080818160808354
|
||||
:1073B000EDEEF0E010826093EC0040838091EE00EF
|
||||
:1073C000881F8827881F089580914E0187FF0FC06E
|
||||
:1073D0008091E80082FD04C08EB38111F9CF10C006
|
||||
:1073E0008091E8008B770AC08EB3882349F08091A2
|
||||
:1073F000E80080FFF9CF8091E8008E778093E80065
|
||||
:1074000008950F931F93CF93DF9346D04DD0C8EDCF
|
||||
:10741000D0E088818F77888388818068888388819D
|
||||
:107420008F7D888319BC1EBA10924C0100EE10E0CB
|
||||
:10743000F80180818B7F808388818160888342E02E
|
||||
:1074400060E080E0ADDFE1EEF0E080818E7F808360
|
||||
:10745000E2EEF0E0808181608083808188608083BB
|
||||
:10746000F80180818E7F8083888180618883DF91AD
|
||||
:10747000CF911F910F910895E8EDF0E080818F7E0C
|
||||
:107480008083E7EDF0E080818160808384E082BFCB
|
||||
:1074900081E080934D01B5CFE8EDF0E080818E7FF3
|
||||
:1074A00080831092E20008951092DA001092E100B9
|
||||
:1074B00008951F920F920FB60F9211242F933F93AE
|
||||
:1074C0004F935F936F937F938F939F93AF93BF93EC
|
||||
:1074D000EF93FF938091DA0080FF1BC08091D8006A
|
||||
:1074E00080FF17C08091DA008E7F8093DA00809150
|
||||
:1074F000D90080FF0BC080E189BD82E189BD09B45C
|
||||
:1075000000FEFDCF81E08EBB8AD103C019BC1EBA3C
|
||||
:1075100086D18091E10080FF17C08091E20080FF5A
|
||||
:1075200013C08091E2008E7F8093E2008091E200A0
|
||||
:1075300080618093E2008091D80080628093D800BF
|
||||
:1075400019BC85E08EBB6BD18091E10084FF2EC019
|
||||
:107550008091E20084FF2AC080E189BD82E189BD7B
|
||||
:1075600009B400FEFDCF8091D8008F7D8093D800B4
|
||||
:107570008091E1008F7E8093E1008091E2008F7E18
|
||||
:107580008093E2008091E20081608093E20080912C
|
||||
:107590004C01882311F084E007C08091E30087FD4F
|
||||
:1075A00002C081E001C083E08EBB39D18091E1004F
|
||||
:1075B00083FF21C08091E20083FF1DC08091E10024
|
||||
:1075C000877F8093E10082E08EBB10924C01809116
|
||||
:1075D000E1008E7F8093E1008091E2008E7F8093B6
|
||||
:1075E000E2008091E20080618093E20042E060E08E
|
||||
:1075F00080E0D6DE14D1FF91EF91BF91AF919F91C2
|
||||
:107600008F917F916F915F914F913F912F910F904B
|
||||
:107610000FBE0F901F9018951F93CF93DF9300D04C
|
||||
:10762000CDB7DEB7EEE4F1E088E08E0F9091F10087
|
||||
:1076300091938E13FBCFADDD8091E80083FFDBC01B
|
||||
:1076400080914E0190914F01953009F466C030F45D
|
||||
:10765000913059F168F0933041F1CDC0983009F480
|
||||
:107660009DC0993009F4ACC0963009F0C4C076C012
|
||||
:10767000803881F0823809F0BEC0809152018F704D
|
||||
:107680008093E9008091EB0085FB882780F91092B8
|
||||
:10769000E90001C080E09091E800977F9093E800B6
|
||||
:1076A0008093F1001092F10084C0282F2D7F09F003
|
||||
:1076B000A2C0823009F09FC080915001811127C083
|
||||
:1076C000809152018F7009F496C08093E900209157
|
||||
:1076D000EB0020FF1CC0933021F48091EB0080620E
|
||||
:1076E00014C09091EB0090619093EB0021E030E0AA
|
||||
:1076F000A90102C0440F551F8A95E2F74093EA00A2
|
||||
:107700001092EA008091EB0088608093EB00109269
|
||||
:10771000E9008091E800877F4FC081116CC0109113
|
||||
:1077200050011F778091E3008078812B8093E300E4
|
||||
:107730008091E800877F8093E80046DE8091E80032
|
||||
:1077400080FFFCCF8091E30080688093E3001111FB
|
||||
:1077500002C082E001C083E08EBB4DC08058823001
|
||||
:1077600008F049C0AE014F5F5F4F609152018091B8
|
||||
:1077700050019091510196DDBC01892B09F43BC069
|
||||
:107780009091E800977F9093E80089819A81A7DD26
|
||||
:107790008091E8008B778093E8002DC0803859F500
|
||||
:1077A0008091E800877F8093E80080914C0180936E
|
||||
:1077B000F1008091E8008E778093E80005DE1BC021
|
||||
:1077C000811119C0909150019230A8F48091E80085
|
||||
:1077D000877F8093E80090934C01F6DD80914C0107
|
||||
:1077E000811106C08091E30087FD02C081E001C0E5
|
||||
:1077F00084E08EBBCADC8091E80083FF0AC08091E0
|
||||
:10780000E800877F8093E8008091EB00806280939E
|
||||
:10781000EB000F900F90DF91CF911F910895089585
|
||||
:10782000CF938EB3882399F0C091E900CF709091E7
|
||||
:10783000EC00892F817090FD80E8C82B1092E90040
|
||||
:107840008091E80083FDE8DECF70C093E900CF911E
|
||||
:067850000895F894FFCF3B
|
||||
:10785600010902220001010080320904000001032F
|
||||
:10786600000000092111010001221500070581030E
|
||||
:107876004000051201100100000008BA153B000186
|
||||
:10788600000000000106DCFF09FBA101090215004A
|
||||
:0A78960025FF75089682009102C0DC
|
||||
:040000030000700089
|
||||
:00000001FF
|
@ -0,0 +1,154 @@
|
||||
U CALLBACK_HIDParser_FilterHIDReportItem
|
||||
00000000 W __heap_end
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
00000400 A __FUSE_REGION_LENGTH__
|
||||
00000400 A __LOCK_REGION_LENGTH__
|
||||
00000400 A __SIGNATURE_REGION_LENGTH__
|
||||
00000400 A __USER_SIGNATURE_REGION_LENGTH__
|
||||
00000aff W __stack
|
||||
00007000 W __vector_default
|
||||
00007000 T __vectors
|
||||
000070ac T __ctors_end
|
||||
000070ac T __ctors_start
|
||||
000070ac T __dtors_end
|
||||
000070ac T __dtors_start
|
||||
000070ac W __init
|
||||
000070ac T __trampolines_end
|
||||
000070ac T __trampolines_start
|
||||
000070b8 T Application_Jump_Check
|
||||
000070e8 T __do_copy_data
|
||||
000070fe T __do_clear_bss
|
||||
00007106 t .do_clear_bss_loop
|
||||
00007108 t .do_clear_bss_start
|
||||
00007112 T __bad_interrupt
|
||||
00007112 W __vector_1
|
||||
00007112 W __vector_11
|
||||
00007112 W __vector_12
|
||||
00007112 W __vector_13
|
||||
00007112 W __vector_14
|
||||
00007112 W __vector_15
|
||||
00007112 W __vector_16
|
||||
00007112 W __vector_17
|
||||
00007112 W __vector_18
|
||||
00007112 W __vector_19
|
||||
00007112 W __vector_2
|
||||
00007112 W __vector_20
|
||||
00007112 W __vector_21
|
||||
00007112 W __vector_22
|
||||
00007112 W __vector_24
|
||||
00007112 W __vector_25
|
||||
00007112 W __vector_26
|
||||
00007112 W __vector_27
|
||||
00007112 W __vector_28
|
||||
00007112 W __vector_29
|
||||
00007112 W __vector_3
|
||||
00007112 W __vector_30
|
||||
00007112 W __vector_31
|
||||
00007112 W __vector_32
|
||||
00007112 W __vector_33
|
||||
00007112 W __vector_34
|
||||
00007112 W __vector_35
|
||||
00007112 W __vector_36
|
||||
00007112 W __vector_37
|
||||
00007112 W __vector_38
|
||||
00007112 W __vector_39
|
||||
00007112 W __vector_4
|
||||
00007112 W __vector_40
|
||||
00007112 W __vector_41
|
||||
00007112 W __vector_42
|
||||
00007112 W __vector_5
|
||||
00007112 W __vector_6
|
||||
00007112 W __vector_7
|
||||
00007112 W __vector_8
|
||||
00007112 W __vector_9
|
||||
00007114 T main
|
||||
0000718a T EVENT_USB_Device_ConfigurationChanged
|
||||
00007192 T EVENT_USB_Device_ControlRequest
|
||||
0000726c T __vector_23
|
||||
000072a4 T CALLBACK_USB_GetDescriptor
|
||||
000072de T Endpoint_Write_Control_Stream_LE
|
||||
000073a0 T Endpoint_ConfigureEndpoint_Prv
|
||||
000073c8 T Endpoint_ClearStatusStage
|
||||
00007402 T USB_ResetInterface
|
||||
00007478 T USB_Init
|
||||
00007498 T USB_INT_DisableAllInterrupts
|
||||
000074a8 T USB_INT_ClearAllInterrupts
|
||||
000074b2 T __vector_10
|
||||
00007618 T USB_Device_ProcessControlRequest
|
||||
0000781e W EVENT_USB_Device_Connect
|
||||
0000781e W EVENT_USB_Device_Disconnect
|
||||
0000781e W EVENT_USB_Device_Reset
|
||||
0000781e W EVENT_USB_Device_StartOfFrame
|
||||
0000781e W EVENT_USB_Device_Suspend
|
||||
0000781e W EVENT_USB_Device_WakeUp
|
||||
0000781e T USB_Event_Stub
|
||||
00007820 T USB_USBTask
|
||||
00007852 W exit
|
||||
00007852 T _exit
|
||||
00007854 t __stop_program
|
||||
00007856 A __data_load_start
|
||||
00007856 T _etext
|
||||
000078a0 A __data_load_end
|
||||
0000ffa0 A __DATA_REGION_LENGTH__
|
||||
00010000 A __EEPROM_REGION_LENGTH__
|
||||
00020000 A __TEXT_REGION_LENGTH__
|
||||
00800100 D __data_start
|
||||
00800100 d RunBootloader
|
||||
00800101 D ConfigurationDescriptor
|
||||
00800123 D DeviceDescriptor
|
||||
00800135 D HIDReport
|
||||
0080014a B boottime
|
||||
0080014a B __bss_start
|
||||
0080014a D __data_end
|
||||
0080014a D _edata
|
||||
0080014c B USB_Device_ConfigurationNumber
|
||||
0080014d B USB_IsInitialized
|
||||
0080014e B USB_ControlRequest
|
||||
00800156 B __bss_end
|
||||
00800156 B MagicBootKey
|
||||
00800158 B _end
|
||||
00810000 N __eeprom_end
|
@ -0,0 +1,105 @@
|
||||
/** \file
|
||||
*
|
||||
* This file contains special DoxyGen information for the generation of the main page and other special
|
||||
* documentation pages. It is not a project source file.
|
||||
*/
|
||||
|
||||
/** \mainpage HID Class USB AVR Bootloader
|
||||
*
|
||||
* \section SSec_Compat Demo Compatibility:
|
||||
*
|
||||
* The following list indicates what microcontrollers are compatible with this demo.
|
||||
*
|
||||
* \li Series 7 USB AVRs (AT90USBxxx7)
|
||||
* \li Series 6 USB AVRs (AT90USBxxx6)
|
||||
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
||||
* \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
|
||||
*
|
||||
* \section SSec_Info USB Information:
|
||||
*
|
||||
* The following table gives a rundown of the USB utilization of this demo.
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <td><b>USB Mode:</b></td>
|
||||
* <td>Device</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><b>USB Class:</b></td>
|
||||
* <td>Human Interface Device Class (HID)</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><b>USB Subclass:</b></td>
|
||||
* <td>N/A</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><b>Relevant Standards:</b></td>
|
||||
* <td>USBIF HID Class Standard \n
|
||||
* Teensy Programming Protocol Specification</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><b>Supported USB Speeds:</b></td>
|
||||
* <td>Low Speed Mode \n
|
||||
* Full Speed Mode</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*
|
||||
* \section SSec_Description Project Description:
|
||||
*
|
||||
* This bootloader enumerates to the host as a HID Class device, allowing for device FLASH programming through
|
||||
* the supplied command line software, which is a modified version of Paul's TeensyHID Command Line loader code
|
||||
* from PJRC (used with permission). This bootloader is deliberately non-compatible with the proprietary PJRC
|
||||
* HalfKay bootloader GUI; only the command line interface software accompanying this bootloader will work with it.
|
||||
*
|
||||
* Out of the box this bootloader builds for the AT90USB1287 with an 8KB bootloader section size, and will fit
|
||||
* into 2KB of bootloader space for the Series 2 USB AVRs (ATMEGAxxU2, AT90USBxx2) or 4KB of bootloader space for
|
||||
* all other models. If you wish to alter this size and/or change the AVR model, you will need to edit the MCU,
|
||||
* FLASH_SIZE_KB and BOOT_SECTION_SIZE_KB values in the accompanying makefile.
|
||||
*
|
||||
* \warning <b>THIS BOOTLOADER IS NOT SECURE.</b> Malicious entities can recover written data, even if the device
|
||||
* lockbits are set.
|
||||
*
|
||||
* \section Sec_Running Running the Bootloader
|
||||
*
|
||||
* This bootloader is designed to be started via the \c HWB mechanism of the USB AVRs; ground the \c HWB pin (see device
|
||||
* datasheet) then momentarily ground \c /RESET to start the bootloader. This assumes the \c HWBE fuse is set and the
|
||||
* \c BOOTRST fuse is cleared.
|
||||
*
|
||||
* \section Sec_Installation Driver Installation
|
||||
*
|
||||
* This bootloader uses the HID class driver inbuilt into all modern operating systems, thus no additional drivers
|
||||
* need to be supplied for correct operation.
|
||||
*
|
||||
* \section Sec_HostApp Host Controller Application
|
||||
*
|
||||
* Due to licensing issues, the supplied bootloader is compatible with the HalfKay bootloader protocol designed
|
||||
* by PJRC, but is <b>not compatible with the cross-platform loader GUI</b>. A modified version of the open source
|
||||
* cross-platform TeensyLoader application is supplied, which can be compiled under most operating systems. The
|
||||
* command-line loader application should remain compatible with genuine Teensy boards in addition to boards using
|
||||
* this custom bootloader.
|
||||
*
|
||||
* Once compiled, programs can be loaded into the AVR's FLASH memory through the following example command:
|
||||
* \code
|
||||
* hid_bootloader_cli -mmcu=at90usb1287 Mouse.hex
|
||||
* \endcode
|
||||
*
|
||||
* \section Sec_KnownIssues Known Issues:
|
||||
*
|
||||
* \par After loading an application, it is not run automatically on startup.
|
||||
* Some USB AVR boards ship with the \c BOOTRST fuse set, causing the bootloader
|
||||
* to run automatically when the device is reset. This booloader requires the
|
||||
* \c BOOTRST be disabled and the HWBE fuse used instead to run the bootloader
|
||||
* when needed.
|
||||
*
|
||||
* \section SSec_Options Project Options
|
||||
*
|
||||
* The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <td>
|
||||
* None
|
||||
* </td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*/
|
@ -0,0 +1,93 @@
|
||||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2015.
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.lufa-lib.org
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaims all warranties with regard to this
|
||||
software, including all implied warranties of merchantability
|
||||
and fitness. In no event shall the author be liable for any
|
||||
special, indirect or consequential damages or any damages
|
||||
whatsoever resulting from loss of use, data or profits, whether
|
||||
in an action of contract, negligence or other tortious action,
|
||||
arising out of or in connection with the use or performance of
|
||||
this software.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
* \brief LUFA Library Configuration Header File
|
||||
*
|
||||
* This header file is used to configure LUFA's compile time options,
|
||||
* as an alternative to the compile time constants supplied through
|
||||
* a makefile.
|
||||
*
|
||||
* For information on what each token does, refer to the LUFA
|
||||
* manual section "Summary of Compile Tokens".
|
||||
*/
|
||||
|
||||
#ifndef _LUFA_CONFIG_H_
|
||||
#define _LUFA_CONFIG_H_
|
||||
|
||||
#if (ARCH == ARCH_AVR8)
|
||||
|
||||
/* Non-USB Related Configuration Tokens: */
|
||||
// #define DISABLE_TERMINAL_CODES
|
||||
|
||||
/* USB Class Driver Related Tokens: */
|
||||
// #define HID_HOST_BOOT_PROTOCOL_ONLY
|
||||
// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here}
|
||||
// #define HID_USAGE_STACK_DEPTH {Insert Value Here}
|
||||
// #define HID_MAX_COLLECTIONS {Insert Value Here}
|
||||
// #define HID_MAX_REPORTITEMS {Insert Value Here}
|
||||
// #define HID_MAX_REPORT_IDS {Insert Value Here}
|
||||
// #define NO_CLASS_DRIVER_AUTOFLUSH
|
||||
|
||||
/* General USB Driver Related Tokens: */
|
||||
#define ORDERED_EP_CONFIG
|
||||
#define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)
|
||||
#define USB_DEVICE_ONLY
|
||||
// #define USB_HOST_ONLY
|
||||
// #define USB_STREAM_TIMEOUT_MS {Insert Value Here}
|
||||
// #define NO_LIMITED_CONTROLLER_CONNECT
|
||||
#define NO_SOF_EVENTS
|
||||
|
||||
/* USB Device Mode Driver Related Tokens: */
|
||||
#define USE_RAM_DESCRIPTORS
|
||||
// #define USE_FLASH_DESCRIPTORS
|
||||
// #define USE_EEPROM_DESCRIPTORS
|
||||
#define NO_INTERNAL_SERIAL
|
||||
#define FIXED_CONTROL_ENDPOINT_SIZE 8
|
||||
#define DEVICE_STATE_AS_GPIOR 0
|
||||
#define FIXED_NUM_CONFIGURATIONS 1
|
||||
// #define CONTROL_ONLY_DEVICE
|
||||
// #define INTERRUPT_CONTROL_ENDPOINT
|
||||
#define NO_DEVICE_REMOTE_WAKEUP
|
||||
#define NO_DEVICE_SELF_POWER
|
||||
|
||||
/* USB Host Mode Driver Related Tokens: */
|
||||
// #define HOST_STATE_AS_GPIOR {Insert Value Here}
|
||||
// #define USB_HOST_TIMEOUT_MS {Insert Value Here}
|
||||
// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here}
|
||||
// #define NO_AUTO_VBUS_MANAGEMENT
|
||||
// #define INVERTED_VBUS_ENABLE_LINE
|
||||
|
||||
#else
|
||||
|
||||
#error Unsupported architecture for this LUFA configuration file.
|
||||
|
||||
#endif
|
||||
#endif
|
197
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/BootLoaderHID/Descriptors.c
Normal file
197
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/BootLoaderHID/Descriptors.c
Normal file
@ -0,0 +1,197 @@
|
||||
/*
|
||||
This software is based on the LUFA library. Modifications of the
|
||||
software are released under GPL but LUFA library itself is copyrigthed
|
||||
by its creator Dean Camera. Refer to the license below on the usage of
|
||||
LUFA library.
|
||||
|
||||
Chris Boudacoff @ Olimex Ltd
|
||||
chris <at> protonic <dot> co <dot> uk
|
||||
*/
|
||||
|
||||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2015.
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.lufa-lib.org
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaims all warranties with regard to this
|
||||
software, including all implied warranties of merchantability
|
||||
and fitness. In no event shall the author be liable for any
|
||||
special, indirect or consequential damages or any damages
|
||||
whatsoever resulting from loss of use, data or profits, whether
|
||||
in an action of contract, negligence or other tortious action,
|
||||
arising out of or in connection with the use or performance of
|
||||
this software.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* USB Device Descriptors, for library use when in USB device mode. Descriptors are special
|
||||
* computer-readable structures which the host requests upon device enumeration, to determine
|
||||
* the device's capabilities and functions.
|
||||
*/
|
||||
|
||||
#include "Descriptors.h"
|
||||
|
||||
/** HID class report descriptor. This is a special descriptor constructed with values from the
|
||||
* USBIF HID class specification to describe the reports and capabilities of the HID device. This
|
||||
* descriptor is parsed by the host and its contents used to determine what data (and in what encoding)
|
||||
* the device will send, and what it may be sent back from the host. Refer to the HID specification for
|
||||
* more details on HID report descriptors.
|
||||
*/
|
||||
const USB_Descriptor_HIDReport_Datatype_t HIDReport[] =
|
||||
{
|
||||
HID_RI_USAGE_PAGE(16, 0xFFDC), /* Vendor Page 0xDC */
|
||||
HID_RI_USAGE(8, 0xFB), /* Vendor Usage 0xFB */
|
||||
HID_RI_COLLECTION(8, 0x01), /* Vendor Usage 1 */
|
||||
HID_RI_USAGE(8, 0x02), /* Vendor Usage 2 */
|
||||
HID_RI_LOGICAL_MINIMUM(8, 0x00),
|
||||
HID_RI_LOGICAL_MAXIMUM(8, 0xFF),
|
||||
HID_RI_REPORT_SIZE(8, 0x08),
|
||||
HID_RI_REPORT_COUNT(16, (sizeof(uint16_t) + SPM_PAGESIZE)),
|
||||
HID_RI_OUTPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE | HID_IOF_NON_VOLATILE),
|
||||
HID_RI_END_COLLECTION(0),
|
||||
};
|
||||
|
||||
/** Device descriptor structure. This descriptor, located in SRAM memory, describes the overall
|
||||
* device characteristics, including the supported USB version, control endpoint size and the
|
||||
* number of device configurations. The descriptor is read out by the USB host when the enumeration
|
||||
* process begins.
|
||||
*/
|
||||
const USB_Descriptor_Device_t DeviceDescriptor =
|
||||
{
|
||||
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
|
||||
|
||||
.USBSpecification = VERSION_BCD(1,1,0),
|
||||
.Class = USB_CSCP_NoDeviceClass,
|
||||
.SubClass = USB_CSCP_NoDeviceSubclass,
|
||||
.Protocol = USB_CSCP_NoDeviceProtocol,
|
||||
|
||||
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
|
||||
|
||||
.VendorID = 0x15ba, //Vendor: Olimex Ltd
|
||||
.ProductID = 0x003b,
|
||||
.ReleaseNumber = VERSION_BCD(0,0,1),
|
||||
|
||||
.ManufacturerStrIndex = NO_DESCRIPTOR,
|
||||
.ProductStrIndex = NO_DESCRIPTOR,
|
||||
.SerialNumStrIndex = NO_DESCRIPTOR,
|
||||
|
||||
.NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS
|
||||
};
|
||||
|
||||
/** Configuration descriptor structure. This descriptor, located in SRAM memory, describes the usage
|
||||
* of the device in one of its supported configurations, including information about any device interfaces
|
||||
* and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting
|
||||
* a configuration so that the host may correctly communicate with the USB device.
|
||||
*/
|
||||
const USB_Descriptor_Configuration_t ConfigurationDescriptor =
|
||||
{
|
||||
.Config =
|
||||
{
|
||||
.Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
|
||||
|
||||
.TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
|
||||
.TotalInterfaces = 1,
|
||||
|
||||
.ConfigurationNumber = 1,
|
||||
.ConfigurationStrIndex = NO_DESCRIPTOR,
|
||||
|
||||
.ConfigAttributes = USB_CONFIG_ATTR_RESERVED,
|
||||
|
||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||
},
|
||||
|
||||
.HID_Interface =
|
||||
{
|
||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||
|
||||
.InterfaceNumber = INTERFACE_ID_Printer,
|
||||
.AlternateSetting = 0x00,
|
||||
|
||||
.TotalEndpoints = 1,
|
||||
|
||||
.Class = HID_CSCP_HIDClass,
|
||||
.SubClass = HID_CSCP_NonBootSubclass,
|
||||
.Protocol = HID_CSCP_NonBootProtocol,
|
||||
|
||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||
},
|
||||
|
||||
.HID_VendorHID =
|
||||
{
|
||||
.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID},
|
||||
|
||||
.HIDSpec = VERSION_BCD(1,1,1),
|
||||
.CountryCode = 0x00,
|
||||
.TotalReportDescriptors = 1,
|
||||
.HIDReportType = HID_DTYPE_Report,
|
||||
.HIDReportLength = sizeof(HIDReport)
|
||||
},
|
||||
|
||||
.HID_ReportINEndpoint =
|
||||
{
|
||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||
|
||||
.EndpointAddress = HID_IN_EPADDR,
|
||||
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
|
||||
.EndpointSize = HID_IN_EPSIZE,
|
||||
.PollingIntervalMS = 0x05
|
||||
},
|
||||
};
|
||||
|
||||
/** This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors"
|
||||
* documentation) by the application code so that the address and size of a requested descriptor can be given
|
||||
* to the USB library. When the device receives a Get Descriptor request on the control endpoint, this function
|
||||
* is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
|
||||
* USB host.
|
||||
*/
|
||||
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
|
||||
const uint8_t wIndex,
|
||||
const void** const DescriptorAddress)
|
||||
{
|
||||
const uint8_t DescriptorType = (wValue >> 8);
|
||||
|
||||
const void* Address = NULL;
|
||||
uint16_t Size = NO_DESCRIPTOR;
|
||||
|
||||
/* If/Else If chain compiles slightly smaller than a switch case */
|
||||
if (DescriptorType == DTYPE_Device)
|
||||
{
|
||||
Address = &DeviceDescriptor;
|
||||
Size = sizeof(USB_Descriptor_Device_t);
|
||||
}
|
||||
else if (DescriptorType == DTYPE_Configuration)
|
||||
{
|
||||
Address = &ConfigurationDescriptor;
|
||||
Size = sizeof(USB_Descriptor_Configuration_t);
|
||||
}
|
||||
else if (DescriptorType == HID_DTYPE_HID)
|
||||
{
|
||||
Address = &ConfigurationDescriptor.HID_VendorHID;
|
||||
Size = sizeof(USB_HID_Descriptor_HID_t);
|
||||
}
|
||||
else
|
||||
{
|
||||
Address = &HIDReport;
|
||||
Size = sizeof(HIDReport);
|
||||
}
|
||||
|
||||
*DescriptorAddress = Address;
|
||||
return Size;
|
||||
}
|
||||
|
@ -0,0 +1,80 @@
|
||||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2015.
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.lufa-lib.org
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaims all warranties with regard to this
|
||||
software, including all implied warranties of merchantability
|
||||
and fitness. In no event shall the author be liable for any
|
||||
special, indirect or consequential damages or any damages
|
||||
whatsoever resulting from loss of use, data or profits, whether
|
||||
in an action of contract, negligence or other tortious action,
|
||||
arising out of or in connection with the use or performance of
|
||||
this software.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* Header file for Descriptors.c.
|
||||
*/
|
||||
|
||||
#ifndef _DESCRIPTORS_H_
|
||||
#define _DESCRIPTORS_H_
|
||||
|
||||
/* Includes: */
|
||||
#include <LUFA/Drivers/USB/USB.h>
|
||||
|
||||
/* Type Defines: */
|
||||
/** Type define for the device configuration descriptor structure. This must be defined in the
|
||||
* application code, as the configuration descriptor contains several sub-descriptors which
|
||||
* vary between devices, and which describe the device's usage to the host.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// Generic HID Interface
|
||||
USB_Descriptor_Interface_t HID_Interface;
|
||||
USB_HID_Descriptor_HID_t HID_VendorHID;
|
||||
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
||||
} USB_Descriptor_Configuration_t;
|
||||
|
||||
/** Enum for the device interface descriptor IDs within the device. Each interface descriptor
|
||||
* should have a unique ID index associated with it, which can be used to refer to the
|
||||
* interface from other descriptors.
|
||||
*/
|
||||
enum InterfaceDescriptors_t
|
||||
{
|
||||
INTERFACE_ID_Printer = 0, /**< Printer interface descriptor ID */
|
||||
};
|
||||
|
||||
/* Macros: */
|
||||
/** Endpoint address of the HID data IN endpoint. */
|
||||
#define HID_IN_EPADDR (ENDPOINT_DIR_IN | 1)
|
||||
|
||||
/** Size in bytes of the HID reporting IN endpoint. */
|
||||
#define HID_IN_EPSIZE 64
|
||||
|
||||
/* Function Prototypes: */
|
||||
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
|
||||
const uint8_t wIndex,
|
||||
const void** const DescriptorAddress)
|
||||
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
|
||||
|
||||
#endif
|
||||
|
1
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/BootLoaderHID/HostLoaderApp/.gitignore
vendored
Normal file
1
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/BootLoaderHID/HostLoaderApp/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
hid_bootloader_cli
|
@ -0,0 +1,40 @@
|
||||
OS ?= LINUX
|
||||
#OS ?= WINDOWS
|
||||
#OS ?= MACOSX
|
||||
#OS ?= BSD
|
||||
|
||||
ifeq ($(OS), LINUX) # also works on FreeBSD
|
||||
CC ?= gcc
|
||||
CFLAGS ?= -O2 -Wall
|
||||
hid_bootloader_cli: hid_bootloader_cli.c
|
||||
$(CC) $(CFLAGS) -s -DUSE_LIBUSB -o hid_bootloader_cli hid_bootloader_cli.c -lusb
|
||||
|
||||
|
||||
else ifeq ($(OS), WINDOWS)
|
||||
CC = i586-mingw32msvc-gcc
|
||||
CFLAGS ?= -O2 -Wall
|
||||
LDLIB = -lsetupapi -lhid
|
||||
hid_bootloader_cli.exe: hid_bootloader_cli.c
|
||||
$(CC) $(CFLAGS) -s -DUSE_WIN32 -o hid_bootloader_cli.exe hid_bootloader_cli.c $(LDLIB)
|
||||
|
||||
|
||||
else ifeq ($(OS), MACOSX)
|
||||
CC ?= gcc
|
||||
SDK ?= /Developer/SDKs/MacOSX10.5.sdk
|
||||
CFLAGS ?= -O2 -Wall
|
||||
hid_bootloader_cli: hid_bootloader_cli.c
|
||||
$(CC) $(CFLAGS) -DUSE_APPLE_IOKIT -isysroot $(SDK) -o hid_bootloader_cli hid_bootloader_cli.c -Wl,-syslibroot,$(SDK) -framework IOKit -framework CoreFoundation
|
||||
|
||||
|
||||
else ifeq ($(OS), BSD) # works on NetBSD and OpenBSD
|
||||
CC ?= gcct
|
||||
CFLAGS ?= -O2 -Wall
|
||||
hid_bootloader_cli: hid_bootloader_cli.c
|
||||
$(CC) $(CFLAGS) -s -DUSE_UHID -o hid_bootloader_cli hid_bootloader_cli.c
|
||||
|
||||
|
||||
endif
|
||||
|
||||
|
||||
clean:
|
||||
rm -f hid_bootloader_cli hid_bootloader_cli.exe
|
@ -0,0 +1,21 @@
|
||||
OS ?= FreeBSD
|
||||
#OS ?= NetBSD
|
||||
#OS ?= OpenBSD
|
||||
|
||||
CFLAGS ?= -O2 -Wall
|
||||
CC ?= gcc
|
||||
|
||||
.if $(OS) == "FreeBSD"
|
||||
CFLAGS += -DUSE_LIBUSB
|
||||
LIBS = -lusb
|
||||
.elif $(OS) == "NetBSD" || $(OS) == "OpenBSD"
|
||||
CFLAGS += -DUSE_UHID
|
||||
LIBS =
|
||||
.endif
|
||||
|
||||
|
||||
hid_bootloader_cli: hid_bootloader_cli.c
|
||||
$(CC) $(CFLAGS) -s -o hid_bootloader_cli hid_bootloader_cli.c $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f hid_bootloader_cli
|
@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
1027
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/BootLoaderHID/HostLoaderApp/hid_bootloader_cli.c
Normal file
1027
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/BootLoaderHID/HostLoaderApp/hid_bootloader_cli.c
Normal file
@ -0,0 +1,1027 @@
|
||||
/*
|
||||
This software is based on the LUFA library. Modifications of the
|
||||
software are released under GPL but LUFA library itself is copyrigthed
|
||||
by its creator Dean Camera. Refer to the license below on the usage of
|
||||
LUFA library.
|
||||
|
||||
Chris Boudacoff @ Olimex Ltd
|
||||
chris <at> protonic <dot> co <dot> uk
|
||||
*/
|
||||
|
||||
/* Modified for the LUFA HID Bootloader by Dean Camera
|
||||
* http://www.lufa-lib.org
|
||||
*
|
||||
* THIS MODIFIED VERSION IS UNSUPPORTED BY PJRC.
|
||||
*/
|
||||
|
||||
/* Teensy Loader, Command Line Interface
|
||||
* Program and Reboot Teensy Board with HalfKay Bootloader
|
||||
* http://www.pjrc.com/teensy/loader_cli.html
|
||||
* Copyright 2008-2010, PJRC.COM, LLC
|
||||
*
|
||||
*
|
||||
* You may redistribute this program and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software
|
||||
* Foundation, version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see http://www.gnu.org/licenses/
|
||||
*/
|
||||
|
||||
/* Want to incorporate this code into a proprietary application??
|
||||
* Just email paul@pjrc.com to ask. Usually it's not a problem,
|
||||
* but you do need to ask to use this code in any way other than
|
||||
* those permitted by the GNU General Public License, version 3 */
|
||||
|
||||
/* For non-root permissions on ubuntu or similar udev-based linux
|
||||
* http://www.pjrc.com/teensy/49-teensy.rules
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
void usage(void)
|
||||
{
|
||||
fprintf(stderr, "Usage: hid_bootloader_cli -mmcu=<MCU> [-w] [-h] [-n] [-v] <file.hex>\n");
|
||||
fprintf(stderr, "\t-w : Wait for device to appear\n");
|
||||
fprintf(stderr, "\t-r : Use hard reboot if device not online\n");
|
||||
fprintf(stderr, "\t-n : No reboot after programming\n");
|
||||
fprintf(stderr, "\t-v : Verbose output\n");
|
||||
fprintf(stderr, "\n<MCU> = atmegaXXuY or at90usbXXXY");
|
||||
|
||||
fprintf(stderr, "\nFor support and more information, please visit:\n");
|
||||
fprintf(stderr, "http://www.lufa-lib.org\n");
|
||||
|
||||
fprintf(stderr, "\nBased on the TeensyHID command line programmer software:\n");
|
||||
fprintf(stderr, "http://www.pjrc.com/teensy/loader_cli.html\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// USB Access Functions
|
||||
int teensy_open(void);
|
||||
int teensy_write(void *buf, int len, double timeout);
|
||||
void teensy_close(void);
|
||||
int hard_reboot(void);
|
||||
|
||||
// Intel Hex File Functions
|
||||
int read_intel_hex(const char *filename);
|
||||
int ihex_bytes_within_range(int begin, int end);
|
||||
void ihex_get_data(int addr, int len, unsigned char *bytes);
|
||||
|
||||
// Misc stuff
|
||||
int printf_verbose(const char *format, ...);
|
||||
void delay(double seconds);
|
||||
void die(const char *str, ...);
|
||||
void parse_options(int argc, char **argv);
|
||||
|
||||
// options (from user via command line args)
|
||||
int wait_for_device_to_appear = 0;
|
||||
int hard_reboot_device = 0;
|
||||
int reboot_after_programming = 1;
|
||||
int verbose = 0;
|
||||
int code_size = 0, block_size = 0;
|
||||
const char *filename=NULL;
|
||||
|
||||
|
||||
/****************************************************************/
|
||||
/* */
|
||||
/* Main Program */
|
||||
/* */
|
||||
/****************************************************************/
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
unsigned char buf[260];
|
||||
int num, addr, r, first_block=1, waited=0;
|
||||
|
||||
// parse command line arguments
|
||||
parse_options(argc, argv);
|
||||
if (!filename) {
|
||||
fprintf(stderr, "Filename must be specified\n\n");
|
||||
usage();
|
||||
}
|
||||
if (!code_size) {
|
||||
fprintf(stderr, "MCU type must be specified\n\n");
|
||||
usage();
|
||||
}
|
||||
printf_verbose("Teres Loader, Command Line, Version 0.9\n");
|
||||
|
||||
// read the intel hex file
|
||||
// this is done first so any error is reported before using USB
|
||||
num = read_intel_hex(filename);
|
||||
if (num < 0) die("error reading intel hex file \"%s\"", filename);
|
||||
printf_verbose("Read \"%s\": %d bytes, %.1f%% usage\n",
|
||||
filename, num, (double)num / (double)code_size * 100.0);
|
||||
|
||||
// open the USB device
|
||||
while (1) {
|
||||
if (teensy_open()) break;
|
||||
if (hard_reboot_device) {
|
||||
if (!hard_reboot()) die("Unable to find rebootor\n");
|
||||
printf_verbose("Hard Reboot performed\n");
|
||||
hard_reboot_device = 0; // only hard reboot once
|
||||
wait_for_device_to_appear = 1;
|
||||
}
|
||||
if (!wait_for_device_to_appear) die("Unable to open device\n");
|
||||
if (!waited) {
|
||||
printf_verbose("Waiting for bootloader...\n");
|
||||
printf_verbose(" (hint: press the Fn+Tux+ESC buttons)\n");
|
||||
waited = 1;
|
||||
}
|
||||
delay(0.25);
|
||||
}
|
||||
printf_verbose("Found TERES Bootloader\n");
|
||||
|
||||
// if we waited for the device, read the hex file again
|
||||
// perhaps it changed while we were waiting?
|
||||
if (waited) {
|
||||
num = read_intel_hex(filename);
|
||||
if (num < 0) die("error reading intel hex file \"%s\"", filename);
|
||||
printf_verbose("Read \"%s\": %d bytes, %.1f%% usage\n",
|
||||
filename, num, (double)num / (double)code_size * 100.0);
|
||||
}
|
||||
|
||||
// program the data
|
||||
printf_verbose("Programming");
|
||||
fflush(stdout);
|
||||
for (addr = 0; addr < code_size; addr += block_size) {
|
||||
if (addr > 0 && !ihex_bytes_within_range(addr, addr + block_size - 1)) {
|
||||
// don't waste time on blocks that are unused,
|
||||
// but always do the first one to erase the chip
|
||||
continue;
|
||||
}
|
||||
printf_verbose(".");
|
||||
if (code_size < 0x10000) {
|
||||
buf[0] = addr & 255;
|
||||
buf[1] = (addr >> 8) & 255;
|
||||
} else {
|
||||
buf[0] = (addr >> 8) & 255;
|
||||
buf[1] = (addr >> 16) & 255;
|
||||
}
|
||||
ihex_get_data(addr, block_size, buf + 2);
|
||||
r = teensy_write(buf, block_size + 2, first_block ? 3.0 : 0.25);
|
||||
if (!r) die("error writing to TERES\n");
|
||||
first_block = 0;
|
||||
}
|
||||
printf_verbose("\n");
|
||||
|
||||
// reboot to the user's new code
|
||||
if (reboot_after_programming) {
|
||||
printf_verbose("Booting\n");
|
||||
buf[0] = 0xFF;
|
||||
buf[1] = 0xFF;
|
||||
memset(buf + 2, 0, sizeof(buf) - 2);
|
||||
teensy_write(buf, block_size + 2, 0.25);
|
||||
}
|
||||
teensy_close();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/****************************************************************/
|
||||
/* */
|
||||
/* USB Access - libusb (Linux & FreeBSD) */
|
||||
/* */
|
||||
/****************************************************************/
|
||||
|
||||
#if defined(USE_LIBUSB)
|
||||
|
||||
// http://libusb.sourceforge.net/doc/index.html
|
||||
#include <usb.h>
|
||||
|
||||
usb_dev_handle * open_usb_device(int vid, int pid)
|
||||
{
|
||||
struct usb_bus *bus;
|
||||
struct usb_device *dev;
|
||||
usb_dev_handle *h;
|
||||
#ifdef LIBUSB_HAS_GET_DRIVER_NP
|
||||
char buf[128];
|
||||
#endif
|
||||
int r;
|
||||
|
||||
usb_init();
|
||||
usb_find_busses();
|
||||
usb_find_devices();
|
||||
//printf_verbose("\nSearching for USB device:\n");
|
||||
for (bus = usb_get_busses(); bus; bus = bus->next) {
|
||||
for (dev = bus->devices; dev; dev = dev->next) {
|
||||
//printf_verbose("bus \"%s\", device \"%s\" vid=%04X, pid=%04X\n",
|
||||
// bus->dirname, dev->filename,
|
||||
// dev->descriptor.idVendor,
|
||||
// dev->descriptor.idProduct
|
||||
//);
|
||||
if (dev->descriptor.idVendor != vid) continue;
|
||||
if (dev->descriptor.idProduct != pid) continue;
|
||||
h = usb_open(dev);
|
||||
if (!h) {
|
||||
printf_verbose("Found device but unable to open");
|
||||
continue;
|
||||
}
|
||||
#ifdef LIBUSB_HAS_GET_DRIVER_NP
|
||||
r = usb_get_driver_np(h, 0, buf, sizeof(buf));
|
||||
if (r >= 0) {
|
||||
r = usb_detach_kernel_driver_np(h, 0);
|
||||
if (r < 0) {
|
||||
usb_close(h);
|
||||
printf_verbose("Device is in use by \"%s\" driver", buf);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// Mac OS-X - removing this call to usb_claim_interface() might allow
|
||||
// this to work, even though it is a clear misuse of the libusb API.
|
||||
// normally Apple's IOKit should be used on Mac OS-X
|
||||
r = usb_claim_interface(h, 0);
|
||||
if (r < 0) {
|
||||
usb_close(h);
|
||||
printf_verbose("Unable to claim interface, check USB permissions");
|
||||
continue;
|
||||
}
|
||||
return h;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static usb_dev_handle *libusb_teensy_handle = NULL;
|
||||
|
||||
int teensy_open(void)
|
||||
{
|
||||
teensy_close();
|
||||
libusb_teensy_handle = open_usb_device(0x15ba, 0x003b);
|
||||
|
||||
if (!libusb_teensy_handle)
|
||||
libusb_teensy_handle = open_usb_device(0x15ba, 0x003b);
|
||||
|
||||
if (!libusb_teensy_handle) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int teensy_write(void *buf, int len, double timeout)
|
||||
{
|
||||
int r;
|
||||
|
||||
if (!libusb_teensy_handle) return 0;
|
||||
r = usb_control_msg(libusb_teensy_handle, 0x21, 9, 0x0200, 0, (char *)buf,
|
||||
len, (int)(timeout * 1000.0));
|
||||
if (r < 0) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void teensy_close(void)
|
||||
{
|
||||
if (!libusb_teensy_handle) return;
|
||||
usb_release_interface(libusb_teensy_handle, 0);
|
||||
usb_close(libusb_teensy_handle);
|
||||
libusb_teensy_handle = NULL;
|
||||
}
|
||||
|
||||
int hard_reboot(void)
|
||||
{
|
||||
usb_dev_handle *rebootor;
|
||||
int r;
|
||||
|
||||
rebootor = open_usb_device(0x15ba, 0x003c);
|
||||
|
||||
if (!rebootor)
|
||||
rebootor = open_usb_device(0x15ba, 0x003b);
|
||||
|
||||
if (!rebootor) return 0;
|
||||
r = usb_control_msg(rebootor, 0x21, 9, 0x0200, 0, "reboot", 6, 100);
|
||||
usb_release_interface(rebootor, 0);
|
||||
usb_close(rebootor);
|
||||
if (r < 0) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************/
|
||||
/* */
|
||||
/* USB Access - Microsoft WIN32 */
|
||||
/* */
|
||||
/****************************************************************/
|
||||
|
||||
#if defined(USE_WIN32)
|
||||
|
||||
// http://msdn.microsoft.com/en-us/library/ms790932.aspx
|
||||
#include <windows.h>
|
||||
#include <setupapi.h>
|
||||
#include <ddk/hidsdi.h>
|
||||
#include <ddk/hidclass.h>
|
||||
|
||||
HANDLE open_usb_device(int vid, int pid)
|
||||
{
|
||||
GUID guid;
|
||||
HDEVINFO info;
|
||||
DWORD index, required_size;
|
||||
SP_DEVICE_INTERFACE_DATA iface;
|
||||
SP_DEVICE_INTERFACE_DETAIL_DATA *details;
|
||||
HIDD_ATTRIBUTES attrib;
|
||||
HANDLE h;
|
||||
BOOL ret;
|
||||
|
||||
HidD_GetHidGuid(&guid);
|
||||
info = SetupDiGetClassDevs(&guid, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
|
||||
if (info == INVALID_HANDLE_VALUE) return NULL;
|
||||
for (index=0; 1 ;index++) {
|
||||
iface.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
|
||||
ret = SetupDiEnumDeviceInterfaces(info, NULL, &guid, index, &iface);
|
||||
if (!ret) {
|
||||
SetupDiDestroyDeviceInfoList(info);
|
||||
break;
|
||||
}
|
||||
SetupDiGetInterfaceDeviceDetail(info, &iface, NULL, 0, &required_size, NULL);
|
||||
details = (SP_DEVICE_INTERFACE_DETAIL_DATA *)malloc(required_size);
|
||||
if (details == NULL) continue;
|
||||
memset(details, 0, required_size);
|
||||
details->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA);
|
||||
ret = SetupDiGetDeviceInterfaceDetail(info, &iface, details,
|
||||
required_size, NULL, NULL);
|
||||
if (!ret) {
|
||||
free(details);
|
||||
continue;
|
||||
}
|
||||
h = CreateFile(details->DevicePath, GENERIC_READ|GENERIC_WRITE,
|
||||
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
|
||||
FILE_FLAG_OVERLAPPED, NULL);
|
||||
free(details);
|
||||
if (h == INVALID_HANDLE_VALUE) continue;
|
||||
attrib.Size = sizeof(HIDD_ATTRIBUTES);
|
||||
ret = HidD_GetAttributes(h, &attrib);
|
||||
if (!ret) {
|
||||
CloseHandle(h);
|
||||
continue;
|
||||
}
|
||||
if (attrib.VendorID != vid || attrib.ProductID != pid) {
|
||||
CloseHandle(h);
|
||||
continue;
|
||||
}
|
||||
SetupDiDestroyDeviceInfoList(info);
|
||||
return h;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int write_usb_device(HANDLE h, void *buf, int len, int timeout)
|
||||
{
|
||||
static HANDLE event = NULL;
|
||||
unsigned char tmpbuf[1040];
|
||||
OVERLAPPED ov;
|
||||
DWORD n, r;
|
||||
|
||||
if (len > sizeof(tmpbuf) - 1) return 0;
|
||||
if (event == NULL) {
|
||||
event = CreateEvent(NULL, TRUE, TRUE, NULL);
|
||||
if (!event) return 0;
|
||||
}
|
||||
ResetEvent(&event);
|
||||
memset(&ov, 0, sizeof(ov));
|
||||
ov.hEvent = event;
|
||||
tmpbuf[0] = 0;
|
||||
memcpy(tmpbuf + 1, buf, len);
|
||||
if (!WriteFile(h, tmpbuf, len + 1, NULL, &ov)) {
|
||||
if (GetLastError() != ERROR_IO_PENDING) return 0;
|
||||
r = WaitForSingleObject(event, timeout);
|
||||
if (r == WAIT_TIMEOUT) {
|
||||
CancelIo(h);
|
||||
return 0;
|
||||
}
|
||||
if (r != WAIT_OBJECT_0) return 0;
|
||||
}
|
||||
if (!GetOverlappedResult(h, &ov, &n, FALSE)) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static HANDLE win32_teensy_handle = NULL;
|
||||
|
||||
int teensy_open(void)
|
||||
{
|
||||
teensy_close();
|
||||
win32_teensy_handle = open_usb_device(0x15ba, 0x003c);
|
||||
|
||||
if (!win32_teensy_handle)
|
||||
win32_teensy_handle = open_usb_device(0x15ba, 0x003b);
|
||||
|
||||
if (!win32_teensy_handle) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int teensy_write(void *buf, int len, double timeout)
|
||||
{
|
||||
int r;
|
||||
if (!win32_teensy_handle) return 0;
|
||||
r = write_usb_device(win32_teensy_handle, buf, len, (int)(timeout * 1000.0));
|
||||
return r;
|
||||
}
|
||||
|
||||
void teensy_close(void)
|
||||
{
|
||||
if (!win32_teensy_handle) return;
|
||||
CloseHandle(win32_teensy_handle);
|
||||
win32_teensy_handle = NULL;
|
||||
}
|
||||
|
||||
int hard_reboot(void)
|
||||
{
|
||||
HANDLE rebootor;
|
||||
int r;
|
||||
|
||||
rebootor = open_usb_device(0x15ba, 0x003c);
|
||||
|
||||
if (!rebootor)
|
||||
rebootor = open_usb_device(0x15ba, 0x003b);
|
||||
|
||||
if (!rebootor) return 0;
|
||||
r = write_usb_device(rebootor, "reboot", 6, 100);
|
||||
CloseHandle(rebootor);
|
||||
return r;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/****************************************************************/
|
||||
/* */
|
||||
/* USB Access - Apple's IOKit, Mac OS-X */
|
||||
/* */
|
||||
/****************************************************************/
|
||||
|
||||
#if defined(USE_APPLE_IOKIT)
|
||||
|
||||
// http://developer.apple.com/technotes/tn2007/tn2187.html
|
||||
#include <IOKit/IOKitLib.h>
|
||||
#include <IOKit/hid/IOHIDLib.h>
|
||||
#include <IOKit/hid/IOHIDDevice.h>
|
||||
|
||||
struct usb_list_struct {
|
||||
IOHIDDeviceRef ref;
|
||||
int pid;
|
||||
int vid;
|
||||
struct usb_list_struct *next;
|
||||
};
|
||||
|
||||
static struct usb_list_struct *usb_list=NULL;
|
||||
static IOHIDManagerRef hid_manager=NULL;
|
||||
|
||||
void attach_callback(void *context, IOReturn r, void *hid_mgr, IOHIDDeviceRef dev)
|
||||
{
|
||||
CFTypeRef type;
|
||||
struct usb_list_struct *n, *p;
|
||||
int32_t pid, vid;
|
||||
|
||||
if (!dev) return;
|
||||
type = IOHIDDeviceGetProperty(dev, CFSTR(kIOHIDVendorIDKey));
|
||||
if (!type || CFGetTypeID(type) != CFNumberGetTypeID()) return;
|
||||
if (!CFNumberGetValue((CFNumberRef)type, kCFNumberSInt32Type, &vid)) return;
|
||||
type = IOHIDDeviceGetProperty(dev, CFSTR(kIOHIDProductIDKey));
|
||||
if (!type || CFGetTypeID(type) != CFNumberGetTypeID()) return;
|
||||
if (!CFNumberGetValue((CFNumberRef)type, kCFNumberSInt32Type, &pid)) return;
|
||||
n = (struct usb_list_struct *)malloc(sizeof(struct usb_list_struct));
|
||||
if (!n) return;
|
||||
//printf("attach callback: vid=%04X, pid=%04X\n", vid, pid);
|
||||
n->ref = dev;
|
||||
n->vid = vid;
|
||||
n->pid = pid;
|
||||
n->next = NULL;
|
||||
if (usb_list == NULL) {
|
||||
usb_list = n;
|
||||
} else {
|
||||
for (p = usb_list; p->next; p = p->next) ;
|
||||
p->next = n;
|
||||
}
|
||||
}
|
||||
|
||||
void detach_callback(void *context, IOReturn r, void *hid_mgr, IOHIDDeviceRef dev)
|
||||
{
|
||||
struct usb_list_struct *p, *tmp, *prev=NULL;
|
||||
|
||||
p = usb_list;
|
||||
while (p) {
|
||||
if (p->ref == dev) {
|
||||
if (prev) {
|
||||
prev->next = p->next;
|
||||
} else {
|
||||
usb_list = p->next;
|
||||
}
|
||||
tmp = p;
|
||||
p = p->next;
|
||||
free(tmp);
|
||||
} else {
|
||||
prev = p;
|
||||
p = p->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void init_hid_manager(void)
|
||||
{
|
||||
CFMutableDictionaryRef dict;
|
||||
IOReturn ret;
|
||||
|
||||
if (hid_manager) return;
|
||||
hid_manager = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDOptionsTypeNone);
|
||||
if (hid_manager == NULL || CFGetTypeID(hid_manager) != IOHIDManagerGetTypeID()) {
|
||||
if (hid_manager) CFRelease(hid_manager);
|
||||
printf_verbose("no HID Manager - maybe this is a pre-Leopard (10.5) system?\n");
|
||||
return;
|
||||
}
|
||||
dict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
|
||||
&kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
|
||||
if (!dict) return;
|
||||
IOHIDManagerSetDeviceMatching(hid_manager, dict);
|
||||
CFRelease(dict);
|
||||
IOHIDManagerScheduleWithRunLoop(hid_manager, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
|
||||
IOHIDManagerRegisterDeviceMatchingCallback(hid_manager, attach_callback, NULL);
|
||||
IOHIDManagerRegisterDeviceRemovalCallback(hid_manager, detach_callback, NULL);
|
||||
ret = IOHIDManagerOpen(hid_manager, kIOHIDOptionsTypeNone);
|
||||
if (ret != kIOReturnSuccess) {
|
||||
IOHIDManagerUnscheduleFromRunLoop(hid_manager,
|
||||
CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
|
||||
CFRelease(hid_manager);
|
||||
printf_verbose("Error opening HID Manager");
|
||||
}
|
||||
}
|
||||
|
||||
static void do_run_loop(void)
|
||||
{
|
||||
while (CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, true) == kCFRunLoopRunHandledSource) ;
|
||||
}
|
||||
|
||||
IOHIDDeviceRef open_usb_device(int vid, int pid)
|
||||
{
|
||||
struct usb_list_struct *p;
|
||||
IOReturn ret;
|
||||
|
||||
init_hid_manager();
|
||||
do_run_loop();
|
||||
for (p = usb_list; p; p = p->next) {
|
||||
if (p->vid == vid && p->pid == pid) {
|
||||
ret = IOHIDDeviceOpen(p->ref, kIOHIDOptionsTypeNone);
|
||||
if (ret == kIOReturnSuccess) return p->ref;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void close_usb_device(IOHIDDeviceRef dev)
|
||||
{
|
||||
struct usb_list_struct *p;
|
||||
|
||||
do_run_loop();
|
||||
for (p = usb_list; p; p = p->next) {
|
||||
if (p->ref == dev) {
|
||||
IOHIDDeviceClose(dev, kIOHIDOptionsTypeNone);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static IOHIDDeviceRef iokit_teensy_reference = NULL;
|
||||
|
||||
int teensy_open(void)
|
||||
{
|
||||
teensy_close();
|
||||
iokit_teensy_reference = open_usb_device(0x15ba, 0x003c);
|
||||
|
||||
if (!iokit_teensy_reference)
|
||||
iokit_teensy_reference = open_usb_device(0x15ba, 0x003b);
|
||||
|
||||
if (!iokit_teensy_reference) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int teensy_write(void *buf, int len, double timeout)
|
||||
{
|
||||
IOReturn ret;
|
||||
|
||||
// timeouts do not work on OS-X
|
||||
// IOHIDDeviceSetReportWithCallback is not implemented
|
||||
// even though Apple documents it with a code example!
|
||||
// submitted to Apple on 22-sep-2009, problem ID 7245050
|
||||
if (!iokit_teensy_reference) return 0;
|
||||
ret = IOHIDDeviceSetReport(iokit_teensy_reference,
|
||||
kIOHIDReportTypeOutput, 0, buf, len);
|
||||
if (ret == kIOReturnSuccess) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void teensy_close(void)
|
||||
{
|
||||
if (!iokit_teensy_reference) return;
|
||||
close_usb_device(iokit_teensy_reference);
|
||||
iokit_teensy_reference = NULL;
|
||||
}
|
||||
|
||||
int hard_reboot(void)
|
||||
{
|
||||
IOHIDDeviceRef rebootor;
|
||||
IOReturn ret;
|
||||
|
||||
rebootor = open_usb_device(0x15ba, 0x003b);
|
||||
|
||||
if (!rebootor)
|
||||
rebootor = open_usb_device(0x15ba, 0x003b);
|
||||
|
||||
if (!rebootor) return 0;
|
||||
ret = IOHIDDeviceSetReport(rebootor,
|
||||
kIOHIDReportTypeOutput, 0, (uint8_t *)("reboot"), 6);
|
||||
close_usb_device(rebootor);
|
||||
if (ret == kIOReturnSuccess) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/****************************************************************/
|
||||
/* */
|
||||
/* USB Access - BSD's UHID driver */
|
||||
/* */
|
||||
/****************************************************************/
|
||||
|
||||
#if defined(USE_UHID)
|
||||
|
||||
// Thanks to Todd T Fries for help getting this working on OpenBSD
|
||||
// and to Chris Kuethe for the initial patch to use UHID.
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
#include <dev/usb/usb.h>
|
||||
#ifndef USB_GET_DEVICEINFO
|
||||
#include <dev/usb/usb_ioctl.h>
|
||||
#endif
|
||||
|
||||
#ifndef USB_GET_DEVICEINFO
|
||||
# define USB_GET_DEVICEINFO 0
|
||||
# error The USB_GET_DEVICEINFO ioctl() value is not defined for your system.
|
||||
#endif
|
||||
|
||||
int open_usb_device(int vid, int pid)
|
||||
{
|
||||
int r, fd;
|
||||
DIR *dir;
|
||||
struct dirent *d;
|
||||
struct usb_device_info info;
|
||||
char buf[256];
|
||||
|
||||
dir = opendir("/dev");
|
||||
if (!dir) return -1;
|
||||
while ((d = readdir(dir)) != NULL) {
|
||||
if (strncmp(d->d_name, "uhid", 4) != 0) continue;
|
||||
snprintf(buf, sizeof(buf), "/dev/%s", d->d_name);
|
||||
fd = open(buf, O_RDWR);
|
||||
if (fd < 0) continue;
|
||||
r = ioctl(fd, USB_GET_DEVICEINFO, &info);
|
||||
if (r < 0) {
|
||||
// NetBSD: added in 2004
|
||||
// OpenBSD: added November 23, 2009
|
||||
// FreeBSD: missing (FreeBSD 8.0) - USE_LIBUSB works!
|
||||
die("Error: your uhid driver does not support"
|
||||
" USB_GET_DEVICEINFO, please upgrade!\n");
|
||||
close(fd);
|
||||
closedir(dir);
|
||||
exit(1);
|
||||
}
|
||||
//printf("%s: v=%d, p=%d\n", buf, info.udi_vendorNo, info.udi_productNo);
|
||||
if (info.udi_vendorNo == vid && info.udi_productNo == pid) {
|
||||
closedir(dir);
|
||||
return fd;
|
||||
}
|
||||
close(fd);
|
||||
}
|
||||
closedir(dir);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int uhid_teensy_fd = -1;
|
||||
|
||||
int teensy_open(void)
|
||||
{
|
||||
teensy_close();
|
||||
uhid_teensy_fd = open_usb_device(0x15ba, 0x003b);
|
||||
|
||||
if (uhid_teensy_fd < 0)
|
||||
uhid_teensy_fd = open_usb_device(0x15ba, 0x003b);
|
||||
|
||||
if (uhid_teensy_fd < 0) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int teensy_write(void *buf, int len, double timeout)
|
||||
{
|
||||
int r;
|
||||
|
||||
// TODO: implement timeout... how??
|
||||
r = write(uhid_teensy_fd, buf, len);
|
||||
if (r == len) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void teensy_close(void)
|
||||
{
|
||||
if (uhid_teensy_fd >= 0) {
|
||||
close(uhid_teensy_fd);
|
||||
uhid_teensy_fd = -1;
|
||||
}
|
||||
}
|
||||
|
||||
int hard_reboot(void)
|
||||
{
|
||||
int r, rebootor_fd;
|
||||
|
||||
rebootor_fd = open_usb_device(0x15ba, 0x003b);
|
||||
|
||||
if (rebootor_fd < 0)
|
||||
rebootor_fd = open_usb_device(0x15ba, 0x003b);
|
||||
|
||||
if (rebootor_fd < 0) return 0;
|
||||
r = write(rebootor_fd, "reboot", 6);
|
||||
delay(0.1);
|
||||
close(rebootor_fd);
|
||||
if (r == 6) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/****************************************************************/
|
||||
/* */
|
||||
/* Read Intel Hex File */
|
||||
/* */
|
||||
/****************************************************************/
|
||||
|
||||
// the maximum flash image size we can support
|
||||
// chips with larger memory may be used, but only this
|
||||
// much intel-hex data can be loaded into memory!
|
||||
#define MAX_MEMORY_SIZE 0x10000
|
||||
|
||||
static unsigned char firmware_image[MAX_MEMORY_SIZE];
|
||||
static unsigned char firmware_mask[MAX_MEMORY_SIZE];
|
||||
static int end_record_seen=0;
|
||||
static int byte_count;
|
||||
static unsigned int extended_addr = 0;
|
||||
static int parse_hex_line(char *line);
|
||||
|
||||
int read_intel_hex(const char *filename)
|
||||
{
|
||||
FILE *fp;
|
||||
int i, lineno=0;
|
||||
char buf[1024];
|
||||
|
||||
byte_count = 0;
|
||||
end_record_seen = 0;
|
||||
for (i=0; i<MAX_MEMORY_SIZE; i++) {
|
||||
firmware_image[i] = 0xFF;
|
||||
firmware_mask[i] = 0;
|
||||
}
|
||||
extended_addr = 0;
|
||||
|
||||
fp = fopen(filename, "r");
|
||||
if (fp == NULL) {
|
||||
//printf("Unable to read file %s\n", filename);
|
||||
return -1;
|
||||
}
|
||||
while (!feof(fp)) {
|
||||
*buf = '\0';
|
||||
if (!fgets(buf, sizeof(buf), fp)) break;
|
||||
lineno++;
|
||||
if (*buf) {
|
||||
if (parse_hex_line(buf) == 0) {
|
||||
//printf("Warning, parse error line %d\n", lineno);
|
||||
fclose(fp);
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
if (end_record_seen) break;
|
||||
if (feof(stdin)) break;
|
||||
}
|
||||
fclose(fp);
|
||||
return byte_count;
|
||||
}
|
||||
|
||||
|
||||
/* from ihex.c, at http://www.pjrc.com/tech/8051/pm2_docs/intel-hex.html */
|
||||
|
||||
/* parses a line of intel hex code, stores the data in bytes[] */
|
||||
/* and the beginning address in addr, and returns a 1 if the */
|
||||
/* line was valid, or a 0 if an error occurred. The variable */
|
||||
/* num gets the number of bytes that were stored into bytes[] */
|
||||
|
||||
|
||||
int
|
||||
parse_hex_line(char *line)
|
||||
{
|
||||
int addr, code, num;
|
||||
int sum, len, cksum, i;
|
||||
char *ptr;
|
||||
|
||||
num = 0;
|
||||
if (line[0] != ':') return 0;
|
||||
if (strlen(line) < 11) return 0;
|
||||
ptr = line+1;
|
||||
if (!sscanf(ptr, "%02x", &len)) return 0;
|
||||
ptr += 2;
|
||||
if ((int)strlen(line) < (11 + (len * 2)) ) return 0;
|
||||
if (!sscanf(ptr, "%04x", &addr)) return 0;
|
||||
ptr += 4;
|
||||
/* printf("Line: length=%d Addr=%d\n", len, addr); */
|
||||
if (!sscanf(ptr, "%02x", &code)) return 0;
|
||||
if (addr + extended_addr + len >= MAX_MEMORY_SIZE) return 0;
|
||||
ptr += 2;
|
||||
sum = (len & 255) + ((addr >> 8) & 255) + (addr & 255) + (code & 255);
|
||||
if (code != 0) {
|
||||
if (code == 1) {
|
||||
end_record_seen = 1;
|
||||
return 1;
|
||||
}
|
||||
if (code == 2 && len == 2) {
|
||||
if (!sscanf(ptr, "%04x", &i)) return 1;
|
||||
ptr += 4;
|
||||
sum += ((i >> 8) & 255) + (i & 255);
|
||||
if (!sscanf(ptr, "%02x", &cksum)) return 1;
|
||||
if (((sum & 255) + (cksum & 255)) & 255) return 1;
|
||||
extended_addr = i << 4;
|
||||
//printf("ext addr = %05X\n", extended_addr);
|
||||
}
|
||||
if (code == 4 && len == 2) {
|
||||
if (!sscanf(ptr, "%04x", &i)) return 1;
|
||||
ptr += 4;
|
||||
sum += ((i >> 8) & 255) + (i & 255);
|
||||
if (!sscanf(ptr, "%02x", &cksum)) return 1;
|
||||
if (((sum & 255) + (cksum & 255)) & 255) return 1;
|
||||
extended_addr = i << 16;
|
||||
//printf("ext addr = %08X\n", extended_addr);
|
||||
}
|
||||
return 1; // non-data line
|
||||
}
|
||||
byte_count += len;
|
||||
while (num != len) {
|
||||
if (sscanf(ptr, "%02x", &i) != 1) return 0;
|
||||
i &= 255;
|
||||
firmware_image[addr + extended_addr + num] = i;
|
||||
firmware_mask[addr + extended_addr + num] = 1;
|
||||
ptr += 2;
|
||||
sum += i;
|
||||
(num)++;
|
||||
if (num >= 256) return 0;
|
||||
}
|
||||
if (!sscanf(ptr, "%02x", &cksum)) return 0;
|
||||
if (((sum & 255) + (cksum & 255)) & 255) return 0; /* checksum error */
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ihex_bytes_within_range(int begin, int end)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (begin < 0 || begin >= MAX_MEMORY_SIZE ||
|
||||
end < 0 || end >= MAX_MEMORY_SIZE) {
|
||||
return 0;
|
||||
}
|
||||
for (i=begin; i<=end; i++) {
|
||||
if (firmware_mask[i]) return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ihex_get_data(int addr, int len, unsigned char *bytes)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (addr < 0 || len < 0 || addr + len >= MAX_MEMORY_SIZE) {
|
||||
for (i=0; i<len; i++) {
|
||||
bytes[i] = 255;
|
||||
}
|
||||
return;
|
||||
}
|
||||
for (i=0; i<len; i++) {
|
||||
if (firmware_mask[addr]) {
|
||||
bytes[i] = firmware_image[addr];
|
||||
} else {
|
||||
bytes[i] = 255;
|
||||
}
|
||||
addr++;
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************/
|
||||
/* */
|
||||
/* Misc Functions */
|
||||
/* */
|
||||
/****************************************************************/
|
||||
|
||||
int printf_verbose(const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int r;
|
||||
|
||||
va_start(ap, format);
|
||||
if (verbose) {
|
||||
r = vprintf(format, ap);
|
||||
fflush(stdout);
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void delay(double seconds)
|
||||
{
|
||||
#ifdef USE_WIN32
|
||||
sleep(seconds * 1000.0);
|
||||
#else
|
||||
usleep(seconds * 1000000.0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void die(const char *str, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, str);
|
||||
vfprintf(stderr, str, ap);
|
||||
fprintf(stderr, "\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#if defined USE_WIN32
|
||||
#define strcasecmp stricmp
|
||||
#endif
|
||||
|
||||
void parse_options(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
const char *arg;
|
||||
|
||||
wait_for_device_to_appear = 1;
|
||||
verbose = 1;
|
||||
code_size = 32 * 1024;
|
||||
block_size = 128;
|
||||
hard_reboot_device = 1;
|
||||
|
||||
|
||||
for (i=1; i<argc; i++) {
|
||||
arg = argv[i];
|
||||
|
||||
if (*arg == '-') {
|
||||
if (strcmp(arg, "-w") == 0) {
|
||||
wait_for_device_to_appear = 1;
|
||||
} else if (strcmp(arg, "-r") == 0) {
|
||||
hard_reboot_device = 1;
|
||||
} else if (strcmp(arg, "-n") == 0) {
|
||||
reboot_after_programming = 0;
|
||||
} else if (strcmp(arg, "-v") == 0) {
|
||||
verbose = 1;
|
||||
} else if (strncmp(arg, "-mmcu=", 6) == 0) {
|
||||
arg += 6;
|
||||
|
||||
if (strncmp(arg, "at90usb", 7) == 0) {
|
||||
arg += 7;
|
||||
} else if (strncmp(arg, "atmega", 6) == 0) {
|
||||
arg += 6;
|
||||
} else {
|
||||
die("Unknown MCU type\n");
|
||||
}
|
||||
|
||||
if (strncmp(arg, "128", 3) == 0) {
|
||||
code_size = 128 * 1024;
|
||||
block_size = 256;
|
||||
} else if (strncmp(arg, "64", 2) == 0) {
|
||||
code_size = 64 * 1024;
|
||||
block_size = 256;
|
||||
} else if (strncmp(arg, "32", 2) == 0) {
|
||||
code_size = 32 * 1024;
|
||||
block_size = 128;
|
||||
} else if (strncmp(arg, "16", 2) == 0) {
|
||||
code_size = 16 * 1024;
|
||||
block_size = 128;
|
||||
} else if (strncmp(arg, "8", 1) == 0) {
|
||||
code_size = 8 * 1024;
|
||||
block_size = 128;
|
||||
} else {
|
||||
die("Unknown MCU type\n");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
filename = argv[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
123
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/BootLoaderHID/asf.xml
Normal file
123
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/BootLoaderHID/asf.xml
Normal file
@ -0,0 +1,123 @@
|
||||
<asf xmlversion="1.0">
|
||||
<project caption="HID Bootloader - 128KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.128_4" force-caption="true" workspace-name="lufa_hid_128kb_4kb_">
|
||||
<require idref="lufa.bootloaders.hid"/>
|
||||
<require idref="lufa.boards.dummy.avr8"/>
|
||||
<generator value="as5_8"/>
|
||||
|
||||
<device-support value="at90usb1287"/>
|
||||
<config name="lufa.drivers.board.name" value="none"/>
|
||||
|
||||
<config name="config.compiler.optimization.level" value="size"/>
|
||||
|
||||
<build type="define" name="F_CPU" value="16000000UL"/>
|
||||
<build type="define" name="F_USB" value="16000000UL"/>
|
||||
|
||||
<build type="define" name="BOOT_START_ADDR" value="0x1F000"/>
|
||||
<build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/>
|
||||
</project>
|
||||
|
||||
<project caption="HID Bootloader - 64KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.64_4" force-caption="true" workspace-name="lufa_hid_64kb_4kb_">
|
||||
<require idref="lufa.bootloaders.hid"/>
|
||||
<require idref="lufa.boards.dummy.avr8"/>
|
||||
<generator value="as5_8"/>
|
||||
|
||||
<device-support value="at90usb647"/>
|
||||
<config name="lufa.drivers.board.name" value="none"/>
|
||||
|
||||
<config name="config.compiler.optimization.level" value="size"/>
|
||||
|
||||
<build type="define" name="F_CPU" value="16000000UL"/>
|
||||
<build type="define" name="F_USB" value="16000000UL"/>
|
||||
|
||||
<build type="define" name="BOOT_START_ADDR" value="0xF000"/>
|
||||
<build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/>
|
||||
</project>
|
||||
|
||||
<project caption="HID Bootloader - 32KB FLASH / 4KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.32_4" force-caption="true" workspace-name="lufa_hid_32kb_4kb_">
|
||||
<require idref="lufa.bootloaders.hid"/>
|
||||
<require idref="lufa.boards.dummy.avr8"/>
|
||||
<generator value="as5_8"/>
|
||||
|
||||
<device-support value="atmega32u4"/>
|
||||
<config name="lufa.drivers.board.name" value="none"/>
|
||||
|
||||
<config name="config.compiler.optimization.level" value="size"/>
|
||||
|
||||
<build type="define" name="F_CPU" value="16000000UL"/>
|
||||
<build type="define" name="F_USB" value="16000000UL"/>
|
||||
|
||||
<build type="define" name="BOOT_START_ADDR" value="0x7000"/>
|
||||
<build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>
|
||||
</project>
|
||||
|
||||
<project caption="HID Bootloader - 16KB FLASH / 2KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.16_2" force-caption="true" workspace-name="lufa_hid_16kb_2kb_">
|
||||
<require idref="lufa.bootloaders.hid"/>
|
||||
<require idref="lufa.boards.dummy.avr8"/>
|
||||
<generator value="as5_8"/>
|
||||
|
||||
<device-support value="atmega16u2"/>
|
||||
<config name="lufa.drivers.board.name" value="none"/>
|
||||
|
||||
<config name="config.compiler.optimization.level" value="size"/>
|
||||
|
||||
<build type="define" name="F_CPU" value="16000000UL"/>
|
||||
<build type="define" name="F_USB" value="16000000UL"/>
|
||||
|
||||
<build type="define" name="BOOT_START_ADDR" value="0x3800"/>
|
||||
<build type="linker-config" subtype="flags" value="--section-start=.text=0x3800"/>
|
||||
</project>
|
||||
|
||||
<project caption="HID Bootloader - 8KB FLASH / 2KB Boot - AVR8 Architecture" id="lufa.bootloaders.hid.avr8.8_2" force-caption="true" workspace-name="lufa_hid_8kb_2kb_">
|
||||
<require idref="lufa.bootloaders.hid"/>
|
||||
<require idref="lufa.boards.dummy.avr8"/>
|
||||
<generator value="as5_8"/>
|
||||
|
||||
<device-support value="atmega8u2"/>
|
||||
<config name="lufa.drivers.board.name" value="none"/>
|
||||
|
||||
<config name="config.compiler.optimization.level" value="size"/>
|
||||
|
||||
<build type="define" name="F_CPU" value="16000000UL"/>
|
||||
<build type="define" name="F_USB" value="16000000UL"/>
|
||||
|
||||
<build type="define" name="BOOT_START_ADDR" value="0x1800"/>
|
||||
<build type="linker-config" subtype="flags" value="--section-start=.text=0x1800"/>
|
||||
</project>
|
||||
|
||||
<module type="application" id="lufa.bootloaders.hid" caption="HID Bootloader">
|
||||
<info type="description" value="summary">
|
||||
HID Class Bootloader, capable of reprogramming a device via a custom cross-platform command line utility when plugged into a host.
|
||||
</info>
|
||||
|
||||
<info type="gui-flag" value="move-to-root"/>
|
||||
|
||||
<info type="keyword" value="Technology">
|
||||
<keyword value="Bootloaders"/>
|
||||
<keyword value="USB Device"/>
|
||||
</info>
|
||||
|
||||
<device-support-alias value="lufa_avr8"/>
|
||||
<device-support-alias value="lufa_xmega"/>
|
||||
<device-support-alias value="lufa_uc3"/>
|
||||
|
||||
<build type="include-path" value="."/>
|
||||
<build type="c-source" value="BootloaderHID.c"/>
|
||||
<build type="header-file" value="BootloaderHID.h"/>
|
||||
<build type="c-source" value="Descriptors.c"/>
|
||||
<build type="header-file" value="Descriptors.h"/>
|
||||
|
||||
<build type="module-config" subtype="path" value="Config"/>
|
||||
<build type="header-file" value="Config/LUFAConfig.h"/>
|
||||
|
||||
<build type="distribute" subtype="user-file" value="doxyfile"/>
|
||||
<build type="distribute" subtype="user-file" value="BootloaderHID.txt"/>
|
||||
<build type="distribute" subtype="directory" value="HostLoaderApp"/>
|
||||
<build type="distribute" subtype="directory" value="HostLoaderApp_Python"/>
|
||||
|
||||
<require idref="lufa.common"/>
|
||||
<require idref="lufa.platform"/>
|
||||
<require idref="lufa.drivers.usb"/>
|
||||
<require idref="lufa.drivers.board"/>
|
||||
<require idref="lufa.drivers.board.leds"/>
|
||||
</module>
|
||||
</asf>
|
2398
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/BootLoaderHID/doxyfile
Normal file
2398
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/BootLoaderHID/doxyfile
Normal file
@ -0,0 +1,2398 @@
|
||||
# Doxyfile 1.8.9
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project.
|
||||
#
|
||||
# All text after a double hash (##) is considered a comment and is placed in
|
||||
# front of the TAG it is preceding.
|
||||
#
|
||||
# All text after a single hash (#) is considered a comment and will be ignored.
|
||||
# The format is:
|
||||
# TAG = value [value, ...]
|
||||
# For lists, items can also be appended using:
|
||||
# TAG += value [value, ...]
|
||||
# Values that contain spaces should be placed between quotes (\" \").
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# This tag specifies the encoding used for all characters in the config file
|
||||
# that follow. The default is UTF-8 which is also the encoding used for all text
|
||||
# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
|
||||
# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
|
||||
# for the list of possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
|
||||
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
|
||||
# double-quotes, unless you are using Doxywizard) that should identify the
|
||||
# project for which the documentation is generated. This name is used in the
|
||||
# title of most generated pages and in a few other places.
|
||||
# The default value is: My Project.
|
||||
|
||||
PROJECT_NAME = "LUFA Library - HID Class Bootloader"
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER =
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
# quick idea about the purpose of the project. Keep the description short.
|
||||
|
||||
PROJECT_BRIEF =
|
||||
|
||||
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
|
||||
# in the documentation. The maximum height of the logo should not exceed 55
|
||||
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
|
||||
# the logo to the output directory.
|
||||
|
||||
PROJECT_LOGO =
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
|
||||
# into which the generated documentation will be written. If a relative path is
|
||||
# entered, it will be relative to the location where doxygen was started. If
|
||||
# left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = ./Documentation/
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
|
||||
# directories (in 2 levels) under the output directory of each output format and
|
||||
# will distribute the generated files over these directories. Enabling this
|
||||
# option can be useful when feeding doxygen a huge amount of source files, where
|
||||
# putting all generated files in the same directory would otherwise causes
|
||||
# performance problems for the file system.
|
||||
# The default value is: NO.
|
||||
|
||||
CREATE_SUBDIRS = NO
|
||||
|
||||
# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
|
||||
# characters to appear in the names of generated files. If set to NO, non-ASCII
|
||||
# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
|
||||
# U+3044.
|
||||
# The default value is: NO.
|
||||
|
||||
ALLOW_UNICODE_NAMES = NO
|
||||
|
||||
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
# information to generate all constant output in the proper language.
|
||||
# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
|
||||
# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
|
||||
# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
|
||||
# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
|
||||
# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
|
||||
# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
|
||||
# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
|
||||
# Ukrainian and Vietnamese.
|
||||
# The default value is: English.
|
||||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
|
||||
# descriptions after the members that are listed in the file and class
|
||||
# documentation (similar to Javadoc). Set to NO to disable this.
|
||||
# The default value is: YES.
|
||||
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
|
||||
# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
|
||||
# description of a member or function before the detailed description
|
||||
#
|
||||
# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
|
||||
# brief descriptions will be completely suppressed.
|
||||
# The default value is: YES.
|
||||
|
||||
REPEAT_BRIEF = YES
|
||||
|
||||
# This tag implements a quasi-intelligent brief description abbreviator that is
|
||||
# used to form the text in various listings. Each string in this list, if found
|
||||
# as the leading text of the brief description, will be stripped from the text
|
||||
# and the result, after processing the whole list, is used as the annotated
|
||||
# text. Otherwise, the brief description is used as-is. If left blank, the
|
||||
# following values are used ($name is automatically replaced with the name of
|
||||
# the entity):The $name class, The $name widget, The $name file, is, provides,
|
||||
# specifies, contains, represents, a, an and the.
|
||||
|
||||
ABBREVIATE_BRIEF = "The $name class" \
|
||||
"The $name widget" \
|
||||
"The $name file" \
|
||||
is \
|
||||
provides \
|
||||
specifies \
|
||||
contains \
|
||||
represents \
|
||||
a \
|
||||
an \
|
||||
the
|
||||
|
||||
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
|
||||
# doxygen will generate a detailed section even if there is only a brief
|
||||
# description.
|
||||
# The default value is: NO.
|
||||
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
|
||||
# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
|
||||
# inherited members of a class in the documentation of that class as if those
|
||||
# members were ordinary class members. Constructors, destructors and assignment
|
||||
# operators of the base classes will not be shown.
|
||||
# The default value is: NO.
|
||||
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
|
||||
# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
|
||||
# before files name in the file list and in the header files. If set to NO the
|
||||
# shortest path that makes the file name unique will be used
|
||||
# The default value is: YES.
|
||||
|
||||
FULL_PATH_NAMES = YES
|
||||
|
||||
# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
|
||||
# Stripping is only done if one of the specified strings matches the left-hand
|
||||
# part of the path. The tag can be used to show relative paths in the file list.
|
||||
# If left blank the directory from which doxygen is run is used as the path to
|
||||
# strip.
|
||||
#
|
||||
# Note that you can specify absolute paths here, but also relative paths, which
|
||||
# will be relative from the directory where doxygen is started.
|
||||
# This tag requires that the tag FULL_PATH_NAMES is set to YES.
|
||||
|
||||
STRIP_FROM_PATH =
|
||||
|
||||
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
|
||||
# path mentioned in the documentation of a class, which tells the reader which
|
||||
# header file to include in order to use a class. If left blank only the name of
|
||||
# the header file containing the class definition is used. Otherwise one should
|
||||
# specify the list of include paths that are normally passed to the compiler
|
||||
# using the -I flag.
|
||||
|
||||
STRIP_FROM_INC_PATH =
|
||||
|
||||
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
|
||||
# less readable) file names. This can be useful is your file systems doesn't
|
||||
# support long names like on DOS, Mac, or CD-ROM.
|
||||
# The default value is: NO.
|
||||
|
||||
SHORT_NAMES = YES
|
||||
|
||||
# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
|
||||
# first line (until the first dot) of a Javadoc-style comment as the brief
|
||||
# description. If set to NO, the Javadoc-style will behave just like regular Qt-
|
||||
# style comments (thus requiring an explicit @brief command for a brief
|
||||
# description.)
|
||||
# The default value is: NO.
|
||||
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
|
||||
# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
|
||||
# line (until the first dot) of a Qt-style comment as the brief description. If
|
||||
# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
|
||||
# requiring an explicit \brief command for a brief description.)
|
||||
# The default value is: NO.
|
||||
|
||||
QT_AUTOBRIEF = NO
|
||||
|
||||
# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
|
||||
# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
|
||||
# a brief description. This used to be the default behavior. The new default is
|
||||
# to treat a multi-line C++ comment block as a detailed description. Set this
|
||||
# tag to YES if you prefer the old behavior instead.
|
||||
#
|
||||
# Note that setting this tag to YES also means that rational rose comments are
|
||||
# not recognized any more.
|
||||
# The default value is: NO.
|
||||
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
|
||||
# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
|
||||
# documentation from any documented member that it re-implements.
|
||||
# The default value is: YES.
|
||||
|
||||
INHERIT_DOCS = YES
|
||||
|
||||
# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
|
||||
# page for each member. If set to NO, the documentation of a member will be part
|
||||
# of the file/class/namespace that contains it.
|
||||
# The default value is: NO.
|
||||
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
|
||||
# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
|
||||
# uses this value to replace tabs by spaces in code fragments.
|
||||
# Minimum value: 1, maximum value: 16, default value: 4.
|
||||
|
||||
TAB_SIZE = 4
|
||||
|
||||
# This tag can be used to specify a number of aliases that act as commands in
|
||||
# the documentation. An alias has the form:
|
||||
# name=value
|
||||
# For example adding
|
||||
# "sideeffect=@par Side Effects:\n"
|
||||
# will allow you to put the command \sideeffect (or @sideeffect) in the
|
||||
# documentation, which will result in a user-defined paragraph with heading
|
||||
# "Side Effects:". You can put \n's in the value part of an alias to insert
|
||||
# newlines.
|
||||
|
||||
ALIASES =
|
||||
|
||||
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
||||
# A mapping has the form "name=value". For example adding "class=itcl::class"
|
||||
# will allow you to use the command class in the itcl::class meaning.
|
||||
|
||||
TCL_SUBST =
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
|
||||
# only. Doxygen will then generate output that is more tailored for C. For
|
||||
# instance, some of the names that are used will be different. The list of all
|
||||
# members will be omitted, etc.
|
||||
# The default value is: NO.
|
||||
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
|
||||
# Python sources only. Doxygen will then generate output that is more tailored
|
||||
# for that language. For instance, namespaces will be presented as packages,
|
||||
# qualified scopes will look different, etc.
|
||||
# The default value is: NO.
|
||||
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
|
||||
# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
|
||||
# sources. Doxygen will then generate output that is tailored for Fortran.
|
||||
# The default value is: NO.
|
||||
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
|
||||
# sources. Doxygen will then generate output that is tailored for VHDL.
|
||||
# The default value is: NO.
|
||||
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
|
||||
# Doxygen selects the parser to use depending on the extension of the files it
|
||||
# parses. With this tag you can assign which parser to use for a given
|
||||
# extension. Doxygen has a built-in mapping, but you can override or extend it
|
||||
# using this tag. The format is ext=language, where ext is a file extension, and
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
|
||||
# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
|
||||
# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
|
||||
# Fortran. In the later case the parser tries to guess whether the code is fixed
|
||||
# or free formatted code, this is the default for Fortran type files), VHDL. For
|
||||
# instance to make doxygen treat .inc files as Fortran files (default is PHP),
|
||||
# and .f files as C (default is Fortran), use: inc=Fortran f=C.
|
||||
#
|
||||
# Note: For files without extension you can use no_extension as a placeholder.
|
||||
#
|
||||
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
|
||||
# the files are not read by doxygen.
|
||||
|
||||
EXTENSION_MAPPING =
|
||||
|
||||
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
|
||||
# according to the Markdown format, which allows for more readable
|
||||
# documentation. See http://daringfireball.net/projects/markdown/ for details.
|
||||
# The output of markdown processing is further processed by doxygen, so you can
|
||||
# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
|
||||
# case of backward compatibilities issues.
|
||||
# The default value is: YES.
|
||||
|
||||
MARKDOWN_SUPPORT = NO
|
||||
|
||||
# When enabled doxygen tries to link words that correspond to documented
|
||||
# classes, or namespaces to their corresponding documentation. Such a link can
|
||||
# be prevented in individual cases by putting a % sign in front of the word or
|
||||
# globally by setting AUTOLINK_SUPPORT to NO.
|
||||
# The default value is: YES.
|
||||
|
||||
AUTOLINK_SUPPORT = YES
|
||||
|
||||
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
|
||||
# to include (a tag file for) the STL sources as input, then you should set this
|
||||
# tag to YES in order to let doxygen match functions declarations and
|
||||
# definitions whose arguments contain STL classes (e.g. func(std::string);
|
||||
# versus func(std::string) {}). This also make the inheritance and collaboration
|
||||
# diagrams that involve STL classes more complete and accurate.
|
||||
# The default value is: NO.
|
||||
|
||||
BUILTIN_STL_SUPPORT = NO
|
||||
|
||||
# If you use Microsoft's C++/CLI language, you should set this option to YES to
|
||||
# enable parsing support.
|
||||
# The default value is: NO.
|
||||
|
||||
CPP_CLI_SUPPORT = NO
|
||||
|
||||
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
|
||||
# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
|
||||
# will parse them like normal C++ but will assume all classes use public instead
|
||||
# of private inheritance when no explicit protection keyword is present.
|
||||
# The default value is: NO.
|
||||
|
||||
SIP_SUPPORT = NO
|
||||
|
||||
# For Microsoft's IDL there are propget and propput attributes to indicate
|
||||
# getter and setter methods for a property. Setting this option to YES will make
|
||||
# doxygen to replace the get and set methods by a property in the documentation.
|
||||
# This will only work if the methods are indeed getting or setting a simple
|
||||
# type. If this is not the case, or you want to show the methods anyway, you
|
||||
# should set this option to NO.
|
||||
# The default value is: YES.
|
||||
|
||||
IDL_PROPERTY_SUPPORT = YES
|
||||
|
||||
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
|
||||
# tag is set to YES then doxygen will reuse the documentation of the first
|
||||
# member in the group (if any) for the other members of the group. By default
|
||||
# all members of a group must be documented explicitly.
|
||||
# The default value is: NO.
|
||||
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
|
||||
# Set the SUBGROUPING tag to YES to allow class member groups of the same type
|
||||
# (for instance a group of public functions) to be put as a subgroup of that
|
||||
# type (e.g. under the Public Functions section). Set it to NO to prevent
|
||||
# subgrouping. Alternatively, this can be done per class using the
|
||||
# \nosubgrouping command.
|
||||
# The default value is: YES.
|
||||
|
||||
SUBGROUPING = YES
|
||||
|
||||
# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
|
||||
# are shown inside the group in which they are included (e.g. using \ingroup)
|
||||
# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
|
||||
# and RTF).
|
||||
#
|
||||
# Note that this feature does not work in combination with
|
||||
# SEPARATE_MEMBER_PAGES.
|
||||
# The default value is: NO.
|
||||
|
||||
INLINE_GROUPED_CLASSES = NO
|
||||
|
||||
# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
|
||||
# with only public data fields or simple typedef fields will be shown inline in
|
||||
# the documentation of the scope in which they are defined (i.e. file,
|
||||
# namespace, or group documentation), provided this scope is documented. If set
|
||||
# to NO, structs, classes, and unions are shown on a separate page (for HTML and
|
||||
# Man pages) or section (for LaTeX and RTF).
|
||||
# The default value is: NO.
|
||||
|
||||
INLINE_SIMPLE_STRUCTS = NO
|
||||
|
||||
# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
|
||||
# enum is documented as struct, union, or enum with the name of the typedef. So
|
||||
# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
|
||||
# with name TypeT. When disabled the typedef will appear as a member of a file,
|
||||
# namespace, or class. And the struct will be named TypeS. This can typically be
|
||||
# useful for C code in case the coding convention dictates that all compound
|
||||
# types are typedef'ed and only the typedef is referenced, never the tag name.
|
||||
# The default value is: NO.
|
||||
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
|
||||
# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
|
||||
# cache is used to resolve symbols given their name and scope. Since this can be
|
||||
# an expensive process and often the same symbol appears multiple times in the
|
||||
# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
|
||||
# doxygen will become slower. If the cache is too large, memory is wasted. The
|
||||
# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
|
||||
# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
|
||||
# symbols. At the end of a run doxygen will report the cache usage and suggest
|
||||
# the optimal cache size from a speed point of view.
|
||||
# Minimum value: 0, maximum value: 9, default value: 0.
|
||||
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
|
||||
# documentation are documented, even if no documentation was available. Private
|
||||
# class members and static file members will be hidden unless the
|
||||
# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
|
||||
# Note: This will also disable the warnings about undocumented members that are
|
||||
# normally produced when WARNINGS is set to YES.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_ALL = YES
|
||||
|
||||
# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
|
||||
# be included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_PRIVATE = YES
|
||||
|
||||
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
|
||||
# scope will be included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_PACKAGE = NO
|
||||
|
||||
# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
|
||||
# included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_STATIC = YES
|
||||
|
||||
# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
|
||||
# locally in source files will be included in the documentation. If set to NO,
|
||||
# only classes defined in header files are included. Does not have any effect
|
||||
# for Java sources.
|
||||
# The default value is: YES.
|
||||
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
|
||||
# This flag is only useful for Objective-C code. If set to YES, local methods,
|
||||
# which are defined in the implementation section but not in the interface are
|
||||
# included in the documentation. If set to NO, only methods in the interface are
|
||||
# included.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
|
||||
# If this flag is set to YES, the members of anonymous namespaces will be
|
||||
# extracted and appear in the documentation as a namespace called
|
||||
# 'anonymous_namespace{file}', where file will be replaced with the base name of
|
||||
# the file that contains the anonymous namespace. By default anonymous namespace
|
||||
# are hidden.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
|
||||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
|
||||
# undocumented members inside documented classes or files. If set to NO these
|
||||
# members will be included in the various overviews, but no documentation
|
||||
# section is generated. This option has no effect if EXTRACT_ALL is enabled.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
|
||||
# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
|
||||
# undocumented classes that are normally visible in the class hierarchy. If set
|
||||
# to NO, these classes will be included in the various overviews. This option
|
||||
# has no effect if EXTRACT_ALL is enabled.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
|
||||
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
|
||||
# (class|struct|union) declarations. If set to NO, these declarations will be
|
||||
# included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
|
||||
# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
|
||||
# documentation blocks found inside the body of a function. If set to NO, these
|
||||
# blocks will be appended to the function's detailed documentation block.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
|
||||
# The INTERNAL_DOCS tag determines if documentation that is typed after a
|
||||
# \internal command is included. If the tag is set to NO then the documentation
|
||||
# will be excluded. Set it to YES to include the internal documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
INTERNAL_DOCS = NO
|
||||
|
||||
# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
|
||||
# names in lower-case letters. If set to YES, upper-case letters are also
|
||||
# allowed. This is useful if you have classes or files whose names only differ
|
||||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# and Mac users are advised to set this option to NO.
|
||||
# The default value is: system dependent.
|
||||
|
||||
CASE_SENSE_NAMES = NO
|
||||
|
||||
# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
|
||||
# their full class and namespace scopes in the documentation. If set to YES, the
|
||||
# scope will be hidden.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
|
||||
# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
|
||||
# append additional text to a page's title, such as Class Reference. If set to
|
||||
# YES the compound reference will be hidden.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_COMPOUND_REFERENCE= NO
|
||||
|
||||
# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
|
||||
# the files that are included by a file in the documentation of that file.
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
|
||||
# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
|
||||
# grouped member an include statement to the documentation, telling the reader
|
||||
# which file to include in order to use the member.
|
||||
# The default value is: NO.
|
||||
|
||||
SHOW_GROUPED_MEMB_INC = NO
|
||||
|
||||
# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
|
||||
# files with double quotes in the documentation rather than with sharp brackets.
|
||||
# The default value is: NO.
|
||||
|
||||
FORCE_LOCAL_INCLUDES = NO
|
||||
|
||||
# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
|
||||
# documentation for inline members.
|
||||
# The default value is: YES.
|
||||
|
||||
INLINE_INFO = YES
|
||||
|
||||
# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
|
||||
# (detailed) documentation of file and class members alphabetically by member
|
||||
# name. If set to NO, the members will appear in declaration order.
|
||||
# The default value is: YES.
|
||||
|
||||
SORT_MEMBER_DOCS = YES
|
||||
|
||||
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
|
||||
# descriptions of file, namespace and class members alphabetically by member
|
||||
# name. If set to NO, the members will appear in declaration order. Note that
|
||||
# this will also influence the order of the classes in the class list.
|
||||
# The default value is: NO.
|
||||
|
||||
SORT_BRIEF_DOCS = NO
|
||||
|
||||
# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
|
||||
# (brief and detailed) documentation of class members so that constructors and
|
||||
# destructors are listed first. If set to NO the constructors will appear in the
|
||||
# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
|
||||
# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
|
||||
# member documentation.
|
||||
# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
|
||||
# detailed member documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
SORT_MEMBERS_CTORS_1ST = NO
|
||||
|
||||
# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
|
||||
# of group names into alphabetical order. If set to NO the group names will
|
||||
# appear in their defined order.
|
||||
# The default value is: NO.
|
||||
|
||||
SORT_GROUP_NAMES = NO
|
||||
|
||||
# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
|
||||
# fully-qualified names, including namespaces. If set to NO, the class list will
|
||||
# be sorted only by class name, not including the namespace part.
|
||||
# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
|
||||
# Note: This option applies only to the class list, not to the alphabetical
|
||||
# list.
|
||||
# The default value is: NO.
|
||||
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
|
||||
# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
|
||||
# type resolution of all parameters of a function it will reject a match between
|
||||
# the prototype and the implementation of a member function even if there is
|
||||
# only one candidate or it is obvious which candidate to choose by doing a
|
||||
# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
|
||||
# accept a match between prototype and implementation in such cases.
|
||||
# The default value is: NO.
|
||||
|
||||
STRICT_PROTO_MATCHING = NO
|
||||
|
||||
# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
|
||||
# list. This list is created by putting \todo commands in the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
GENERATE_TODOLIST = NO
|
||||
|
||||
# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
|
||||
# list. This list is created by putting \test commands in the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
GENERATE_TESTLIST = NO
|
||||
|
||||
# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
|
||||
# list. This list is created by putting \bug commands in the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
GENERATE_BUGLIST = NO
|
||||
|
||||
# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
|
||||
# the deprecated list. This list is created by putting \deprecated commands in
|
||||
# the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
|
||||
# The ENABLED_SECTIONS tag can be used to enable conditional documentation
|
||||
# sections, marked by \if <section_label> ... \endif and \cond <section_label>
|
||||
# ... \endcond blocks.
|
||||
|
||||
ENABLED_SECTIONS =
|
||||
|
||||
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
|
||||
# initial value of a variable or macro / define can have for it to appear in the
|
||||
# documentation. If the initializer consists of more lines than specified here
|
||||
# it will be hidden. Use a value of 0 to hide initializers completely. The
|
||||
# appearance of the value of individual variables and macros / defines can be
|
||||
# controlled using \showinitializer or \hideinitializer command in the
|
||||
# documentation regardless of this setting.
|
||||
# Minimum value: 0, maximum value: 10000, default value: 30.
|
||||
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
|
||||
# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
|
||||
# the bottom of the documentation of classes and structs. If set to YES, the
|
||||
# list will mention the files that were used to generate the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_USED_FILES = YES
|
||||
|
||||
# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
|
||||
# will remove the Files entry from the Quick Index and from the Folder Tree View
|
||||
# (if specified).
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_FILES = YES
|
||||
|
||||
# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
|
||||
# page. This will remove the Namespaces entry from the Quick Index and from the
|
||||
# Folder Tree View (if specified).
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_NAMESPACES = YES
|
||||
|
||||
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
|
||||
# doxygen should invoke to get the current version for each file (typically from
|
||||
# the version control system). Doxygen will invoke the program by executing (via
|
||||
# popen()) the command command input-file, where command is the value of the
|
||||
# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
|
||||
# by doxygen. Whatever the program writes to standard output is used as the file
|
||||
# version. For an example see the documentation.
|
||||
|
||||
FILE_VERSION_FILTER =
|
||||
|
||||
# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
|
||||
# by doxygen. The layout file controls the global structure of the generated
|
||||
# output files in an output format independent way. To create the layout file
|
||||
# that represents doxygen's defaults, run doxygen with the -l option. You can
|
||||
# optionally specify a file name after the option, if omitted DoxygenLayout.xml
|
||||
# will be used as the name of the layout file.
|
||||
#
|
||||
# Note that if you run doxygen from a directory containing a file called
|
||||
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
|
||||
# tag is left empty.
|
||||
|
||||
LAYOUT_FILE =
|
||||
|
||||
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
|
||||
# the reference definitions. This must be a list of .bib files. The .bib
|
||||
# extension is automatically appended if omitted. This requires the bibtex tool
|
||||
# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
|
||||
# For LaTeX the style of the bibliography can be controlled using
|
||||
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
|
||||
# search path. See also \cite for info how to create references.
|
||||
|
||||
CITE_BIB_FILES =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The QUIET tag can be used to turn on/off the messages that are generated to
|
||||
# standard output by doxygen. If QUIET is set to YES this implies that the
|
||||
# messages are off.
|
||||
# The default value is: NO.
|
||||
|
||||
QUIET = YES
|
||||
|
||||
# The WARNINGS tag can be used to turn on/off the warning messages that are
|
||||
# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
|
||||
# this implies that the warnings are on.
|
||||
#
|
||||
# Tip: Turn warnings on while writing the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
WARNINGS = YES
|
||||
|
||||
# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
|
||||
# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
|
||||
# will automatically be disabled.
|
||||
# The default value is: YES.
|
||||
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
|
||||
# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
|
||||
# potential errors in the documentation, such as not documenting some parameters
|
||||
# in a documented function, or documenting parameters that don't exist or using
|
||||
# markup commands wrongly.
|
||||
# The default value is: YES.
|
||||
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
|
||||
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
|
||||
# are documented, but have no documentation for their parameters or return
|
||||
# value. If set to NO, doxygen will only warn about wrong or incomplete
|
||||
# parameter documentation, but not about the absence of documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_NO_PARAMDOC = YES
|
||||
|
||||
# The WARN_FORMAT tag determines the format of the warning messages that doxygen
|
||||
# can produce. The string should contain the $file, $line, and $text tags, which
|
||||
# will be replaced by the file and line number from which the warning originated
|
||||
# and the warning text. Optionally the format may contain $version, which will
|
||||
# be replaced by the version of the file (if it could be obtained via
|
||||
# FILE_VERSION_FILTER)
|
||||
# The default value is: $file:$line: $text.
|
||||
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
|
||||
# The WARN_LOGFILE tag can be used to specify a file to which warning and error
|
||||
# messages should be written. If left blank the output is written to standard
|
||||
# error (stderr).
|
||||
|
||||
WARN_LOGFILE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The INPUT tag is used to specify the files and/or directories that contain
|
||||
# documented source files. You may enter file names like myfile.cpp or
|
||||
# directories like /usr/src/myproject. Separate the files or directories with
|
||||
# spaces.
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = ./
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
|
||||
# documentation (see: http://www.gnu.org/software/libiconv) for the list of
|
||||
# possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
INPUT_ENCODING = UTF-8
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
|
||||
# *.h) to filter out the source-files in the directories. If left blank the
|
||||
# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
|
||||
# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
|
||||
# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
|
||||
# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
|
||||
# *.qsf, *.as and *.js.
|
||||
|
||||
FILE_PATTERNS = *.h \
|
||||
*.c \
|
||||
*.txt
|
||||
|
||||
# The RECURSIVE tag can be used to specify whether or not subdirectories should
|
||||
# be searched for input files as well.
|
||||
# The default value is: NO.
|
||||
|
||||
RECURSIVE = YES
|
||||
|
||||
# The EXCLUDE tag can be used to specify files and/or directories that should be
|
||||
# excluded from the INPUT source files. This way you can easily exclude a
|
||||
# subdirectory from a directory tree whose root is specified with the INPUT tag.
|
||||
#
|
||||
# Note that relative paths are relative to the directory from which doxygen is
|
||||
# run.
|
||||
|
||||
EXCLUDE = Documentation/ \
|
||||
HostLoaderApp/ \
|
||||
HostLoaderApp_Python/
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
||||
# directories that are symbolic links (a Unix file system feature) are excluded
|
||||
# from the input.
|
||||
# The default value is: NO.
|
||||
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
|
||||
# certain files from those directories.
|
||||
#
|
||||
# Note that the wildcards are matched against the file with absolute path, so to
|
||||
# exclude all test directories for example use the pattern */test/*
|
||||
|
||||
EXCLUDE_PATTERNS =
|
||||
|
||||
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
||||
# (namespaces, classes, functions, etc.) that should be excluded from the
|
||||
# output. The symbol name can be a fully qualified name, a word, or if the
|
||||
# wildcard * is used, a substring. Examples: ANamespace, AClass,
|
||||
# AClass::ANamespace, ANamespace::*Test
|
||||
#
|
||||
# Note that the wildcards are matched against the file with absolute path, so to
|
||||
# exclude all test directories use the pattern */test/*
|
||||
|
||||
EXCLUDE_SYMBOLS = __* \
|
||||
INCLUDE_FROM_*
|
||||
|
||||
# The EXAMPLE_PATH tag can be used to specify one or more files or directories
|
||||
# that contain example code fragments that are included (see the \include
|
||||
# command).
|
||||
|
||||
EXAMPLE_PATH =
|
||||
|
||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
|
||||
# *.h) to filter out the source-files in the directories. If left blank all
|
||||
# files are included.
|
||||
|
||||
EXAMPLE_PATTERNS = *
|
||||
|
||||
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
|
||||
# searched for input files to be used with the \include or \dontinclude commands
|
||||
# irrespective of the value of the RECURSIVE tag.
|
||||
# The default value is: NO.
|
||||
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
|
||||
# The IMAGE_PATH tag can be used to specify one or more files or directories
|
||||
# that contain images that are to be included in the documentation (see the
|
||||
# \image command).
|
||||
|
||||
IMAGE_PATH =
|
||||
|
||||
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||
# invoke to filter for each input file. Doxygen will invoke the filter program
|
||||
# by executing (via popen()) the command:
|
||||
#
|
||||
# <filter> <input-file>
|
||||
#
|
||||
# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
|
||||
# name of an input file. Doxygen will then use the output that the filter
|
||||
# program writes to standard output. If FILTER_PATTERNS is specified, this tag
|
||||
# will be ignored.
|
||||
#
|
||||
# Note that the filter must not add or remove lines; it is applied before the
|
||||
# code is scanned, but not when the output code is generated. If lines are added
|
||||
# or removed, the anchors will not be placed correctly.
|
||||
|
||||
INPUT_FILTER =
|
||||
|
||||
# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
|
||||
# basis. Doxygen will compare the file name with each pattern and apply the
|
||||
# filter if there is a match. The filters are a list of the form: pattern=filter
|
||||
# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
|
||||
# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
|
||||
# patterns match the file name, INPUT_FILTER is applied.
|
||||
|
||||
FILTER_PATTERNS =
|
||||
|
||||
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
|
||||
# INPUT_FILTER) will also be used to filter the input files that are used for
|
||||
# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
|
||||
# The default value is: NO.
|
||||
|
||||
FILTER_SOURCE_FILES = NO
|
||||
|
||||
# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
|
||||
# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
|
||||
# it is also possible to disable source filtering for a specific pattern using
|
||||
# *.ext= (so without naming a filter).
|
||||
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
|
||||
|
||||
FILTER_SOURCE_PATTERNS =
|
||||
|
||||
# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
|
||||
# is part of the input, its contents will be placed on the main page
|
||||
# (index.html). This can be useful if you have a project on for instance GitHub
|
||||
# and want to reuse the introduction page also for the doxygen output.
|
||||
|
||||
USE_MDFILE_AS_MAINPAGE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
|
||||
# generated. Documented entities will be cross-referenced with these sources.
|
||||
#
|
||||
# Note: To get rid of all source code in the generated output, make sure that
|
||||
# also VERBATIM_HEADERS is set to NO.
|
||||
# The default value is: NO.
|
||||
|
||||
SOURCE_BROWSER = NO
|
||||
|
||||
# Setting the INLINE_SOURCES tag to YES will include the body of functions,
|
||||
# classes and enums directly into the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
INLINE_SOURCES = NO
|
||||
|
||||
# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
|
||||
# special comment blocks from generated source code fragments. Normal C, C++ and
|
||||
# Fortran comments will always remain visible.
|
||||
# The default value is: YES.
|
||||
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
|
||||
# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
|
||||
# function all documented functions referencing it will be listed.
|
||||
# The default value is: NO.
|
||||
|
||||
REFERENCED_BY_RELATION = NO
|
||||
|
||||
# If the REFERENCES_RELATION tag is set to YES then for each documented function
|
||||
# all documented entities called/used by that function will be listed.
|
||||
# The default value is: NO.
|
||||
|
||||
REFERENCES_RELATION = NO
|
||||
|
||||
# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
|
||||
# to YES then the hyperlinks from functions in REFERENCES_RELATION and
|
||||
# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
|
||||
# link to the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
REFERENCES_LINK_SOURCE = NO
|
||||
|
||||
# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
|
||||
# source code will show a tooltip with additional information such as prototype,
|
||||
# brief description and links to the definition and documentation. Since this
|
||||
# will make the HTML file larger and loading of large files a bit slower, you
|
||||
# can opt to disable this feature.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag SOURCE_BROWSER is set to YES.
|
||||
|
||||
SOURCE_TOOLTIPS = YES
|
||||
|
||||
# If the USE_HTAGS tag is set to YES then the references to source code will
|
||||
# point to the HTML generated by the htags(1) tool instead of doxygen built-in
|
||||
# source browser. The htags tool is part of GNU's global source tagging system
|
||||
# (see http://www.gnu.org/software/global/global.html). You will need version
|
||||
# 4.8.6 or higher.
|
||||
#
|
||||
# To use it do the following:
|
||||
# - Install the latest version of global
|
||||
# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
|
||||
# - Make sure the INPUT points to the root of the source tree
|
||||
# - Run doxygen as normal
|
||||
#
|
||||
# Doxygen will invoke htags (and that will in turn invoke gtags), so these
|
||||
# tools must be available from the command line (i.e. in the search path).
|
||||
#
|
||||
# The result: instead of the source browser generated by doxygen, the links to
|
||||
# source code will now point to the output of htags.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag SOURCE_BROWSER is set to YES.
|
||||
|
||||
USE_HTAGS = NO
|
||||
|
||||
# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
|
||||
# verbatim copy of the header file for each class for which an include is
|
||||
# specified. Set to NO to disable this.
|
||||
# See also: Section \class.
|
||||
# The default value is: YES.
|
||||
|
||||
VERBATIM_HEADERS = NO
|
||||
|
||||
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
|
||||
# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
|
||||
# cost of reduced performance. This can be particularly helpful with template
|
||||
# rich C++ code for which doxygen's built-in parser lacks the necessary type
|
||||
# information.
|
||||
# Note: The availability of this option depends on whether or not doxygen was
|
||||
# compiled with the --with-libclang option.
|
||||
# The default value is: NO.
|
||||
|
||||
CLANG_ASSISTED_PARSING = NO
|
||||
|
||||
# If clang assisted parsing is enabled you can provide the compiler with command
|
||||
# line options that you would normally use when invoking the compiler. Note that
|
||||
# the include paths will already be set by doxygen for the files and directories
|
||||
# specified with INPUT and INCLUDE_PATH.
|
||||
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
|
||||
|
||||
CLANG_OPTIONS =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
|
||||
# compounds will be generated. Enable this if the project contains a lot of
|
||||
# classes, structs, unions or interfaces.
|
||||
# The default value is: YES.
|
||||
|
||||
ALPHABETICAL_INDEX = YES
|
||||
|
||||
# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
|
||||
# which the alphabetical index list will be split.
|
||||
# Minimum value: 1, maximum value: 20, default value: 5.
|
||||
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
|
||||
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
|
||||
# In case all classes in a project start with a common prefix, all classes will
|
||||
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
|
||||
# can be used to specify a prefix (or a list of prefixes) that should be ignored
|
||||
# while generating the index headers.
|
||||
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
|
||||
|
||||
IGNORE_PREFIX =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
|
||||
# The default value is: YES.
|
||||
|
||||
GENERATE_HTML = YES
|
||||
|
||||
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
|
||||
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
|
||||
# it.
|
||||
# The default directory is: html.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_OUTPUT = html
|
||||
|
||||
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
|
||||
# generated HTML page (for example: .htm, .php, .asp).
|
||||
# The default value is: .html.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_FILE_EXTENSION = .html
|
||||
|
||||
# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
|
||||
# each generated HTML page. If the tag is left blank doxygen will generate a
|
||||
# standard header.
|
||||
#
|
||||
# To get valid HTML the header file that includes any scripts and style sheets
|
||||
# that doxygen needs, which is dependent on the configuration options used (e.g.
|
||||
# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
|
||||
# default header using
|
||||
# doxygen -w html new_header.html new_footer.html new_stylesheet.css
|
||||
# YourConfigFile
|
||||
# and then modify the file new_header.html. See also section "Doxygen usage"
|
||||
# for information on how to generate the default header that doxygen normally
|
||||
# uses.
|
||||
# Note: The header is subject to change so you typically have to regenerate the
|
||||
# default header when upgrading to a newer version of doxygen. For a description
|
||||
# of the possible markers and block names see the documentation.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_HEADER =
|
||||
|
||||
# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
|
||||
# generated HTML page. If the tag is left blank doxygen will generate a standard
|
||||
# footer. See HTML_HEADER for more information on how to generate a default
|
||||
# footer and what special commands can be used inside the footer. See also
|
||||
# section "Doxygen usage" for information on how to generate the default footer
|
||||
# that doxygen normally uses.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_FOOTER =
|
||||
|
||||
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
|
||||
# sheet that is used by each HTML page. It can be used to fine-tune the look of
|
||||
# the HTML output. If left blank doxygen will generate a default style sheet.
|
||||
# See also section "Doxygen usage" for information on how to generate the style
|
||||
# sheet that doxygen normally uses.
|
||||
# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
|
||||
# it is more robust and this tag (HTML_STYLESHEET) will in the future become
|
||||
# obsolete.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_STYLESHEET =
|
||||
|
||||
# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
|
||||
# cascading style sheets that are included after the standard style sheets
|
||||
# created by doxygen. Using this option one can overrule certain style aspects.
|
||||
# This is preferred over using HTML_STYLESHEET since it does not replace the
|
||||
# standard style sheet and is therefore more robust against future updates.
|
||||
# Doxygen will copy the style sheet files to the output directory.
|
||||
# Note: The order of the extra style sheet files is of importance (e.g. the last
|
||||
# style sheet in the list overrules the setting of the previous ones in the
|
||||
# list). For an example see the documentation.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_EXTRA_STYLESHEET =
|
||||
|
||||
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
|
||||
# other source files which should be copied to the HTML output directory. Note
|
||||
# that these files will be copied to the base HTML output directory. Use the
|
||||
# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
|
||||
# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
|
||||
# files will be copied as-is; there are no commands or markers available.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_EXTRA_FILES =
|
||||
|
||||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
|
||||
# will adjust the colors in the style sheet and background images according to
|
||||
# this color. Hue is specified as an angle on a colorwheel, see
|
||||
# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
|
||||
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
|
||||
# purple, and 360 is red again.
|
||||
# Minimum value: 0, maximum value: 359, default value: 220.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_COLORSTYLE_HUE = 220
|
||||
|
||||
# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
|
||||
# in the HTML output. For a value of 0 the output will use grayscales only. A
|
||||
# value of 255 will produce the most vivid colors.
|
||||
# Minimum value: 0, maximum value: 255, default value: 100.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_COLORSTYLE_SAT = 100
|
||||
|
||||
# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
|
||||
# luminance component of the colors in the HTML output. Values below 100
|
||||
# gradually make the output lighter, whereas values above 100 make the output
|
||||
# darker. The value divided by 100 is the actual gamma applied, so 80 represents
|
||||
# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
|
||||
# change the gamma.
|
||||
# Minimum value: 40, maximum value: 240, default value: 80.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_COLORSTYLE_GAMMA = 80
|
||||
|
||||
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
|
||||
# page will contain the date and time when the page was generated. Setting this
|
||||
# to NO can help when comparing the output of multiple runs.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_TIMESTAMP = NO
|
||||
|
||||
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
|
||||
# documentation will contain sections that can be hidden and shown after the
|
||||
# page has loaded.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_DYNAMIC_SECTIONS = YES
|
||||
|
||||
# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
|
||||
# shown in the various tree structured indices initially; the user can expand
|
||||
# and collapse entries dynamically later on. Doxygen will expand the tree to
|
||||
# such a level that at most the specified number of entries are visible (unless
|
||||
# a fully collapsed tree already exceeds this amount). So setting the number of
|
||||
# entries 1 will produce a full collapsed tree by default. 0 is a special value
|
||||
# representing an infinite number of entries and will result in a full expanded
|
||||
# tree by default.
|
||||
# Minimum value: 0, maximum value: 9999, default value: 100.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_INDEX_NUM_ENTRIES = 100
|
||||
|
||||
# If the GENERATE_DOCSET tag is set to YES, additional index files will be
|
||||
# generated that can be used as input for Apple's Xcode 3 integrated development
|
||||
# environment (see: http://developer.apple.com/tools/xcode/), introduced with
|
||||
# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
|
||||
# Makefile in the HTML output directory. Running make will produce the docset in
|
||||
# that directory and running make install will install the docset in
|
||||
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
|
||||
# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
|
||||
# for more information.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
GENERATE_DOCSET = NO
|
||||
|
||||
# This tag determines the name of the docset feed. A documentation feed provides
|
||||
# an umbrella under which multiple documentation sets from a single provider
|
||||
# (such as a company or product suite) can be grouped.
|
||||
# The default value is: Doxygen generated docs.
|
||||
# This tag requires that the tag GENERATE_DOCSET is set to YES.
|
||||
|
||||
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||
|
||||
# This tag specifies a string that should uniquely identify the documentation
|
||||
# set bundle. This should be a reverse domain-name style string, e.g.
|
||||
# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
|
||||
# The default value is: org.doxygen.Project.
|
||||
# This tag requires that the tag GENERATE_DOCSET is set to YES.
|
||||
|
||||
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||
|
||||
# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
|
||||
# the documentation publisher. This should be a reverse domain-name style
|
||||
# string, e.g. com.mycompany.MyDocSet.documentation.
|
||||
# The default value is: org.doxygen.Publisher.
|
||||
# This tag requires that the tag GENERATE_DOCSET is set to YES.
|
||||
|
||||
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
||||
|
||||
# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
|
||||
# The default value is: Publisher.
|
||||
# This tag requires that the tag GENERATE_DOCSET is set to YES.
|
||||
|
||||
DOCSET_PUBLISHER_NAME = Publisher
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
|
||||
# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
|
||||
# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
|
||||
# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
|
||||
# Windows.
|
||||
#
|
||||
# The HTML Help Workshop contains a compiler that can convert all HTML output
|
||||
# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
|
||||
# files are now used as the Windows 98 help format, and will replace the old
|
||||
# Windows help format (.hlp) on all Windows platforms in the future. Compressed
|
||||
# HTML files also contain an index, a table of contents, and you can search for
|
||||
# words in the documentation. The HTML workshop also contains a viewer for
|
||||
# compressed HTML files.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
GENERATE_HTMLHELP = NO
|
||||
|
||||
# The CHM_FILE tag can be used to specify the file name of the resulting .chm
|
||||
# file. You can add a path in front of the file if the result should not be
|
||||
# written to the html output directory.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
CHM_FILE =
|
||||
|
||||
# The HHC_LOCATION tag can be used to specify the location (absolute path
|
||||
# including file name) of the HTML help compiler (hhc.exe). If non-empty,
|
||||
# doxygen will try to run the HTML help compiler on the generated index.hhp.
|
||||
# The file has to be specified with full path.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
HHC_LOCATION =
|
||||
|
||||
# The GENERATE_CHI flag controls if a separate .chi index file is generated
|
||||
# (YES) or that it should be included in the master .chm file (NO).
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
GENERATE_CHI = NO
|
||||
|
||||
# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
|
||||
# and project file content.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
CHM_INDEX_ENCODING =
|
||||
|
||||
# The BINARY_TOC flag controls whether a binary table of contents is generated
|
||||
# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
|
||||
# enables the Previous and Next buttons.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
BINARY_TOC = NO
|
||||
|
||||
# The TOC_EXPAND flag can be set to YES to add extra items for group members to
|
||||
# the table of contents of the HTML help documentation and to the tree view.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
TOC_EXPAND = YES
|
||||
|
||||
# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
|
||||
# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
|
||||
# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
|
||||
# (.qch) of the generated HTML documentation.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
GENERATE_QHP = NO
|
||||
|
||||
# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
|
||||
# the file name of the resulting .qch file. The path specified is relative to
|
||||
# the HTML output folder.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QCH_FILE =
|
||||
|
||||
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
|
||||
# Project output. For more information please see Qt Help Project / Namespace
|
||||
# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
|
||||
# The default value is: org.doxygen.Project.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_NAMESPACE = org.doxygen.Project
|
||||
|
||||
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
|
||||
# Help Project output. For more information please see Qt Help Project / Virtual
|
||||
# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
|
||||
# folders).
|
||||
# The default value is: doc.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_VIRTUAL_FOLDER = doc
|
||||
|
||||
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
|
||||
# filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
|
||||
# filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_CUST_FILTER_NAME =
|
||||
|
||||
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
|
||||
# custom filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
|
||||
# filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_CUST_FILTER_ATTRS =
|
||||
|
||||
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
|
||||
# project's filter section matches. Qt Help Project / Filter Attributes (see:
|
||||
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_SECT_FILTER_ATTRS =
|
||||
|
||||
# The QHG_LOCATION tag can be used to specify the location of Qt's
|
||||
# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
|
||||
# generated .qhp file.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHG_LOCATION =
|
||||
|
||||
# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
|
||||
# generated, together with the HTML files, they form an Eclipse help plugin. To
|
||||
# install this plugin and make it available under the help contents menu in
|
||||
# Eclipse, the contents of the directory containing the HTML and XML files needs
|
||||
# to be copied into the plugins directory of eclipse. The name of the directory
|
||||
# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
|
||||
# After copying Eclipse needs to be restarted before the help appears.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
GENERATE_ECLIPSEHELP = NO
|
||||
|
||||
# A unique identifier for the Eclipse help plugin. When installing the plugin
|
||||
# the directory name containing the HTML and XML files should also have this
|
||||
# name. Each documentation set should have its own identifier.
|
||||
# The default value is: org.doxygen.Project.
|
||||
# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
|
||||
|
||||
ECLIPSE_DOC_ID = org.doxygen.Project
|
||||
|
||||
# If you want full control over the layout of the generated HTML pages it might
|
||||
# be necessary to disable the index and replace it with your own. The
|
||||
# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
|
||||
# of each HTML page. A value of NO enables the index and the value YES disables
|
||||
# it. Since the tabs in the index contain the same information as the navigation
|
||||
# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
DISABLE_INDEX = YES
|
||||
|
||||
# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
|
||||
# structure should be generated to display hierarchical information. If the tag
|
||||
# value is set to YES, a side panel will be generated containing a tree-like
|
||||
# index structure (just like the one that is generated for HTML Help). For this
|
||||
# to work a browser that supports JavaScript, DHTML, CSS and frames is required
|
||||
# (i.e. any modern browser). Windows users are probably better off using the
|
||||
# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
|
||||
# further fine-tune the look of the index. As an example, the default style
|
||||
# sheet generated by doxygen has an example that shows how to put an image at
|
||||
# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
|
||||
# the same information as the tab index, you could consider setting
|
||||
# DISABLE_INDEX to YES when enabling this option.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
GENERATE_TREEVIEW = YES
|
||||
|
||||
# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
|
||||
# doxygen will group on one line in the generated HTML documentation.
|
||||
#
|
||||
# Note that a value of 0 will completely suppress the enum values from appearing
|
||||
# in the overview section.
|
||||
# Minimum value: 0, maximum value: 20, default value: 4.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
ENUM_VALUES_PER_LINE = 1
|
||||
|
||||
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
|
||||
# to set the initial width (in pixels) of the frame in which the tree is shown.
|
||||
# Minimum value: 0, maximum value: 1500, default value: 250.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
TREEVIEW_WIDTH = 250
|
||||
|
||||
# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
|
||||
# external symbols imported via tag files in a separate window.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
EXT_LINKS_IN_WINDOW = NO
|
||||
|
||||
# Use this tag to change the font size of LaTeX formulas included as images in
|
||||
# the HTML documentation. When you change the font size after a successful
|
||||
# doxygen run you need to manually remove any form_*.png images from the HTML
|
||||
# output directory to force them to be regenerated.
|
||||
# Minimum value: 8, maximum value: 50, default value: 10.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
FORMULA_FONTSIZE = 10
|
||||
|
||||
# Use the FORMULA_TRANPARENT tag to determine whether or not the images
|
||||
# generated for formulas are transparent PNGs. Transparent PNGs are not
|
||||
# supported properly for IE 6.0, but are supported on all modern browsers.
|
||||
#
|
||||
# Note that when changing this option you need to delete any form_*.png files in
|
||||
# the HTML output directory before the changes have effect.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
FORMULA_TRANSPARENT = YES
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
|
||||
# http://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
|
||||
# installed or if you want to formulas look prettier in the HTML output. When
|
||||
# enabled you may also need to install MathJax separately and configure the path
|
||||
# to it using the MATHJAX_RELPATH option.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
USE_MATHJAX = NO
|
||||
|
||||
# When MathJax is enabled you can set the default output format to be used for
|
||||
# the MathJax output. See the MathJax site (see:
|
||||
# http://docs.mathjax.org/en/latest/output.html) for more details.
|
||||
# Possible values are: HTML-CSS (which is slower, but has the best
|
||||
# compatibility), NativeMML (i.e. MathML) and SVG.
|
||||
# The default value is: HTML-CSS.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_FORMAT = HTML-CSS
|
||||
|
||||
# When MathJax is enabled you need to specify the location relative to the HTML
|
||||
# output directory using the MATHJAX_RELPATH option. The destination directory
|
||||
# should contain the MathJax.js script. For instance, if the mathjax directory
|
||||
# is located at the same level as the HTML output directory, then
|
||||
# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
|
||||
# Content Delivery Network so you can quickly see the result without installing
|
||||
# MathJax. However, it is strongly recommended to install a local copy of
|
||||
# MathJax from http://www.mathjax.org before deployment.
|
||||
# The default value is: http://cdn.mathjax.org/mathjax/latest.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||
|
||||
# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
|
||||
# extension names that should be enabled during MathJax rendering. For example
|
||||
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_EXTENSIONS =
|
||||
|
||||
# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
|
||||
# of code that will be used on startup of the MathJax code. See the MathJax site
|
||||
# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
|
||||
# example see the documentation.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_CODEFILE =
|
||||
|
||||
# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
|
||||
# the HTML output. The underlying search engine uses javascript and DHTML and
|
||||
# should work on any modern browser. Note that when using HTML help
|
||||
# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
|
||||
# there is already a search function so this one should typically be disabled.
|
||||
# For large projects the javascript based search engine can be slow, then
|
||||
# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
|
||||
# search using the keyboard; to jump to the search box use <access key> + S
|
||||
# (what the <access key> is depends on the OS and browser, but it is typically
|
||||
# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
|
||||
# key> to jump into the search results window, the results can be navigated
|
||||
# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
|
||||
# the search. The filter options can be selected when the cursor is inside the
|
||||
# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
|
||||
# to select a filter and <Enter> or <escape> to activate or cancel the filter
|
||||
# option.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
SEARCHENGINE = NO
|
||||
|
||||
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
|
||||
# implemented using a web server instead of a web client using Javascript. There
|
||||
# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
|
||||
# setting. When disabled, doxygen will generate a PHP script for searching and
|
||||
# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
|
||||
# and searching needs to be provided by external tools. See the section
|
||||
# "External Indexing and Searching" for details.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
SERVER_BASED_SEARCH = NO
|
||||
|
||||
# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
|
||||
# script for searching. Instead the search results are written to an XML file
|
||||
# which needs to be processed by an external indexer. Doxygen will invoke an
|
||||
# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
|
||||
# search results.
|
||||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: http://xapian.org/).
|
||||
#
|
||||
# See the section "External Indexing and Searching" for details.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
EXTERNAL_SEARCH = NO
|
||||
|
||||
# The SEARCHENGINE_URL should point to a search engine hosted by a web server
|
||||
# which will return the search results when EXTERNAL_SEARCH is enabled.
|
||||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: http://xapian.org/). See the section "External Indexing and
|
||||
# Searching" for details.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
SEARCHENGINE_URL =
|
||||
|
||||
# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
|
||||
# search data is written to a file for indexing by an external tool. With the
|
||||
# SEARCHDATA_FILE tag the name of this file can be specified.
|
||||
# The default file is: searchdata.xml.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
SEARCHDATA_FILE = searchdata.xml
|
||||
|
||||
# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
|
||||
# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
|
||||
# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
|
||||
# projects and redirect the results back to the right project.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
EXTERNAL_SEARCH_ID =
|
||||
|
||||
# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
|
||||
# projects other than the one defined by this configuration file, but that are
|
||||
# all added to the same external search index. Each project needs to have a
|
||||
# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
|
||||
# to a relative location where the documentation can be found. The format is:
|
||||
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
EXTRA_SEARCH_MAPPINGS =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
|
||||
# The default value is: YES.
|
||||
|
||||
GENERATE_LATEX = NO
|
||||
|
||||
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
|
||||
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
|
||||
# it.
|
||||
# The default directory is: latex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_OUTPUT = latex
|
||||
|
||||
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
|
||||
# invoked.
|
||||
#
|
||||
# Note that when enabling USE_PDFLATEX this option is only used for generating
|
||||
# bitmaps for formulas in the HTML output, but not in the Makefile that is
|
||||
# written to the output directory.
|
||||
# The default file is: latex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_CMD_NAME = latex
|
||||
|
||||
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
|
||||
# index for LaTeX.
|
||||
# The default file is: makeindex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
|
||||
# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
|
||||
# documents. This may be useful for small projects and may help to save some
|
||||
# trees in general.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
COMPACT_LATEX = NO
|
||||
|
||||
# The PAPER_TYPE tag can be used to set the paper type that is used by the
|
||||
# printer.
|
||||
# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
|
||||
# 14 inches) and executive (7.25 x 10.5 inches).
|
||||
# The default value is: a4.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
PAPER_TYPE = a4wide
|
||||
|
||||
# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
|
||||
# that should be included in the LaTeX output. To get the times font for
|
||||
# instance you can specify
|
||||
# EXTRA_PACKAGES=times
|
||||
# If left blank no extra packages will be included.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
EXTRA_PACKAGES =
|
||||
|
||||
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
|
||||
# generated LaTeX document. The header should contain everything until the first
|
||||
# chapter. If it is left blank doxygen will generate a standard header. See
|
||||
# section "Doxygen usage" for information on how to let doxygen write the
|
||||
# default header to a separate file.
|
||||
#
|
||||
# Note: Only use a user-defined header if you know what you are doing! The
|
||||
# following commands have a special meaning inside the header: $title,
|
||||
# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
|
||||
# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
|
||||
# string, for the replacement values of the other commands the user is referred
|
||||
# to HTML_HEADER.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_HEADER =
|
||||
|
||||
# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
|
||||
# generated LaTeX document. The footer should contain everything after the last
|
||||
# chapter. If it is left blank doxygen will generate a standard footer. See
|
||||
# LATEX_HEADER for more information on how to generate a default footer and what
|
||||
# special commands can be used inside the footer.
|
||||
#
|
||||
# Note: Only use a user-defined footer if you know what you are doing!
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_FOOTER =
|
||||
|
||||
# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
|
||||
# LaTeX style sheets that are included after the standard style sheets created
|
||||
# by doxygen. Using this option one can overrule certain style aspects. Doxygen
|
||||
# will copy the style sheet files to the output directory.
|
||||
# Note: The order of the extra style sheet files is of importance (e.g. the last
|
||||
# style sheet in the list overrules the setting of the previous ones in the
|
||||
# list).
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_EXTRA_STYLESHEET =
|
||||
|
||||
# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
|
||||
# other source files which should be copied to the LATEX_OUTPUT output
|
||||
# directory. Note that the files will be copied as-is; there are no commands or
|
||||
# markers available.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_EXTRA_FILES =
|
||||
|
||||
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
|
||||
# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
|
||||
# contain links (just like the HTML output) instead of page references. This
|
||||
# makes the output suitable for online browsing using a PDF viewer.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
PDF_HYPERLINKS = YES
|
||||
|
||||
# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
|
||||
# the PDF file directly from the LaTeX files. Set this option to YES, to get a
|
||||
# higher quality PDF documentation.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
USE_PDFLATEX = YES
|
||||
|
||||
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
|
||||
# command to the generated LaTeX files. This will instruct LaTeX to keep running
|
||||
# if errors occur, instead of asking the user for help. This option is also used
|
||||
# when generating formulas in HTML.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_BATCHMODE = NO
|
||||
|
||||
# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
|
||||
# index chapters (such as File Index, Compound Index, etc.) in the output.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_HIDE_INDICES = NO
|
||||
|
||||
# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
|
||||
# code with syntax highlighting in the LaTeX output.
|
||||
#
|
||||
# Note that which sources are shown also depends on other settings such as
|
||||
# SOURCE_BROWSER.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_SOURCE_CODE = NO
|
||||
|
||||
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
|
||||
# bibliography, e.g. plainnat, or ieeetr. See
|
||||
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
# The default value is: plain.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_BIB_STYLE = plain
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
|
||||
# RTF output is optimized for Word 97 and may not look too pretty with other RTF
|
||||
# readers/editors.
|
||||
# The default value is: NO.
|
||||
|
||||
GENERATE_RTF = NO
|
||||
|
||||
# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
|
||||
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
|
||||
# it.
|
||||
# The default directory is: rtf.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_OUTPUT = rtf
|
||||
|
||||
# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
|
||||
# documents. This may be useful for small projects and may help to save some
|
||||
# trees in general.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
COMPACT_RTF = NO
|
||||
|
||||
# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
|
||||
# contain hyperlink fields. The RTF file will contain links (just like the HTML
|
||||
# output) instead of page references. This makes the output suitable for online
|
||||
# browsing using Word or some other Word compatible readers that support those
|
||||
# fields.
|
||||
#
|
||||
# Note: WordPad (write) and others do not support links.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_HYPERLINKS = NO
|
||||
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's config
|
||||
# file, i.e. a series of assignments. You only have to provide replacements,
|
||||
# missing definitions are set to their default value.
|
||||
#
|
||||
# See also section "Doxygen usage" for information on how to generate the
|
||||
# default style sheet that doxygen normally uses.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_STYLESHEET_FILE =
|
||||
|
||||
# Set optional variables used in the generation of an RTF document. Syntax is
|
||||
# similar to doxygen's config file. A template extensions file can be generated
|
||||
# using doxygen -e rtf extensionFile.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_EXTENSIONS_FILE =
|
||||
|
||||
# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
|
||||
# with syntax highlighting in the RTF output.
|
||||
#
|
||||
# Note that which sources are shown also depends on other settings such as
|
||||
# SOURCE_BROWSER.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_SOURCE_CODE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
|
||||
# classes and files.
|
||||
# The default value is: NO.
|
||||
|
||||
GENERATE_MAN = NO
|
||||
|
||||
# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
|
||||
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
|
||||
# it. A directory man3 will be created inside the directory specified by
|
||||
# MAN_OUTPUT.
|
||||
# The default directory is: man.
|
||||
# This tag requires that the tag GENERATE_MAN is set to YES.
|
||||
|
||||
MAN_OUTPUT = man
|
||||
|
||||
# The MAN_EXTENSION tag determines the extension that is added to the generated
|
||||
# man pages. In case the manual section does not start with a number, the number
|
||||
# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
|
||||
# optional.
|
||||
# The default value is: .3.
|
||||
# This tag requires that the tag GENERATE_MAN is set to YES.
|
||||
|
||||
MAN_EXTENSION = .3
|
||||
|
||||
# The MAN_SUBDIR tag determines the name of the directory created within
|
||||
# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
|
||||
# MAN_EXTENSION with the initial . removed.
|
||||
# This tag requires that the tag GENERATE_MAN is set to YES.
|
||||
|
||||
MAN_SUBDIR =
|
||||
|
||||
# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
|
||||
# will generate one additional man file for each entity documented in the real
|
||||
# man page(s). These additional files only source the real man page, but without
|
||||
# them the man command would be unable to find the correct page.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_MAN is set to YES.
|
||||
|
||||
MAN_LINKS = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
|
||||
# captures the structure of the code including all documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
GENERATE_XML = NO
|
||||
|
||||
# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
|
||||
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
|
||||
# it.
|
||||
# The default directory is: xml.
|
||||
# This tag requires that the tag GENERATE_XML is set to YES.
|
||||
|
||||
XML_OUTPUT = xml
|
||||
|
||||
# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
|
||||
# listings (including syntax highlighting and cross-referencing information) to
|
||||
# the XML output. Note that enabling this will significantly increase the size
|
||||
# of the XML output.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_XML is set to YES.
|
||||
|
||||
XML_PROGRAMLISTING = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the DOCBOOK output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
|
||||
# that can be used to generate PDF.
|
||||
# The default value is: NO.
|
||||
|
||||
GENERATE_DOCBOOK = NO
|
||||
|
||||
# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
|
||||
# front of it.
|
||||
# The default directory is: docbook.
|
||||
# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
|
||||
|
||||
DOCBOOK_OUTPUT = docbook
|
||||
|
||||
# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
|
||||
# program listings (including syntax highlighting and cross-referencing
|
||||
# information) to the DOCBOOK output. Note that enabling this will significantly
|
||||
# increase the size of the DOCBOOK output.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
|
||||
|
||||
DOCBOOK_PROGRAMLISTING = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
|
||||
# AutoGen Definitions (see http://autogen.sf.net) file that captures the
|
||||
# structure of the code including all documentation. Note that this feature is
|
||||
# still experimental and incomplete at the moment.
|
||||
# The default value is: NO.
|
||||
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
|
||||
# file that captures the structure of the code including all documentation.
|
||||
#
|
||||
# Note that this feature is still experimental and incomplete at the moment.
|
||||
# The default value is: NO.
|
||||
|
||||
GENERATE_PERLMOD = NO
|
||||
|
||||
# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
|
||||
# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
|
||||
# output from the Perl module output.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
|
||||
|
||||
PERLMOD_LATEX = NO
|
||||
|
||||
# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
|
||||
# formatted so it can be parsed by a human reader. This is useful if you want to
|
||||
# understand what is going on. On the other hand, if this tag is set to NO, the
|
||||
# size of the Perl module output will be much smaller and Perl will parse it
|
||||
# just the same.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
|
||||
|
||||
PERLMOD_PRETTY = YES
|
||||
|
||||
# The names of the make variables in the generated doxyrules.make file are
|
||||
# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
|
||||
# so different doxyrules.make files included by the same Makefile don't
|
||||
# overwrite each other's variables.
|
||||
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
|
||||
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
|
||||
# C-preprocessor directives found in the sources and include files.
|
||||
# The default value is: YES.
|
||||
|
||||
ENABLE_PREPROCESSING = YES
|
||||
|
||||
# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
|
||||
# in the source code. If set to NO, only conditional compilation will be
|
||||
# performed. Macro expansion can be done in a controlled way by setting
|
||||
# EXPAND_ONLY_PREDEF to YES.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
MACRO_EXPANSION = YES
|
||||
|
||||
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
|
||||
# the macro expansion is limited to the macros specified with the PREDEFINED and
|
||||
# EXPAND_AS_DEFINED tags.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
EXPAND_ONLY_PREDEF = YES
|
||||
|
||||
# If the SEARCH_INCLUDES tag is set to YES, the include files in the
|
||||
# INCLUDE_PATH will be searched if a #include is found.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
SEARCH_INCLUDES = YES
|
||||
|
||||
# The INCLUDE_PATH tag can be used to specify one or more directories that
|
||||
# contain include files that are not input files but should be processed by the
|
||||
# preprocessor.
|
||||
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
|
||||
|
||||
INCLUDE_PATH =
|
||||
|
||||
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
||||
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
||||
# directories. If left blank, the patterns specified with FILE_PATTERNS will be
|
||||
# used.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
|
||||
# The PREDEFINED tag can be used to specify one or more macro names that are
|
||||
# defined before the preprocessor is started (similar to the -D option of e.g.
|
||||
# gcc). The argument of the tag is a list of macros of the form: name or
|
||||
# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
|
||||
# is assumed. To prevent a macro definition from being undefined via #undef or
|
||||
# recursively expanded use the := operator instead of the = operator.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
PREDEFINED = __DOXYGEN__ \
|
||||
PROGMEM \
|
||||
ATTR_NO_INIT
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||
# tag can be used to specify a list of macro names that should be expanded. The
|
||||
# macro definition that is found in the sources will be used. Use the PREDEFINED
|
||||
# tag if you want to use a different macro definition that overrules the
|
||||
# definition found in the source code.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
EXPAND_AS_DEFINED =
|
||||
|
||||
# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
|
||||
# remove all references to function-like macros that are alone on a line, have
|
||||
# an all uppercase name, and do not end with a semicolon. Such function macros
|
||||
# are typically used for boiler-plate code, and will confuse the parser if not
|
||||
# removed.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The TAGFILES tag can be used to specify one or more tag files. For each tag
|
||||
# file the location of the external documentation should be added. The format of
|
||||
# a tag file without this location is as follows:
|
||||
# TAGFILES = file1 file2 ...
|
||||
# Adding location for the tag files is done as follows:
|
||||
# TAGFILES = file1=loc1 "file2 = loc2" ...
|
||||
# where loc1 and loc2 can be relative or absolute paths or URLs. See the
|
||||
# section "Linking to external documentation" for more information about the use
|
||||
# of tag files.
|
||||
# Note: Each tag file must have a unique name (where the name does NOT include
|
||||
# the path). If a tag file is not located in the directory in which doxygen is
|
||||
# run, you must also specify the path to the tagfile here.
|
||||
|
||||
TAGFILES =
|
||||
|
||||
# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
|
||||
# tag file that is based on the input files it reads. See section "Linking to
|
||||
# external documentation" for more information about the usage of tag files.
|
||||
|
||||
GENERATE_TAGFILE =
|
||||
|
||||
# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
|
||||
# the class index. If set to NO, only the inherited external classes will be
|
||||
# listed.
|
||||
# The default value is: NO.
|
||||
|
||||
ALLEXTERNALS = NO
|
||||
|
||||
# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
|
||||
# in the modules index. If set to NO, only the current project's groups will be
|
||||
# listed.
|
||||
# The default value is: YES.
|
||||
|
||||
EXTERNAL_GROUPS = YES
|
||||
|
||||
# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
|
||||
# the related pages index. If set to NO, only the current project's pages will
|
||||
# be listed.
|
||||
# The default value is: YES.
|
||||
|
||||
EXTERNAL_PAGES = YES
|
||||
|
||||
# The PERL_PATH should be the absolute path and name of the perl script
|
||||
# interpreter (i.e. the result of 'which perl').
|
||||
# The default file (with absolute path) is: /usr/bin/perl.
|
||||
|
||||
PERL_PATH = /usr/bin/perl
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
|
||||
# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
|
||||
# NO turns the diagrams off. Note that this option also works with HAVE_DOT
|
||||
# disabled, but it is recommended to install and use dot, since it yields more
|
||||
# powerful graphs.
|
||||
# The default value is: YES.
|
||||
|
||||
CLASS_DIAGRAMS = NO
|
||||
|
||||
# You can define message sequence charts within doxygen comments using the \msc
|
||||
# command. Doxygen will then run the mscgen tool (see:
|
||||
# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
|
||||
# documentation. The MSCGEN_PATH tag allows you to specify the directory where
|
||||
# the mscgen tool resides. If left empty the tool is assumed to be found in the
|
||||
# default search path.
|
||||
|
||||
MSCGEN_PATH =
|
||||
|
||||
# You can include diagrams made with dia in doxygen documentation. Doxygen will
|
||||
# then run dia to produce the diagram and insert it in the documentation. The
|
||||
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
|
||||
# If left empty dia is assumed to be found in the default search path.
|
||||
|
||||
DIA_PATH =
|
||||
|
||||
# If set to YES the inheritance and collaboration graphs will hide inheritance
|
||||
# and usage relations if the target is undocumented or is not a class.
|
||||
# The default value is: YES.
|
||||
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
|
||||
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
|
||||
# available from the path. This tool is part of Graphviz (see:
|
||||
# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
|
||||
# Bell Labs. The other options in this section have no effect if this option is
|
||||
# set to NO
|
||||
# The default value is: NO.
|
||||
|
||||
HAVE_DOT = NO
|
||||
|
||||
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
|
||||
# to run in parallel. When set to 0 doxygen will base this on the number of
|
||||
# processors available in the system. You can set it explicitly to a value
|
||||
# larger than 0 to get control over the balance between CPU load and processing
|
||||
# speed.
|
||||
# Minimum value: 0, maximum value: 32, default value: 0.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_NUM_THREADS = 0
|
||||
|
||||
# When you want a differently looking font in the dot files that doxygen
|
||||
# generates you can specify the font name using DOT_FONTNAME. You need to make
|
||||
# sure dot is able to find the font, which can be done by putting it in a
|
||||
# standard location or by setting the DOTFONTPATH environment variable or by
|
||||
# setting DOT_FONTPATH to the directory containing the font.
|
||||
# The default value is: Helvetica.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_FONTNAME =
|
||||
|
||||
# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
|
||||
# dot graphs.
|
||||
# Minimum value: 4, maximum value: 24, default value: 10.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_FONTSIZE = 10
|
||||
|
||||
# By default doxygen will tell dot to use the default font as specified with
|
||||
# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
|
||||
# the path where dot can find it using this tag.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_FONTPATH =
|
||||
|
||||
# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
|
||||
# each documented class showing the direct and indirect inheritance relations.
|
||||
# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
CLASS_GRAPH = NO
|
||||
|
||||
# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
|
||||
# graph for each documented class showing the direct and indirect implementation
|
||||
# dependencies (inheritance, containment, and class references variables) of the
|
||||
# class with other documented classes.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
COLLABORATION_GRAPH = NO
|
||||
|
||||
# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
|
||||
# groups, showing the direct groups dependencies.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
GROUP_GRAPHS = NO
|
||||
|
||||
# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
|
||||
# collaboration diagrams in a style similar to the OMG's Unified Modeling
|
||||
# Language.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
UML_LOOK = NO
|
||||
|
||||
# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
|
||||
# class node. If there are many fields or methods and many nodes the graph may
|
||||
# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
|
||||
# number of items for each type to make the size more manageable. Set this to 0
|
||||
# for no limit. Note that the threshold may be exceeded by 50% before the limit
|
||||
# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
|
||||
# but if the number exceeds 15, the total amount of fields shown is limited to
|
||||
# 10.
|
||||
# Minimum value: 0, maximum value: 100, default value: 10.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
UML_LIMIT_NUM_FIELDS = 10
|
||||
|
||||
# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
|
||||
# collaboration graphs will show the relations between templates and their
|
||||
# instances.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
TEMPLATE_RELATIONS = NO
|
||||
|
||||
# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
|
||||
# YES then doxygen will generate a graph for each documented file showing the
|
||||
# direct and indirect include dependencies of the file with other documented
|
||||
# files.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
INCLUDE_GRAPH = NO
|
||||
|
||||
# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
|
||||
# set to YES then doxygen will generate a graph for each documented file showing
|
||||
# the direct and indirect include dependencies of the file with other documented
|
||||
# files.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
INCLUDED_BY_GRAPH = NO
|
||||
|
||||
# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
|
||||
# dependency graph for every global function or class method.
|
||||
#
|
||||
# Note that enabling this option will significantly increase the time of a run.
|
||||
# So in most cases it will be better to enable call graphs for selected
|
||||
# functions only using the \callgraph command.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
CALL_GRAPH = NO
|
||||
|
||||
# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
|
||||
# dependency graph for every global function or class method.
|
||||
#
|
||||
# Note that enabling this option will significantly increase the time of a run.
|
||||
# So in most cases it will be better to enable caller graphs for selected
|
||||
# functions only using the \callergraph command.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
CALLER_GRAPH = NO
|
||||
|
||||
# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
|
||||
# hierarchy of all classes instead of a textual one.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
GRAPHICAL_HIERARCHY = NO
|
||||
|
||||
# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
|
||||
# dependencies a directory has on other directories in a graphical way. The
|
||||
# dependency relations are determined by the #include relations between the
|
||||
# files in the directories.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DIRECTORY_GRAPH = NO
|
||||
|
||||
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
|
||||
# generated by dot.
|
||||
# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
|
||||
# to make the SVG files visible in IE 9+ (other browsers do not have this
|
||||
# requirement).
|
||||
# Possible values are: png, jpg, gif and svg.
|
||||
# The default value is: png.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_IMAGE_FORMAT = png
|
||||
|
||||
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
|
||||
# enable generation of interactive SVG images that allow zooming and panning.
|
||||
#
|
||||
# Note that this requires a modern browser other than Internet Explorer. Tested
|
||||
# and working are Firefox, Chrome, Safari, and Opera.
|
||||
# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
|
||||
# the SVG files visible. Older versions of IE do not have SVG support.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
INTERACTIVE_SVG = NO
|
||||
|
||||
# The DOT_PATH tag can be used to specify the path where the dot tool can be
|
||||
# found. If left blank, it is assumed the dot tool can be found in the path.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_PATH =
|
||||
|
||||
# The DOTFILE_DIRS tag can be used to specify one or more directories that
|
||||
# contain dot files that are included in the documentation (see the \dotfile
|
||||
# command).
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOTFILE_DIRS =
|
||||
|
||||
# The MSCFILE_DIRS tag can be used to specify one or more directories that
|
||||
# contain msc files that are included in the documentation (see the \mscfile
|
||||
# command).
|
||||
|
||||
MSCFILE_DIRS =
|
||||
|
||||
# The DIAFILE_DIRS tag can be used to specify one or more directories that
|
||||
# contain dia files that are included in the documentation (see the \diafile
|
||||
# command).
|
||||
|
||||
DIAFILE_DIRS =
|
||||
|
||||
# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
|
||||
# path where java can find the plantuml.jar file. If left blank, it is assumed
|
||||
# PlantUML is not used or called during a preprocessing step. Doxygen will
|
||||
# generate a warning when it encounters a \startuml command in this case and
|
||||
# will not generate output for the diagram.
|
||||
|
||||
PLANTUML_JAR_PATH =
|
||||
|
||||
# When using plantuml, the specified paths are searched for files specified by
|
||||
# the !include statement in a plantuml block.
|
||||
|
||||
PLANTUML_INCLUDE_PATH =
|
||||
|
||||
# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
|
||||
# that will be shown in the graph. If the number of nodes in a graph becomes
|
||||
# larger than this value, doxygen will truncate the graph, which is visualized
|
||||
# by representing a node as a red box. Note that doxygen if the number of direct
|
||||
# children of the root node in a graph is already larger than
|
||||
# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
|
||||
# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
|
||||
# Minimum value: 0, maximum value: 10000, default value: 50.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_GRAPH_MAX_NODES = 15
|
||||
|
||||
# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
|
||||
# generated by dot. A depth value of 3 means that only nodes reachable from the
|
||||
# root by following a path via at most 3 edges will be shown. Nodes that lay
|
||||
# further from the root node will be omitted. Note that setting this option to 1
|
||||
# or 2 may greatly reduce the computation time needed for large code bases. Also
|
||||
# note that the size of a graph can be further restricted by
|
||||
# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
|
||||
# Minimum value: 0, maximum value: 1000, default value: 0.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
MAX_DOT_GRAPH_DEPTH = 2
|
||||
|
||||
# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
|
||||
# background. This is disabled by default, because dot on Windows does not seem
|
||||
# to support this out of the box.
|
||||
#
|
||||
# Warning: Depending on the platform used, enabling this option may lead to
|
||||
# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
|
||||
# read).
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_TRANSPARENT = YES
|
||||
|
||||
# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
|
||||
# files in one run (i.e. multiple -o and -T options on the command line). This
|
||||
# makes dot run faster, but since only newer versions of dot (>1.8.10) support
|
||||
# this, this feature is disabled by default.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_MULTI_TARGETS = NO
|
||||
|
||||
# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
|
||||
# explaining the meaning of the various boxes and arrows in the dot generated
|
||||
# graphs.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
GENERATE_LEGEND = YES
|
||||
|
||||
# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
|
||||
# files that are used to generate the various graphs.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_CLEANUP = YES
|
51
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/BootLoaderHID/makefile
Normal file
51
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/BootLoaderHID/makefile
Normal file
@ -0,0 +1,51 @@
|
||||
#
|
||||
# LUFA Library
|
||||
# Copyright (C) Dean Camera, 2015.
|
||||
#
|
||||
# dean [at] fourwalledcubicle [dot] com
|
||||
# www.lufa-lib.org
|
||||
#
|
||||
# --------------------------------------
|
||||
# LUFA Project Makefile.
|
||||
# --------------------------------------
|
||||
|
||||
# Run "make help" for target help.
|
||||
|
||||
MCU = atmega32u4
|
||||
ARCH = AVR8
|
||||
BOARD = OLIMEX32U4
|
||||
F_CPU = 16000000
|
||||
F_USB = $(F_CPU)
|
||||
OPTIMIZATION = s
|
||||
TARGET = BootloaderHID
|
||||
SRC = $(TARGET).c Descriptors.c $(LUFA_SRC_USB)
|
||||
LUFA_PATH = ../lufa-LUFA-151115/LUFA
|
||||
CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/
|
||||
LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START_OFFSET)
|
||||
|
||||
# Flash size and bootloader section sizes of the target, in KB. These must
|
||||
# match the target's total FLASH size and the bootloader size set in the
|
||||
# device's fuses.
|
||||
FLASH_SIZE_KB := 32
|
||||
BOOT_SECTION_SIZE_KB := 4
|
||||
|
||||
# Bootloader address calculation formulas
|
||||
# Do not modify these macros, but rather modify the dependent values above.
|
||||
CALC_ADDRESS_IN_HEX = $(shell printf "0x%X" $$(( $(1) )) )
|
||||
BOOT_START_OFFSET = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024 )
|
||||
BOOT_SEC_OFFSET = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) * 1024) - ($(strip $(1))) )
|
||||
|
||||
# Default target
|
||||
all:
|
||||
|
||||
# Include LUFA build script makefiles
|
||||
include $(LUFA_PATH)/Build/lufa_core.mk
|
||||
include $(LUFA_PATH)/Build/lufa_sources.mk
|
||||
include $(LUFA_PATH)/Build/lufa_build.mk
|
||||
include $(LUFA_PATH)/Build/lufa_cppcheck.mk
|
||||
include $(LUFA_PATH)/Build/lufa_doxygen.mk
|
||||
include $(LUFA_PATH)/Build/lufa_avrdude.mk
|
||||
include $(LUFA_PATH)/Build/lufa_atprogram.mk
|
||||
|
||||
#install:
|
||||
#avrdude -V -pm32u4 -cstk500v2 -P/dev/ttyACM0 -Uflash:w:../BootLoaderHID/BootloaderHID.hex:a -U hfuse:w:0xD8:m -U efuse:w:0xC7:m -U lock:w:0xCF:m
|
1
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/README.md
Normal file
1
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/README.md
Normal file
@ -0,0 +1 @@
|
||||
# TERES-KBD-RELEASE
|
@ -0,0 +1,126 @@
|
||||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2015.
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.lufa-lib.org
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaims all warranties with regard to this
|
||||
software, including all implied warranties of merchantability
|
||||
and fitness. In no event shall the author be liable for any
|
||||
special, indirect or consequential damages or any damages
|
||||
whatsoever resulting from loss of use, data or profits, whether
|
||||
in an action of contract, negligence or other tortious action,
|
||||
arising out of or in connection with the use or performance of
|
||||
this software.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
* \brief LUFA Library Configuration Header File
|
||||
*
|
||||
* This header file is used to configure LUFA's compile time options,
|
||||
* as an alternative to the compile time constants supplied through
|
||||
* a makefile.
|
||||
*
|
||||
* For information on what each token does, refer to the LUFA
|
||||
* manual section "Summary of Compile Tokens".
|
||||
*/
|
||||
|
||||
#ifndef _LUFA_CONFIG_H_
|
||||
#define _LUFA_CONFIG_H_
|
||||
|
||||
#if (ARCH == ARCH_AVR8)
|
||||
|
||||
/* Non-USB Related Configuration Tokens: */
|
||||
// #define DISABLE_TERMINAL_CODES
|
||||
|
||||
/* USB Class Driver Related Tokens: */
|
||||
// #define HID_HOST_BOOT_PROTOCOL_ONLY
|
||||
// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here}
|
||||
// #define HID_USAGE_STACK_DEPTH {Insert Value Here}
|
||||
// #define HID_MAX_COLLECTIONS {Insert Value Here}
|
||||
// #define HID_MAX_REPORTITEMS {Insert Value Here}
|
||||
// #define HID_MAX_REPORT_IDS {Insert Value Here}
|
||||
// #define NO_CLASS_DRIVER_AUTOFLUSH
|
||||
|
||||
/* General USB Driver Related Tokens: */
|
||||
// #define ORDERED_EP_CONFIG
|
||||
#define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)
|
||||
#define USB_DEVICE_ONLY
|
||||
// #define USB_HOST_ONLY
|
||||
// #define USB_STREAM_TIMEOUT_MS {Insert Value Here}
|
||||
// #define NO_LIMITED_CONTROLLER_CONNECT
|
||||
// #define NO_SOF_EVENTS
|
||||
|
||||
/* USB Device Mode Driver Related Tokens: */
|
||||
// #define USE_RAM_DESCRIPTORS
|
||||
#define USE_FLASH_DESCRIPTORS
|
||||
// #define USE_EEPROM_DESCRIPTORS
|
||||
// #define NO_INTERNAL_SERIAL
|
||||
#define FIXED_CONTROL_ENDPOINT_SIZE 8
|
||||
// #define DEVICE_STATE_AS_GPIOR {Insert Value Here}
|
||||
#define FIXED_NUM_CONFIGURATIONS 1
|
||||
// #define CONTROL_ONLY_DEVICE
|
||||
// #define INTERRUPT_CONTROL_ENDPOINT
|
||||
// #define NO_DEVICE_REMOTE_WAKEUP
|
||||
// #define NO_DEVICE_SELF_POWER
|
||||
|
||||
/* USB Host Mode Driver Related Tokens: */
|
||||
// #define HOST_STATE_AS_GPIOR {Insert Value Here}
|
||||
// #define USB_HOST_TIMEOUT_MS {Insert Value Here}
|
||||
// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here}
|
||||
// #define NO_AUTO_VBUS_MANAGEMENT
|
||||
// #define INVERTED_VBUS_ENABLE_LINE
|
||||
|
||||
#elif (ARCH == ARCH_XMEGA)
|
||||
|
||||
/* Non-USB Related Configuration Tokens: */
|
||||
// #define DISABLE_TERMINAL_CODES
|
||||
|
||||
/* USB Class Driver Related Tokens: */
|
||||
// #define HID_HOST_BOOT_PROTOCOL_ONLY
|
||||
// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here}
|
||||
// #define HID_USAGE_STACK_DEPTH {Insert Value Here}
|
||||
// #define HID_MAX_COLLECTIONS {Insert Value Here}
|
||||
// #define HID_MAX_REPORTITEMS {Insert Value Here}
|
||||
// #define HID_MAX_REPORT_IDS {Insert Value Here}
|
||||
// #define NO_CLASS_DRIVER_AUTOFLUSH
|
||||
|
||||
/* General USB Driver Related Tokens: */
|
||||
#define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
|
||||
// #define USB_STREAM_TIMEOUT_MS {Insert Value Here}
|
||||
// #define NO_LIMITED_CONTROLLER_CONNECT
|
||||
// #define NO_SOF_EVENTS
|
||||
|
||||
/* USB Device Mode Driver Related Tokens: */
|
||||
// #define USE_RAM_DESCRIPTORS
|
||||
#define USE_FLASH_DESCRIPTORS
|
||||
// #define USE_EEPROM_DESCRIPTORS
|
||||
// #define NO_INTERNAL_SERIAL
|
||||
#define FIXED_CONTROL_ENDPOINT_SIZE 8
|
||||
// #define DEVICE_STATE_AS_GPIOR {Insert Value Here}
|
||||
#define FIXED_NUM_CONFIGURATIONS 1
|
||||
// #define CONTROL_ONLY_DEVICE
|
||||
#define MAX_ENDPOINT_INDEX 3
|
||||
// #define NO_DEVICE_REMOTE_WAKEUP
|
||||
// #define NO_DEVICE_SELF_POWER
|
||||
|
||||
#else
|
||||
|
||||
#error Unsupported architecture for this LUFA configuration file.
|
||||
|
||||
#endif
|
||||
#endif
|
301
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/Descriptors.c
Normal file
301
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/Descriptors.c
Normal file
@ -0,0 +1,301 @@
|
||||
/*
|
||||
This software is based on the LUFA library. Modifications of the
|
||||
software are released under GPL but LUFA library itself is copyrigthed
|
||||
by its creator Dean Camera. Refer to the license below on the usage of
|
||||
LUFA library.
|
||||
|
||||
Chris Boudacoff @ Olimex Ltd
|
||||
chris <at> protonic <dot> co <dot> uk
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2015.
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.lufa-lib.org
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaims all warranties with regard to this
|
||||
software, including all implied warranties of merchantability
|
||||
and fitness. In no event shall the author be liable for any
|
||||
special, indirect or consequential damages or any damages
|
||||
whatsoever resulting from loss of use, data or profits, whether
|
||||
in an action of contract, negligence or other tortious action,
|
||||
arising out of or in connection with the use or performance of
|
||||
this software.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* USB Device Descriptors, for library use when in USB device mode. Descriptors are special
|
||||
* computer-readable structures which the host requests upon device enumeration, to determine
|
||||
* the device's capabilities and functions.
|
||||
*/
|
||||
|
||||
#include "Descriptors.h"
|
||||
|
||||
|
||||
/** HID class report descriptor. This is a special descriptor constructed with values from the
|
||||
* USBIF HID class specification to describe the reports and capabilities of the HID device. This
|
||||
* descriptor is parsed by the host and its contents used to determine what data (and in what encoding)
|
||||
* the device will send, and what it may be sent back from the host. Refer to the HID specification for
|
||||
* more details on HID report descriptors.
|
||||
*
|
||||
* This descriptor describes the mouse HID interface's report structure.
|
||||
*/
|
||||
const USB_Descriptor_HIDReport_Datatype_t PROGMEM MouseReport[] =
|
||||
{
|
||||
/* Use the HID class driver's standard Mouse report.
|
||||
* Min X/Y Axis values: -1
|
||||
* Max X/Y Axis values: 1
|
||||
* Min physical X/Y Axis values (used to determine resolution): -1
|
||||
* Max physical X/Y Axis values (used to determine resolution): 1
|
||||
* Buttons: 3
|
||||
* Absolute screen coordinates: false
|
||||
*/
|
||||
HID_DESCRIPTOR_MOUSE(-100, 100, -100,100, 3, false)
|
||||
};
|
||||
|
||||
/** Same as the MouseReport structure, but defines the keyboard HID interface's report structure. */
|
||||
const USB_Descriptor_HIDReport_Datatype_t PROGMEM KeyboardReport[] =
|
||||
{
|
||||
/* Use the HID class driver's standard Keyboard report.
|
||||
* Max simultaneous keys: 6
|
||||
*/
|
||||
HID_DESCRIPTOR_KEYBOARD(6)
|
||||
};
|
||||
|
||||
/** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall
|
||||
* device characteristics, including the supported USB version, control endpoint size and the
|
||||
* number of device configurations. The descriptor is read out by the USB host when the enumeration
|
||||
* process begins.
|
||||
*/
|
||||
const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
|
||||
{
|
||||
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
|
||||
|
||||
.USBSpecification = VERSION_BCD(1,1,0),
|
||||
.Class = USB_CSCP_NoDeviceClass,
|
||||
.SubClass = USB_CSCP_NoDeviceSubclass,
|
||||
.Protocol = USB_CSCP_NoDeviceProtocol,
|
||||
|
||||
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
|
||||
|
||||
.VendorID = 0x15ba, //Vendor: Olimex Ltd.
|
||||
.ProductID = 0x003c,
|
||||
.ReleaseNumber = VERSION_BCD(0, 0, 1),
|
||||
|
||||
.ManufacturerStrIndex = STRING_ID_Manufacturer,
|
||||
.ProductStrIndex = STRING_ID_Product,
|
||||
.SerialNumStrIndex = USE_INTERNAL_SERIAL,
|
||||
|
||||
.NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS
|
||||
};
|
||||
|
||||
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
|
||||
* of the device in one of its supported configurations, including information about any device interfaces
|
||||
* and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting
|
||||
* a configuration so that the host may correctly communicate with the USB device.
|
||||
*/
|
||||
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||
{
|
||||
.Config =
|
||||
{
|
||||
.Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
|
||||
|
||||
.TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
|
||||
.TotalInterfaces = 2,
|
||||
.ConfigurationNumber = 1,
|
||||
.ConfigurationStrIndex = NO_DESCRIPTOR,
|
||||
|
||||
.ConfigAttributes = (USB_CONFIG_ATTR_RESERVED | USB_CONFIG_ATTR_SELFPOWERED),
|
||||
|
||||
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
|
||||
},
|
||||
.HID1_KeyboardInterface =
|
||||
{
|
||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||
|
||||
.InterfaceNumber = INTERFACE_ID_Keyboard,
|
||||
.AlternateSetting = 0x00,
|
||||
|
||||
.TotalEndpoints = 1,
|
||||
|
||||
.Class = HID_CSCP_HIDClass,
|
||||
.SubClass = HID_CSCP_BootSubclass,
|
||||
.Protocol = HID_CSCP_KeyboardBootProtocol,
|
||||
|
||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||
},
|
||||
|
||||
.HID1_KeyboardHID =
|
||||
{
|
||||
.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID},
|
||||
|
||||
.HIDSpec = VERSION_BCD(1,1,1),
|
||||
.CountryCode = 0x00,
|
||||
.TotalReportDescriptors = 1,
|
||||
.HIDReportType = HID_DTYPE_Report,
|
||||
.HIDReportLength = sizeof(KeyboardReport)
|
||||
},
|
||||
|
||||
.HID1_ReportINEndpoint =
|
||||
{
|
||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||
|
||||
.EndpointAddress = KEYBOARD_IN_EPADDR,
|
||||
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
|
||||
.EndpointSize = HID_EPSIZE,
|
||||
.PollingIntervalMS = 0x05
|
||||
},
|
||||
|
||||
.HID2_MouseInterface =
|
||||
{
|
||||
.Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
|
||||
|
||||
.InterfaceNumber = INTERFACE_ID_Mouse,
|
||||
.AlternateSetting = 0x00,
|
||||
|
||||
.TotalEndpoints = 1,
|
||||
|
||||
.Class = HID_CSCP_HIDClass,
|
||||
.SubClass = HID_CSCP_BootSubclass,
|
||||
.Protocol = HID_CSCP_MouseBootProtocol,
|
||||
|
||||
.InterfaceStrIndex = NO_DESCRIPTOR
|
||||
},
|
||||
|
||||
.HID2_MouseHID =
|
||||
{
|
||||
.Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID},
|
||||
|
||||
.HIDSpec = VERSION_BCD(1,1,1),
|
||||
.CountryCode = 0x00,
|
||||
.TotalReportDescriptors = 1,
|
||||
.HIDReportType = HID_DTYPE_Report,
|
||||
.HIDReportLength = sizeof(MouseReport)
|
||||
},
|
||||
|
||||
.HID2_ReportINEndpoint =
|
||||
{
|
||||
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
|
||||
|
||||
.EndpointAddress = MOUSE_IN_EPADDR,
|
||||
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
|
||||
.EndpointSize = HID_EPSIZE,
|
||||
.PollingIntervalMS = 0x05
|
||||
}
|
||||
};
|
||||
|
||||
/** Language descriptor structure. This descriptor, located in FLASH memory, is returned when the host requests
|
||||
* the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate
|
||||
* via the language ID table available at USB.org what languages the device supports for its string descriptors.
|
||||
*/
|
||||
const USB_Descriptor_String_t PROGMEM LanguageString = USB_STRING_DESCRIPTOR_ARRAY(LANGUAGE_ID_ENG);
|
||||
|
||||
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
|
||||
* form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
|
||||
* Descriptor.
|
||||
*/
|
||||
const USB_Descriptor_String_t PROGMEM ManufacturerString =
|
||||
USB_STRING_DESCRIPTOR(L"Olimex Ltd.");
|
||||
|
||||
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
|
||||
* and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
|
||||
* Descriptor.
|
||||
*/
|
||||
const USB_Descriptor_String_t PROGMEM ProductString = USB_STRING_DESCRIPTOR(
|
||||
L"TERES Keyboard+Touchpad");
|
||||
|
||||
/** This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors"
|
||||
* documentation) by the application code so that the address and size of a requested descriptor can be given
|
||||
* to the USB library. When the device receives a Get Descriptor request on the control endpoint, this function
|
||||
* is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
|
||||
* USB host.
|
||||
*/
|
||||
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
|
||||
const uint8_t wIndex,
|
||||
const void** const DescriptorAddress)
|
||||
{
|
||||
const uint8_t DescriptorType = (wValue >> 8);
|
||||
const uint8_t DescriptorNumber = (wValue & 0xFF);
|
||||
|
||||
const void* Address = NULL;
|
||||
uint16_t Size = NO_DESCRIPTOR;
|
||||
|
||||
switch (DescriptorType)
|
||||
{
|
||||
case DTYPE_Device:
|
||||
Address = &DeviceDescriptor;
|
||||
Size = sizeof(USB_Descriptor_Device_t);
|
||||
break;
|
||||
case DTYPE_Configuration:
|
||||
Address = &ConfigurationDescriptor;
|
||||
Size = sizeof(USB_Descriptor_Configuration_t);
|
||||
break;
|
||||
case DTYPE_String:
|
||||
switch (DescriptorNumber)
|
||||
{
|
||||
case STRING_ID_Language:
|
||||
Address = &LanguageString;
|
||||
Size = pgm_read_byte(&LanguageString.Header.Size);
|
||||
break;
|
||||
case STRING_ID_Manufacturer:
|
||||
Address = &ManufacturerString;
|
||||
Size = pgm_read_byte(&ManufacturerString.Header.Size);
|
||||
break;
|
||||
case STRING_ID_Product:
|
||||
Address = &ProductString;
|
||||
Size = pgm_read_byte(&ProductString.Header.Size);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
case HID_DTYPE_HID:
|
||||
switch (wIndex)
|
||||
{
|
||||
case INTERFACE_ID_Keyboard:
|
||||
Address = &ConfigurationDescriptor.HID1_KeyboardHID;
|
||||
Size = sizeof(USB_HID_Descriptor_HID_t);
|
||||
break;
|
||||
case INTERFACE_ID_Mouse:
|
||||
Address = &ConfigurationDescriptor.HID2_MouseHID;
|
||||
Size = sizeof(USB_HID_Descriptor_HID_t);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
case HID_DTYPE_Report:
|
||||
switch (wIndex)
|
||||
{
|
||||
case INTERFACE_ID_Keyboard:
|
||||
Address = &KeyboardReport;
|
||||
Size = sizeof(KeyboardReport);
|
||||
break;
|
||||
case INTERFACE_ID_Mouse:
|
||||
Address = &MouseReport;
|
||||
Size = sizeof(MouseReport);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
*DescriptorAddress = Address;
|
||||
return Size;
|
||||
}
|
||||
|
126
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/Descriptors.h
Normal file
126
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/Descriptors.h
Normal file
@ -0,0 +1,126 @@
|
||||
/*
|
||||
This software is based on the LUFA library. Modifications of the
|
||||
software are released under GPL but LUFA library itself is copyrigthed
|
||||
by its creator Dean Camera. Refer to the license below on the usage of
|
||||
LUFA library.
|
||||
|
||||
Chris Boudacoff @ Olimex Ltd
|
||||
chris <at> protonic <dot> co <dot> uk
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2015.
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.lufa-lib.org
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaims all warranties with regard to this
|
||||
software, including all implied warranties of merchantability
|
||||
and fitness. In no event shall the author be liable for any
|
||||
special, indirect or consequential damages or any damages
|
||||
whatsoever resulting from loss of use, data or profits, whether
|
||||
in an action of contract, negligence or other tortious action,
|
||||
arising out of or in connection with the use or performance of
|
||||
this software.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* Header file for Descriptors.c.
|
||||
*/
|
||||
|
||||
#ifndef _DESCRIPTORS_H_
|
||||
#define _DESCRIPTORS_H_
|
||||
|
||||
|
||||
/* Includes: */
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#include <LUFA/Drivers/USB/USB.h>
|
||||
|
||||
/* Type Defines: */
|
||||
/** Type define for the device configuration descriptor structure. This must be defined in the
|
||||
* application code, as the configuration descriptor contains several sub-descriptors which
|
||||
* vary between devices, and which describe the device's usage to the host.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
USB_Descriptor_Configuration_Header_t Config;
|
||||
|
||||
// Keyboard HID Interface
|
||||
USB_Descriptor_Interface_t HID1_KeyboardInterface;
|
||||
USB_HID_Descriptor_HID_t HID1_KeyboardHID;
|
||||
USB_Descriptor_Endpoint_t HID1_ReportINEndpoint;
|
||||
|
||||
// Mouse HID Interface
|
||||
USB_Descriptor_Interface_t HID2_MouseInterface;
|
||||
USB_HID_Descriptor_HID_t HID2_MouseHID;
|
||||
USB_Descriptor_Endpoint_t HID2_ReportINEndpoint;
|
||||
} USB_Descriptor_Configuration_t;
|
||||
|
||||
/** Enum for the device interface descriptor IDs within the device. Each interface descriptor
|
||||
* should have a unique ID index associated with it, which can be used to refer to the
|
||||
* interface from other descriptors.
|
||||
*/
|
||||
enum InterfaceDescriptors_t
|
||||
{
|
||||
|
||||
INTERFACE_ID_Keyboard = 0, /**< Keyboard interface descriptor ID */
|
||||
INTERFACE_ID_Mouse = 1, /**< Mouse interface descriptor ID */
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
/** Enum for the device string descriptor IDs within the device. Each string descriptor should
|
||||
* have a unique ID index associated with it, which can be used to refer to the string from
|
||||
* other descriptors.
|
||||
*/
|
||||
enum StringDescriptors_t
|
||||
{
|
||||
STRING_ID_Language = 0, /**< Supported Languages string descriptor ID (must be zero) */
|
||||
STRING_ID_Manufacturer = 1, /**< Manufacturer string ID */
|
||||
STRING_ID_Product = 2, /**< Product string ID */
|
||||
};
|
||||
|
||||
/* Macros: */
|
||||
|
||||
|
||||
/** Endpoint address of the Keyboard HID reporting IN endpoint. */
|
||||
#define KEYBOARD_IN_EPADDR (ENDPOINT_DIR_IN | 5)
|
||||
|
||||
/** Endpoint address of the Mouse HID reporting IN endpoint. */
|
||||
#define MOUSE_IN_EPADDR (ENDPOINT_DIR_IN | 1)
|
||||
|
||||
/** Size in bytes of each of the HID reporting IN endpoints. */
|
||||
#define HID_EPSIZE 8
|
||||
|
||||
/* Function Prototypes: */
|
||||
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
|
||||
const uint8_t wIndex,
|
||||
const void** const DescriptorAddress)
|
||||
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
|
||||
typedef struct
|
||||
{
|
||||
uint8_t Button;
|
||||
int8_t X;
|
||||
int8_t Y;
|
||||
int8_t Wheel;
|
||||
} ATTR_PACKED USB_WheelMouseReport_Data_t;
|
||||
#endif
|
||||
|
963
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/KeyboardMouse.c
Normal file
963
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/KeyboardMouse.c
Normal file
@ -0,0 +1,963 @@
|
||||
/*
|
||||
This software is based on the LUFA library. Modifications of the
|
||||
software are released under GPL but LUFA library itself is copyrigthed
|
||||
by its creator Dean Camera. Refer to the license below on the usage of
|
||||
LUFA library.
|
||||
|
||||
Chris Boudacoff @ Olimex Ltd
|
||||
chris <at> protonic <dot> co <dot> uk
|
||||
*/
|
||||
|
||||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2015.
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.lufa-lib.org
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaims all warranties with regard to this
|
||||
software, including all implied warranties of merchantability
|
||||
and fitness. In no event shall the author be liable for any
|
||||
special, indirect or consequential damages or any damages
|
||||
whatsoever resulting from loss of use, data or profits, whether
|
||||
in an action of contract, negligence or other tortious action,
|
||||
arising out of or in connection with the use or performance of
|
||||
this software.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* Main source file for the KeyboardMouse demo. This file contains the main tasks of
|
||||
* the demo and is responsible for the initial application hardware configuration.
|
||||
*/
|
||||
|
||||
#include "KeyboardMouse.h"
|
||||
/** Magic lock for forced application start. If the HWBE fuse is programmed and BOOTRST is unprogrammed, the bootloader
|
||||
* will start if the /HWB line of the AVR is held low and the system is reset. However, if the /HWB line is still held
|
||||
* low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
|
||||
* \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
|
||||
*/
|
||||
uint16_t MagicBootKey ATTR_NO_INIT;
|
||||
|
||||
/** Buffer to hold the previously generated Keyboard HID report, for comparison purposes inside the HID class driver. */
|
||||
static uint8_t PrevKeyboardHIDReportBuffer[sizeof(USB_KeyboardReport_Data_t)];
|
||||
|
||||
/** Buffer to hold the previously generated Mouse HID report, for comparison purposes inside the HID class driver. */
|
||||
static uint8_t PrevMouseHIDReportBuffer[sizeof(USB_WheelMouseReport_Data_t)];
|
||||
|
||||
|
||||
int limited(int value)
|
||||
{
|
||||
if (value < 0)
|
||||
{
|
||||
if (abs(value) > speedlimit)
|
||||
return -speedlimit;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (value > speedlimit)
|
||||
return speedlimit;
|
||||
|
||||
|
||||
}
|
||||
|
||||
return value;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/** LUFA HID Class driver interface configuration and state information. This structure is
|
||||
* passed to all HID Class driver functions, so that multiple instances of the same class
|
||||
* within a device can be differentiated from one another. This is for the keyboard HID
|
||||
* interface within the device.
|
||||
*/
|
||||
USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
|
||||
{
|
||||
.Config =
|
||||
{
|
||||
.InterfaceNumber = INTERFACE_ID_Keyboard,
|
||||
.ReportINEndpoint =
|
||||
{
|
||||
.Address = KEYBOARD_IN_EPADDR,
|
||||
.Size = HID_EPSIZE,
|
||||
.Banks = 1,
|
||||
},
|
||||
.PrevReportINBuffer = PrevKeyboardHIDReportBuffer,
|
||||
.PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer),
|
||||
},
|
||||
};
|
||||
|
||||
/** LUFA HID Class driver interface configuration and state information. This structure is
|
||||
* passed to all HID Class driver functions, so that multiple instances of the same class
|
||||
* within a device can be differentiated from one another. This is for the mouse HID
|
||||
* interface within the device.
|
||||
*/
|
||||
USB_ClassInfo_HID_Device_t Mouse_HID_Interface =
|
||||
{
|
||||
.Config =
|
||||
{
|
||||
.InterfaceNumber = INTERFACE_ID_Mouse,
|
||||
.ReportINEndpoint =
|
||||
{
|
||||
.Address = MOUSE_IN_EPADDR,
|
||||
.Size = HID_EPSIZE,
|
||||
.Banks = 1,
|
||||
},
|
||||
.PrevReportINBuffer = PrevMouseHIDReportBuffer,
|
||||
.PrevReportINBufferSize = sizeof(PrevMouseHIDReportBuffer),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
void Jump_To_Bootloader(void)
|
||||
{
|
||||
// If USB is used, detach from the bus and reset it
|
||||
USB_Disable();
|
||||
|
||||
// Disable all interrupts
|
||||
cli();
|
||||
|
||||
// Wait one seconds for the USB detachment to register on the host
|
||||
Delay_MS(1000);
|
||||
|
||||
// Set the bootloader key to the magic value and force a reset
|
||||
wdt_enable(WDTO_250MS);
|
||||
for (;;);
|
||||
}
|
||||
|
||||
void tp_guarder(void)
|
||||
{
|
||||
tp_guard=true;
|
||||
tpguard=TP_LOCK;
|
||||
}
|
||||
/** Main program entry point. This routine contains the overall program flow, including initial
|
||||
* setup of all components and the main program loop.
|
||||
*/
|
||||
int main(void)
|
||||
{
|
||||
|
||||
|
||||
SetupHardware();
|
||||
GlobalInterruptEnable();
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
||||
|
||||
HID_Device_USBTask(&Keyboard_HID_Interface);
|
||||
DDRE=0x00;
|
||||
PORTE=0xff;
|
||||
PORTB=0xfd;
|
||||
DDRB=0xff;
|
||||
HID_Device_USBTask(&Mouse_HID_Interface);
|
||||
USB_USBTask();
|
||||
|
||||
if ((PINE & (1<<2)) == 0)
|
||||
{
|
||||
DDRB=0xff;
|
||||
PORTB=0xfe;
|
||||
Delay_MS(10);
|
||||
if ((PINC & (1<<7)) == 0)
|
||||
{
|
||||
|
||||
|
||||
PORTB=0xbf;
|
||||
Delay_MS(10);
|
||||
if ((PIND & (1<<4)) == 0)
|
||||
Jump_To_Bootloader();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
||||
void SetupHardware()
|
||||
{
|
||||
#if (ARCH == ARCH_AVR8)
|
||||
/* Disable watchdog if enabled by bootloader/fuses */
|
||||
MCUSR &= ~(1 << WDRF);
|
||||
wdt_disable();
|
||||
|
||||
/* Disable clock division */
|
||||
clock_prescale_set(clock_div_1);
|
||||
#elif (ARCH == ARCH_XMEGA)
|
||||
/* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
|
||||
XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
|
||||
XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
|
||||
|
||||
/* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
|
||||
XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
|
||||
XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
|
||||
|
||||
PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
|
||||
#endif
|
||||
|
||||
/* Hardware Initialization */
|
||||
|
||||
//Keyboard init
|
||||
DDRB = 0xff;
|
||||
PORTB = 0xff;
|
||||
|
||||
DDRD = 0;
|
||||
PORTD = 0xfc;
|
||||
|
||||
DDRC = 0;
|
||||
PORTC = 0xc0;
|
||||
|
||||
DDRE = 0;
|
||||
PORTE = 0x44;
|
||||
|
||||
DDRF = 0;
|
||||
PORTF = 0xf2;
|
||||
|
||||
|
||||
|
||||
TWI_Init(TWI_BIT_PRESCALE_4 , TWI_BITLENGTH_FROM_FREQ(TWI_BIT_PRESCALE_4 , 100000));
|
||||
ADC_Init(ADC_FREE_RUNNING | ADC_PRESCALE_128);
|
||||
ADCSRA |= 1 << ADIE;
|
||||
MCUCR = 0;
|
||||
EIMSK |= 1 << INT2;
|
||||
|
||||
ADC_SetupChannel(0);
|
||||
ADC_StartReading(ADC_REFERENCE_AVCC | ADC_LEFT_ADJUSTED | ADC_CHANNEL0);
|
||||
|
||||
// set timer0 counter initial value to 0
|
||||
TCNT0=0x00;
|
||||
// start timer0 with /1024 prescaler
|
||||
TCCR0B = (1<<CS02) | (1<<CS00);
|
||||
TIMSK0=1<<TOIE0;
|
||||
|
||||
USB_Init();
|
||||
button = 0xff;
|
||||
}
|
||||
|
||||
/** Event handler for the library USB Connection event. */
|
||||
void EVENT_USB_Device_Connect(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/** Event handler for the library USB Disconnection event. */
|
||||
void EVENT_USB_Device_Disconnect(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/** Event handler for the library USB Configuration Changed event. */
|
||||
void EVENT_USB_Device_ConfigurationChanged(void)
|
||||
{
|
||||
bool ConfigSuccess = true;
|
||||
|
||||
ConfigSuccess &= HID_Device_ConfigureEndpoints(&Keyboard_HID_Interface);
|
||||
ConfigSuccess &= HID_Device_ConfigureEndpoints(&Mouse_HID_Interface);
|
||||
USB_Device_EnableSOFEvents();
|
||||
|
||||
}
|
||||
|
||||
/** Event handler for the library USB Control Request reception event. */
|
||||
void EVENT_USB_Device_ControlRequest(void)
|
||||
{
|
||||
HID_Device_ProcessControlRequest(&Keyboard_HID_Interface);
|
||||
HID_Device_ProcessControlRequest(&Mouse_HID_Interface);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/** Event handler for the USB device Start Of Frame event. */
|
||||
void EVENT_USB_Device_StartOfFrame(void)
|
||||
{
|
||||
HID_Device_MillisecondElapsed(&Keyboard_HID_Interface);
|
||||
HID_Device_MillisecondElapsed(&Mouse_HID_Interface);
|
||||
}
|
||||
|
||||
/** HID class driver callback function for the creation of HID reports to the host.
|
||||
*
|
||||
* \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced
|
||||
* \param[in,out] ReportID Report ID requested by the host if non-zero, otherwise callback should set to the generated report ID
|
||||
* \param[in] ReportType Type of the report to create, either HID_REPORT_ITEM_In or HID_REPORT_ITEM_Feature
|
||||
* \param[out] ReportData Pointer to a buffer where the created report should be stored
|
||||
* \param[out] ReportSize Number of bytes written in the report (or zero if no report is to be sent)
|
||||
*
|
||||
* \return Boolean \c true to force the sending of the report, \c false to let the library determine if it needs to be sent
|
||||
*/
|
||||
bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
|
||||
uint8_t* const ReportID,
|
||||
const uint8_t ReportType,
|
||||
void* ReportData,
|
||||
uint16_t* const ReportSize)
|
||||
{
|
||||
|
||||
|
||||
/* Determine which interface must have its report generated */
|
||||
if (HIDInterfaceInfo == &Keyboard_HID_Interface)
|
||||
{
|
||||
USB_KeyboardReport_Data_t* KeyboardReport = (USB_KeyboardReport_Data_t*)ReportData;
|
||||
|
||||
uint8_t x=0;
|
||||
uint8_t fn = 0;
|
||||
|
||||
keyc = 0; //reset keys
|
||||
KeyboardReport->Modifier = 0;
|
||||
|
||||
for (x=0;x<6;x++)
|
||||
KeyboardReport->KeyCode[x]=0;
|
||||
|
||||
|
||||
if (itsDone)
|
||||
{
|
||||
//
|
||||
|
||||
itsDone = false;
|
||||
#if 0
|
||||
|
||||
switch (tpdata[2])
|
||||
{
|
||||
case 0:
|
||||
KeyboardReport->KeyCode[0]=HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS;
|
||||
break;
|
||||
case 1:
|
||||
KeyboardReport->KeyCode[0]=HID_KEYBOARD_SC_1_AND_EXCLAMATION;
|
||||
break;
|
||||
case 2:
|
||||
KeyboardReport->KeyCode[0]=HID_KEYBOARD_SC_2_AND_AT;
|
||||
break;
|
||||
default:
|
||||
KeyboardReport->KeyCode[0]=HID_KEYBOARD_SC_DOT_AND_GREATER_THAN_SIGN;
|
||||
break;
|
||||
}
|
||||
|
||||
keyc = 1;
|
||||
|
||||
#endif
|
||||
}
|
||||
DDRE=0;
|
||||
DDRF=0;
|
||||
DDRC=0;
|
||||
DDRD = 0;
|
||||
PORTD = 0xfc;
|
||||
PORTE=0xFF;
|
||||
PORTF=0xFF;
|
||||
PORTC=0xFF;
|
||||
|
||||
|
||||
DDRB = 0xff;
|
||||
|
||||
for (colmn = 0; colmn<8; colmn++)
|
||||
{
|
||||
|
||||
uint8_t keynow=0;
|
||||
|
||||
if (colmn == 0)
|
||||
{
|
||||
cli();
|
||||
DDRB=0x00;
|
||||
PORTB=0x00;
|
||||
DDRD = (1<<4);
|
||||
PORTD = (1<<4);
|
||||
|
||||
Delay_MS(2);
|
||||
|
||||
if (PINB & 0x40)
|
||||
{
|
||||
fn = 112;
|
||||
//tp_guarder();
|
||||
if (PINB & 0x01)
|
||||
{
|
||||
KeyboardReport->KeyCode[keyc]=HID_KEYBOARD_SC_PAGE_UP;
|
||||
if (keyc<5) keyc++;
|
||||
}
|
||||
if (PINB & 0x02)
|
||||
{
|
||||
KeyboardReport->Modifier |= HID_KEYBOARD_MODIFIER_LEFTSHIFT;
|
||||
KeyboardReport->KeyCode[keyc]=HID_KEYBOARD_SC_LEFT_SHIFT;
|
||||
if (keyc<5) keyc++;
|
||||
|
||||
}
|
||||
if (PINB & 0x20)
|
||||
{
|
||||
KeyboardReport->KeyCode[keyc]=HID_KEYBOARD_SC_HOME;
|
||||
if (keyc<5) keyc++;
|
||||
}
|
||||
|
||||
if (PINB & 0x80)
|
||||
{
|
||||
KeyboardReport->Modifier |= HID_KEYBOARD_MODIFIER_RIGHTSHIFT;
|
||||
KeyboardReport->KeyCode[keyc]=HID_KEYBOARD_SC_RIGHT_SHIFT;
|
||||
if (keyc<5) keyc++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (PINB & 0x01)
|
||||
{
|
||||
KeyboardReport->KeyCode[keyc]=HID_KEYBOARD_SC_UP_ARROW;
|
||||
if (keyc<5) keyc++;
|
||||
//tp_guarder();
|
||||
}
|
||||
if (PINB & 0x02)
|
||||
{
|
||||
KeyboardReport->Modifier |= HID_KEYBOARD_MODIFIER_LEFTSHIFT;
|
||||
KeyboardReport->KeyCode[keyc]=HID_KEYBOARD_SC_LEFT_SHIFT;
|
||||
if (keyc<5) keyc++;
|
||||
}
|
||||
if (PINB & 0x20)
|
||||
{
|
||||
KeyboardReport->KeyCode[keyc]=HID_KEYBOARD_SC_LEFT_ARROW;
|
||||
if (keyc<5) keyc++;
|
||||
//tp_guarder();
|
||||
}
|
||||
|
||||
if (PINB & 0x80)
|
||||
{
|
||||
KeyboardReport->Modifier |= HID_KEYBOARD_MODIFIER_RIGHTSHIFT;
|
||||
KeyboardReport->KeyCode[keyc]=HID_KEYBOARD_SC_RIGHT_SHIFT;
|
||||
if (keyc<5) keyc++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//////x0
|
||||
DDRD = (1<<6);
|
||||
PORTD = (1<<6);
|
||||
DDRB=0x00;
|
||||
PORTB=0x00;
|
||||
Delay_MS(2);
|
||||
|
||||
if (PINB & 0x10)
|
||||
{
|
||||
KeyboardReport->Modifier |= HID_KEYBOARD_MODIFIER_RIGHTCTRL;
|
||||
KeyboardReport->KeyCode[keyc]=HID_KEYBOARD_SC_RIGHT_CONTROL;
|
||||
if (keyc<5) keyc++;
|
||||
|
||||
}
|
||||
if (PINB & 0x40)
|
||||
{
|
||||
KeyboardReport->Modifier |= HID_KEYBOARD_MODIFIER_LEFTCTRL;
|
||||
KeyboardReport->KeyCode[keyc]=HID_KEYBOARD_SC_LEFT_CONTROL;
|
||||
if (keyc<5) keyc++;
|
||||
|
||||
}
|
||||
if (PINB & 0x08)
|
||||
{
|
||||
if (fn==112)
|
||||
KeyboardReport->KeyCode[keyc]=HID_KEYBOARD_SC_VOLUME_UP;
|
||||
else
|
||||
KeyboardReport->KeyCode[keyc]=HID_KEYBOARD_SC_F5;
|
||||
if (keyc<5) keyc++;
|
||||
|
||||
}
|
||||
|
||||
|
||||
PORTB = rowY[colmn];
|
||||
DDRB = 0xff;
|
||||
DDRD = 0;
|
||||
PORTD = 0xfc;
|
||||
Delay_MS(3);
|
||||
sei();
|
||||
}
|
||||
|
||||
PORTB = rowY[colmn];
|
||||
while (PINB != rowY[colmn]);
|
||||
|
||||
x=1;
|
||||
|
||||
if ((PINC & (1<<7)) == 0)
|
||||
{
|
||||
//tp_guarder();
|
||||
keynow= keys[colmn*14+x+fn];
|
||||
KeyboardReport->Modifier |= keym[colmn*14+x];
|
||||
if (keynow!=0)
|
||||
{
|
||||
KeyboardReport->KeyCode[keyc]=keys[colmn*14+x+fn];
|
||||
if (keyc<5) keyc++;
|
||||
}
|
||||
}
|
||||
x++;//2
|
||||
if ((PINC & (1<<6)) == 0)
|
||||
{
|
||||
// tp_guarder();
|
||||
keynow= keys[colmn*14+x+fn];
|
||||
KeyboardReport->Modifier |= keym[colmn*14+x];
|
||||
if (keynow!=0)
|
||||
{
|
||||
KeyboardReport->KeyCode[keyc]=keynow;
|
||||
if (keyc<5) keyc++;
|
||||
}
|
||||
}
|
||||
x++;//3
|
||||
//Delay_MS(5);
|
||||
if ((PIND & (1<<7))== 0)
|
||||
{
|
||||
// tp_guarder();
|
||||
keynow= keys[colmn*14+x+fn];
|
||||
KeyboardReport->Modifier |= keym[colmn*14+x];
|
||||
|
||||
|
||||
if (keynow == HID_KEY_LOCK_TOUCHPAD)
|
||||
{
|
||||
TouchPadLocked=!TouchPadLocked;
|
||||
while ((PIND & (1<<7))== 0);
|
||||
}
|
||||
if (keynow!=0)
|
||||
{
|
||||
KeyboardReport->KeyCode[keyc]=keynow;
|
||||
if (keyc<5) keyc++;
|
||||
}
|
||||
}
|
||||
x++;//4
|
||||
//Delay_MS(5);
|
||||
if ((PIND & (1<<3)) == 0)
|
||||
{
|
||||
// tp_guarder();
|
||||
keynow= keys[colmn*14+x+fn];
|
||||
KeyboardReport->Modifier |= keym[colmn*14+x];
|
||||
if (keynow!=0)
|
||||
{
|
||||
KeyboardReport->KeyCode[keyc]=keynow;
|
||||
if (keyc<5) keyc++;
|
||||
}
|
||||
}
|
||||
x++;//5
|
||||
if ((PINF & (1<<1)) == 0)
|
||||
{
|
||||
// tp_guarder();
|
||||
keynow= keys[colmn*14+x+fn];
|
||||
KeyboardReport->Modifier |= keym[colmn*14+x];
|
||||
if (keynow!=0)
|
||||
{
|
||||
KeyboardReport->KeyCode[keyc]=keynow;
|
||||
if (keyc<5) keyc++;
|
||||
}
|
||||
}
|
||||
x++;//6
|
||||
if ((PINF & (1<<6)) == 0)
|
||||
{
|
||||
// tp_guarder();
|
||||
keynow= keys[colmn*14+x+fn];
|
||||
KeyboardReport->Modifier |= keym[colmn*14+x];
|
||||
if (keynow!=0)
|
||||
{
|
||||
KeyboardReport->KeyCode[keyc]=keynow;
|
||||
if (keyc<5) keyc++;
|
||||
}
|
||||
}
|
||||
x++;//7
|
||||
if ((PINE & (1<<6)) == 0)
|
||||
{
|
||||
// tp_guarder();
|
||||
keynow= keys[colmn*14+x+fn];
|
||||
KeyboardReport->Modifier |= keym[colmn*14+x];
|
||||
if (keynow!=0)
|
||||
{
|
||||
KeyboardReport->KeyCode[keyc]=keynow;
|
||||
if (keyc<5) keyc++;
|
||||
}
|
||||
}
|
||||
x++;//8
|
||||
if ((PINF & (1<<4)) == 0)
|
||||
{
|
||||
// tp_guarder();
|
||||
keynow= keys[colmn*14+x+fn];
|
||||
KeyboardReport->Modifier |= keym[colmn*14+x];
|
||||
if (keynow!=0)
|
||||
{
|
||||
KeyboardReport->KeyCode[keyc]=keynow;
|
||||
if (keyc<5) keyc++;
|
||||
}
|
||||
}
|
||||
x++;//9
|
||||
if ((PIND & (1<<5)) == 0)
|
||||
{
|
||||
// tp_guarder();
|
||||
keynow= keys[colmn*14+x+fn];
|
||||
KeyboardReport->Modifier |= keym[colmn*14+x];
|
||||
if (keynow!=0)
|
||||
{
|
||||
KeyboardReport->KeyCode[keyc]=keynow;
|
||||
if (keyc<5) keyc++;
|
||||
}
|
||||
}
|
||||
x++;//10
|
||||
if ((PINF & (1<<5)) == 0)
|
||||
{
|
||||
// tp_guarder();
|
||||
keynow= keys[colmn*14+x+fn];
|
||||
KeyboardReport->Modifier |= keym[colmn*14+x];
|
||||
if (keynow!=0)
|
||||
{
|
||||
KeyboardReport->KeyCode[keyc]=keynow;
|
||||
if (keyc<5) keyc++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
x++;//11
|
||||
if ((PINF & (1<<7)) == 0)
|
||||
{
|
||||
// tp_guarder();
|
||||
keynow= keys[colmn*14+x+fn];
|
||||
KeyboardReport->Modifier |= keym[colmn*14+x];
|
||||
if (keynow!=0)
|
||||
{
|
||||
KeyboardReport->KeyCode[keyc]=keynow;
|
||||
if (keyc<5) keyc++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
x++;//12
|
||||
if ((PINE & (1<<2)) == 0)
|
||||
{
|
||||
// tp_guarder();
|
||||
keynow= keys[colmn*14+x+fn];
|
||||
KeyboardReport->Modifier |= keym[colmn*14+x];
|
||||
if (keynow!=0)
|
||||
{
|
||||
KeyboardReport->KeyCode[keyc]=keynow;
|
||||
if (keyc<5) keyc++;
|
||||
|
||||
}
|
||||
}
|
||||
DDRD = 0;
|
||||
PORTD = 0xfc;
|
||||
|
||||
|
||||
}
|
||||
|
||||
if ((KeyboardReport->Modifier == 0) && (keyc!=0)) tp_guarder();
|
||||
|
||||
|
||||
*ReportSize = sizeof(USB_KeyboardReport_Data_t);
|
||||
return true;//return false;
|
||||
}
|
||||
if (HIDInterfaceInfo == &Mouse_HID_Interface)
|
||||
{
|
||||
USB_WheelMouseReport_Data_t* MouseReport = (USB_WheelMouseReport_Data_t*)ReportData;
|
||||
|
||||
|
||||
MR_Y = 0;
|
||||
MR_X = 0;
|
||||
MR_W = 0;
|
||||
MR_B |= mouse;// (1 << 0);
|
||||
|
||||
//cli();
|
||||
if (ActionSend)
|
||||
{
|
||||
uint16_t posx1 = tpdata[3]<<8 | tpdata[4];
|
||||
uint16_t posy1 = tpdata[5]<<8 | tpdata[6];
|
||||
switch (tpdata[2])
|
||||
{
|
||||
case 0:
|
||||
if (lastfingers != 0)
|
||||
{
|
||||
if (time_zero>PRETAP)
|
||||
{
|
||||
|
||||
if (time_pressed<CLICK_MS)
|
||||
{
|
||||
|
||||
if (abs(startposX+startposY-posx1-posy1)<10)
|
||||
{
|
||||
if (time_two != 0)
|
||||
MR_B_REQ = MOUSE_RIGTH;
|
||||
else
|
||||
MR_B_REQ = MOUSE_LEFT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
time_zero = 0;
|
||||
}
|
||||
speedlimit=0;
|
||||
lastposX = 0;
|
||||
lastposY = 0;
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
||||
|
||||
|
||||
touch_to=TOUCH_TO;
|
||||
|
||||
switch (lastfingers)
|
||||
{
|
||||
case 0:
|
||||
|
||||
presstime=CLICK_MS;
|
||||
speedlimit=0;
|
||||
break;
|
||||
case 1:
|
||||
|
||||
if (lastposX != 0)
|
||||
{
|
||||
MR_X = limited(posx1 - lastposX);
|
||||
MR_Y = limited(posy1 - lastposY);
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
||||
|
||||
speedlimit=0;
|
||||
break;
|
||||
default:
|
||||
|
||||
break;
|
||||
}
|
||||
if (lastfingers != 1)
|
||||
{
|
||||
time_one = 0;
|
||||
startposX=posx1;
|
||||
startposY=posy1;
|
||||
lastfingers = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
lastposX = posx1;
|
||||
lastposY = posy1;
|
||||
if (speedlimit != 0x80)
|
||||
speedlimit+=0x04;
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case 2:
|
||||
|
||||
|
||||
|
||||
|
||||
if (lastfingers == 0)
|
||||
touch_to=TOUCH_TO;
|
||||
|
||||
if (lastfingers == 2)
|
||||
{
|
||||
if (lastposY > posy1 + DRAG_HYST)
|
||||
MR_W = WHEEL;
|
||||
else if (lastposY + DRAG_HYST < posy1)
|
||||
MR_W = -WHEEL;
|
||||
|
||||
if (MR_W !=0) time_zero = 0;
|
||||
presstime=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
time_two = 0;
|
||||
startposX=posx1;
|
||||
startposY=posy1;
|
||||
lastfingers = 2;
|
||||
|
||||
}
|
||||
lastposX = posx1;
|
||||
lastposY = posy1;
|
||||
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
lastposX = 0;
|
||||
lastposY = 0;
|
||||
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
lastfingers = tpdata[2];
|
||||
ActionSend = false;
|
||||
itsDone = true;
|
||||
}
|
||||
MouseReport->Y = MR_Y;
|
||||
MouseReport->X = MR_X;
|
||||
MouseReport->Button = MR_B;
|
||||
MouseReport->Wheel = MR_W;
|
||||
|
||||
MR_B=0;
|
||||
|
||||
*ReportSize = sizeof(USB_WheelMouseReport_Data_t);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/** HID class driver callback function for the processing of HID reports from the host.
|
||||
*
|
||||
* \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced
|
||||
* \param[in] ReportID Report ID of the received report from the host
|
||||
* \param[in] ReportType The type of report that the host has sent, either HID_REPORT_ITEM_Out or HID_REPORT_ITEM_Feature
|
||||
* \param[in] ReportData Pointer to a buffer where the received report has been stored
|
||||
* \param[in] ReportSize Size in bytes of the received HID report
|
||||
*/
|
||||
void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
|
||||
const uint8_t ReportID,
|
||||
const uint8_t ReportType,
|
||||
const void* ReportData,
|
||||
const uint16_t ReportSize)
|
||||
{
|
||||
if (HIDInterfaceInfo == &Keyboard_HID_Interface)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
ISR(ADC_vect)
|
||||
{
|
||||
|
||||
ADCSRA |= (1 << ADIF);
|
||||
button= ADCH;
|
||||
|
||||
|
||||
if (button == oldbutton)
|
||||
{
|
||||
if (button < 0xe8)
|
||||
{
|
||||
|
||||
if (button>0x94) mouse = MOUSE_RIGTH;
|
||||
|
||||
else if (button>0x78) mouse = MOUSE_LEFT;
|
||||
|
||||
else mouse = MOUSE_MIDDLE;
|
||||
|
||||
}
|
||||
else mouse = 0;
|
||||
}
|
||||
else oldbutton = button;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ISR(INT2_vect)
|
||||
{
|
||||
#if 1
|
||||
if (TWI_StartTransmission(0x48 | TWI_ADDRESS_WRITE, 10) == TWI_ERROR_NoError)
|
||||
{
|
||||
TWI_SendByte(0x00);
|
||||
TWI_StopTransmission();
|
||||
|
||||
if (TWI_StartTransmission(0x48 | TWI_ADDRESS_READ, 10) == TWI_ERROR_NoError)
|
||||
{
|
||||
|
||||
|
||||
// Read some bytes, acknowledge after the last byte is received????
|
||||
for (int s=0;s<0x06;s++)
|
||||
TWI_ReceiveByte(&tpdata[s], false);
|
||||
|
||||
|
||||
TWI_ReceiveByte(&tpdata[0x06], true);
|
||||
|
||||
}
|
||||
}
|
||||
// Must stop transmission afterwards to release the bus
|
||||
TWI_StopTransmission();
|
||||
|
||||
if ((!TouchPadLocked) && (!tp_guard))
|
||||
ActionSend = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
// timer0 overflow ~60hz
|
||||
ISR(TIMER0_OVF_vect) {
|
||||
|
||||
#if 1
|
||||
|
||||
|
||||
if (TWI_StartTransmission(0x48 | TWI_ADDRESS_WRITE, 10) == TWI_ERROR_NoError)
|
||||
{
|
||||
TWI_SendByte(0x00);
|
||||
TWI_StopTransmission();
|
||||
|
||||
if (TWI_StartTransmission(0x48 | TWI_ADDRESS_READ, 10) == TWI_ERROR_NoError)
|
||||
{
|
||||
|
||||
|
||||
// Read some bytes, acknowledge after the last byte is received????
|
||||
for (int s=0;s<0x06;s++)
|
||||
TWI_ReceiveByte(&tpdata[s], false);
|
||||
|
||||
|
||||
TWI_ReceiveByte(&tpdata[0x06], true);
|
||||
|
||||
}
|
||||
}
|
||||
// Must stop transmission afterwards to release the bus
|
||||
TWI_StopTransmission();
|
||||
if ((!TouchPadLocked) && (!tp_guard) && (tpdata[0]!=0))
|
||||
ActionSend = true;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
if ((time_zero != 0xff) && (tpdata[2]==0)) time_zero++;
|
||||
|
||||
if (time_zero==TOUCH_TO)
|
||||
{
|
||||
#if TAP_ENABLED
|
||||
MR_B=MR_B_REQ;
|
||||
MR_B_REQ=0;
|
||||
#endif
|
||||
time_one=0;
|
||||
time_two=0;
|
||||
time_pressed=0;
|
||||
}
|
||||
if ((time_one != 0xff) && (tpdata[2]==1)) time_one++;
|
||||
if ((time_two != 0xff) && (tpdata[2]==2)) time_two++;
|
||||
|
||||
|
||||
if (ticks!=0) ticks--;
|
||||
if (dragtime!=0) dragtime--;
|
||||
if (presstime != 0) presstime--;
|
||||
if (tpguard !=0) tpguard--;
|
||||
if (tpguard==1) tp_guard = false;
|
||||
|
||||
|
||||
|
||||
if (touch_to!=0) touch_to--;
|
||||
if (touch_to==1)
|
||||
{
|
||||
tap_enabled=true;
|
||||
lastposX=0;
|
||||
lastposY=0;
|
||||
drag=false;
|
||||
if (presstime!=0)
|
||||
ActionSend = true;
|
||||
else
|
||||
lastfingers=0;
|
||||
|
||||
}
|
||||
}
|
200
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/KeyboardMouse.h
Normal file
200
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/KeyboardMouse.h
Normal file
@ -0,0 +1,200 @@
|
||||
/*
|
||||
This software is based on the LUFA library. Modifications of the
|
||||
software are released under GPL but LUFA library itself is copyrigthed
|
||||
by its creator Dean Camera. Refer to the license below on the usage of
|
||||
LUFA library.
|
||||
|
||||
Chris Boudacoff @ Olimex Ltd
|
||||
chris <at> protonic <dot> co <dot> uk
|
||||
*/
|
||||
|
||||
/*
|
||||
LUFA Library
|
||||
Copyright (C) Dean Camera, 2015.
|
||||
|
||||
dean [at] fourwalledcubicle [dot] com
|
||||
www.lufa-lib.org
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com)
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that the copyright notice and this
|
||||
permission notice and warranty disclaimer appear in supporting
|
||||
documentation, and that the name of the author not be used in
|
||||
advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
|
||||
The author disclaims all warranties with regard to this
|
||||
software, including all implied warranties of merchantability
|
||||
and fitness. In no event shall the author be liable for any
|
||||
special, indirect or consequential damages or any damages
|
||||
whatsoever resulting from loss of use, data or profits, whether
|
||||
in an action of contract, negligence or other tortious action,
|
||||
arising out of or in connection with the use or performance of
|
||||
this software.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _KEYBOARD_MOUSE_H_
|
||||
#define _KEYBOARD_MOUSE_H_
|
||||
|
||||
|
||||
/* Includes: */
|
||||
#include <avr/io.h>
|
||||
#include <avr/wdt.h>
|
||||
#include <avr/power.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <util/delay.h>
|
||||
#include "Descriptors.h"
|
||||
|
||||
#include <LUFA/Common/Common.h>
|
||||
#include <LUFA/Drivers/USB/USB.h>
|
||||
#include <LUFA/Platform/Platform.h>
|
||||
#include <LUFA/Drivers/Peripheral/TWI.h>
|
||||
#include <LUFA/Drivers/Peripheral/ADC.h>
|
||||
|
||||
/** Magic bootloader key to unlock forced application start mode. */
|
||||
#define MAGIC_BOOT_KEY 0xDC42
|
||||
|
||||
#define HID_KEY_WLAN 246
|
||||
#define HID_KEY_RFKILL 247
|
||||
#define HID_KEY_LOCK_TOUCHPAD 199
|
||||
#define HID_KEY_BRIGTHNESS_DOWN 0x6f //Keyboard F20
|
||||
#define HID_KEY_BRIGTHNESS_UP 0x70 //Keyboard F21
|
||||
#define HID_KEY_DISPLAY_SWITCH 0x6e //Keyboard F19
|
||||
#define HID_KEYBOARD_SC_LEFTMETA 0x7d
|
||||
#define HID_KEYBOARD_SC_COMPOSE 0x65
|
||||
|
||||
#define HID_KEYBOARD_MODIFIER_LEFTSHIFT 0x02
|
||||
#define HID_KEYBOARD_MODIFIER_RIGHTSHIFT 0x20
|
||||
|
||||
|
||||
/** Bootloader special address to start the user application */
|
||||
#define COMMAND_STARTAPPLICATION 0xFFFF
|
||||
|
||||
/* Function Prototypes: */
|
||||
void SetupHardware(void);
|
||||
uint8_t M_Buttons(void);
|
||||
void EVENT_USB_Device_Connect(void);
|
||||
void EVENT_USB_Device_Disconnect(void);
|
||||
void EVENT_USB_Device_ConfigurationChanged(void);
|
||||
void EVENT_USB_Device_ControlRequest(void);
|
||||
void EVENT_USB_Device_StartOfFrame(void);
|
||||
void Read_TP(void);
|
||||
bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
|
||||
uint8_t* const ReportID,
|
||||
const uint8_t ReportType,
|
||||
void* ReportData,
|
||||
uint16_t* const ReportSize);
|
||||
void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
|
||||
const uint8_t ReportID,
|
||||
const uint8_t ReportType,
|
||||
const void* ReportData,
|
||||
const uint16_t ReportSize);
|
||||
|
||||
const int keys[224] = {HID_KEYBOARD_SC_LEFT_CONTROL,HID_KEYBOARD_SC_GRAVE_ACCENT_AND_TILDE,HID_KEYBOARD_SC_F1,HID_KEYBOARD_SC_F2,HID_KEYBOARD_SC_5_AND_PERCENTAGE,HID_KEYBOARD_SC_6_AND_CARET,HID_KEYBOARD_SC_EQUAL_AND_PLUS,HID_KEYBOARD_SC_F8,HID_KEYBOARD_SC_MINUS_AND_UNDERSCORE,0,HID_KEYBOARD_SC_F9,HID_KEYBOARD_SC_DELETE,0,0,
|
||||
0,HID_KEYBOARD_SC_TAB,HID_KEYBOARD_SC_CAPS_LOCK,HID_KEYBOARD_SC_F3,HID_KEYBOARD_SC_T,HID_KEYBOARD_SC_Y,HID_KEYBOARD_SC_CLOSING_BRACKET_AND_CLOSING_BRACE,HID_KEYBOARD_SC_F7,HID_KEYBOARD_SC_OPENING_BRACKET_AND_OPENING_BRACE,0,HID_KEYBOARD_SC_BACKSPACE,0,0,HID_KEYBOARD_SC_LEFT_SHIFT,
|
||||
0,HID_KEYBOARD_SC_A,HID_KEYBOARD_SC_S,HID_KEYBOARD_SC_D,HID_KEYBOARD_SC_F,HID_KEYBOARD_SC_J,HID_KEYBOARD_SC_K,HID_KEYBOARD_SC_L,HID_KEYBOARD_SC_SEMICOLON_AND_COLON,0,HID_KEYBOARD_SC_BACKSLASH_AND_PIPE,0,0,HID_KEYBOARD_SC_RIGHT_SHIFT,
|
||||
0,HID_KEYBOARD_SC_ESCAPE,0,HID_KEYBOARD_SC_F4,HID_KEYBOARD_SC_G,HID_KEYBOARD_SC_H,HID_KEYBOARD_SC_F6,0,HID_KEYBOARD_SC_APOSTROPHE_AND_QUOTE,HID_KEYBOARD_SC_LEFT_ALT,HID_KEYBOARD_SC_F11,HID_KEYBOARD_SC_SPACE,0,HID_KEYBOARD_SC_UP_ARROW,
|
||||
HID_KEYBOARD_SC_RIGHT_CONTROL,HID_KEYBOARD_SC_Z,HID_KEYBOARD_SC_X,HID_KEYBOARD_SC_C,HID_KEYBOARD_SC_V,HID_KEYBOARD_SC_M,HID_KEYBOARD_SC_COMMA_AND_LESS_THAN_SIGN,HID_KEYBOARD_SC_DOT_AND_GREATER_THAN_SIGN,0,0,HID_KEYBOARD_SC_ENTER,0,0,0,
|
||||
0,0,0,0,HID_KEYBOARD_SC_B,HID_KEYBOARD_SC_N,0,HID_KEYBOARD_SC_COMPOSE,HID_KEYBOARD_SC_SLASH_AND_QUESTION_MARK,HID_KEYBOARD_SC_RIGHT_ALT,HID_KEYBOARD_SC_F12,HID_KEYBOARD_SC_DOWN_ARROW,HID_KEYBOARD_SC_RIGHT_ARROW,HID_KEYBOARD_SC_LEFT_ARROW,
|
||||
0,HID_KEYBOARD_SC_Q,HID_KEYBOARD_SC_W,HID_KEYBOARD_SC_E,HID_KEYBOARD_SC_R,HID_KEYBOARD_SC_U,HID_KEYBOARD_SC_I,HID_KEYBOARD_SC_O,HID_KEYBOARD_SC_P,0,0,0,0,0,
|
||||
HID_KEYBOARD_SC_F5,HID_KEYBOARD_SC_1_AND_EXCLAMATION,HID_KEYBOARD_SC_2_AND_AT,HID_KEYBOARD_SC_3_AND_HASHMARK,HID_KEYBOARD_SC_4_AND_DOLLAR,HID_KEYBOARD_SC_7_AND_AMPERSAND,HID_KEYBOARD_SC_8_AND_ASTERISK,HID_KEYBOARD_SC_9_AND_OPENING_PARENTHESIS,HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS,HID_KEYBOARD_SC_PRINT_SCREEN,HID_KEYBOARD_SC_F10,0,0,0,
|
||||
|
||||
HID_KEYBOARD_SC_LEFT_CONTROL,HID_KEYBOARD_SC_GRAVE_ACCENT_AND_TILDE,HID_KEYBOARD_SC_POWER,HID_KEY_WLAN,HID_KEYBOARD_SC_5_AND_PERCENTAGE,HID_KEYBOARD_SC_6_AND_CARET,HID_KEYBOARD_SC_EQUAL_AND_PLUS,HID_KEY_BRIGTHNESS_UP,HID_KEYBOARD_SC_MINUS_AND_UNDERSCORE,0,HID_KEY_DISPLAY_SWITCH,HID_KEYBOARD_SC_DELETE,0,0,
|
||||
0,HID_KEYBOARD_SC_TAB,HID_KEYBOARD_SC_CAPS_LOCK,HID_KEY_LOCK_TOUCHPAD,HID_KEYBOARD_SC_T,HID_KEYBOARD_SC_Y,HID_KEYBOARD_SC_CLOSING_BRACKET_AND_CLOSING_BRACE,HID_KEY_BRIGTHNESS_DOWN,HID_KEYBOARD_SC_OPENING_BRACKET_AND_OPENING_BRACE,0,HID_KEYBOARD_SC_BACKSPACE,0,0,HID_KEYBOARD_SC_LEFT_SHIFT,
|
||||
0,HID_KEYBOARD_SC_A,HID_KEYBOARD_SC_S,HID_KEYBOARD_SC_D,HID_KEYBOARD_SC_F,HID_KEYBOARD_SC_KEYPAD_1_AND_END,HID_KEYBOARD_SC_KEYPAD_2_AND_DOWN_ARROW,HID_KEYBOARD_SC_KEYPAD_3_AND_PAGE_DOWN,HID_KEYBOARD_SC_KEYPAD_MINUS,0,HID_KEYBOARD_SC_BACKSLASH_AND_PIPE,0,0,HID_KEYBOARD_SC_RIGHT_SHIFT,
|
||||
0,HID_KEYBOARD_SC_ESCAPE,0, HID_KEYBOARD_SC_VOLUME_DOWN,HID_KEYBOARD_SC_G,HID_KEYBOARD_SC_H,HID_KEYBOARD_SC_MUTE,0,HID_KEYBOARD_SC_APOSTROPHE_AND_QUOTE,HID_KEYBOARD_SC_LEFT_ALT,HID_KEYBOARD_SC_INSERT,HID_KEYBOARD_SC_SPACE,0,HID_KEYBOARD_SC_PAGE_UP,
|
||||
HID_KEYBOARD_SC_RIGHT_CONTROL,HID_KEYBOARD_SC_Z,HID_KEYBOARD_SC_X,HID_KEYBOARD_SC_C,HID_KEYBOARD_SC_V,HID_KEYBOARD_SC_KEYPAD_0_AND_INSERT ,HID_KEYBOARD_SC_COMMA_AND_LESS_THAN_SIGN,HID_KEYBOARD_SC_DOT_AND_GREATER_THAN_SIGN,0,0,HID_KEYBOARD_SC_ENTER,0,0,0,
|
||||
0,0,0,0,HID_KEYBOARD_SC_B,HID_KEYBOARD_SC_N,0,HID_KEYBOARD_SC_COMPOSE,HID_KEYBOARD_SC_KEYPAD_PLUS,HID_KEYBOARD_SC_RIGHT_ALT,HID_KEYBOARD_SC_F12,HID_KEYBOARD_SC_PAGE_DOWN,HID_KEYBOARD_SC_END,HID_KEYBOARD_SC_HOME,
|
||||
0,HID_KEYBOARD_SC_Q,HID_KEYBOARD_SC_W,HID_KEYBOARD_SC_E,HID_KEYBOARD_SC_R,HID_KEYBOARD_SC_KEYPAD_4_AND_LEFT_ARROW,HID_KEYBOARD_SC_KEYPAD_5 ,HID_KEYBOARD_SC_KEYPAD_6_AND_RIGHT_ARROW,HID_KEYBOARD_SC_KEYPAD_ASTERISK ,0,0,0,0,0,
|
||||
HID_KEYBOARD_SC_VOLUME_UP ,HID_KEYBOARD_SC_1_AND_EXCLAMATION,HID_KEYBOARD_SC_2_AND_AT,HID_KEYBOARD_SC_3_AND_HASHMARK,HID_KEYBOARD_SC_4_AND_DOLLAR,HID_KEYBOARD_SC_7_AND_AMPERSAND,HID_KEYBOARD_SC_8_AND_ASTERISK,HID_KEYBOARD_SC_9_AND_OPENING_PARENTHESIS,HID_KEYBOARD_SC_KEYPAD_SLASH,HID_KEYBOARD_SC_NUM_LOCK ,HID_KEYBOARD_SC_PAUSE,0,0,0
|
||||
|
||||
};
|
||||
|
||||
|
||||
const int keym[112] = {HID_KEYBOARD_MODIFIER_LEFTCTRL,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,HID_KEYBOARD_MODIFIER_LEFTGUI,HID_KEYBOARD_MODIFIER_LEFTSHIFT,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,HID_KEYBOARD_MODIFIER_RIGHTSHIFT,
|
||||
0,0,0,0,0,0,0,0,0,HID_KEYBOARD_MODIFIER_LEFTALT,0,0,0,0,
|
||||
HID_KEYBOARD_MODIFIER_RIGHTCTRL ,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,HID_KEYBOARD_MODIFIER_RIGHTALT,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||
|
||||
|
||||
//const int rowX[14]={12,13,5,6,1,A4,A1,7,A3,30,A2,A0,31,4};
|
||||
const uint8_t rowY[8]={0xbf,0xfd,0x7f,0xfe,0xef,0xdf,0xfb,0xf7};
|
||||
const uint8_t rowYN[8]={0x40,0x02,0x80,0x01,0x10,0x20,0x04,0x08};
|
||||
|
||||
|
||||
|
||||
#define INT_PIN PIN2
|
||||
|
||||
bool key_fn = false;
|
||||
bool ActionSend = false;
|
||||
bool tap_enabled = true;
|
||||
|
||||
int oldbutton;
|
||||
uint8_t tpdata[0x20];
|
||||
uint16_t lastposX=0xffff;
|
||||
uint16_t lastposY=0xffff;
|
||||
|
||||
uint8_t button = 0;
|
||||
uint8_t keyc;
|
||||
uint8_t colmn;
|
||||
uint8_t lastfingers;
|
||||
uint8_t tpguard;
|
||||
uint8_t touch_to;
|
||||
bool drag = false;
|
||||
bool TouchPadLocked = false;
|
||||
bool tp_guard = false;
|
||||
bool ReadTP = false;
|
||||
bool safeclick = true;
|
||||
#define MOUSE_LEFT (1<<0)
|
||||
#define MOUSE_RIGTH (1<<1)
|
||||
#define MOUSE_MIDDLE (1<<2)
|
||||
#define DELTAX 6
|
||||
#define DELTAY 5
|
||||
#define WHEEL 1
|
||||
#define HYST 1
|
||||
#define DRAG_HYST 5
|
||||
uint8_t ticks;
|
||||
uint8_t mouse = 0;
|
||||
uint16_t MR_X;
|
||||
uint16_t MR_Y;
|
||||
uint8_t MR_B;
|
||||
uint8_t MR_W;
|
||||
uint8_t dragtime;
|
||||
uint8_t speedlimit;
|
||||
#define DRAGTIME 8
|
||||
|
||||
#define MINPRESS 3
|
||||
#define min_CLICK_MS CLICK_MS-MINPRESS
|
||||
uint8_t presstime;
|
||||
#define DRAG_ENABLED 1
|
||||
#define TP_LOCK 20
|
||||
#define TAP_ENABLED 1
|
||||
|
||||
uint8_t time_zero;
|
||||
uint8_t time_one;
|
||||
uint8_t time_two;
|
||||
uint8_t time_pressed;
|
||||
#define PRETAP 3
|
||||
#define CLICK_MS 8
|
||||
uint8_t MR_B_REQ = 0;
|
||||
#define TOUCH_TO 8
|
||||
uint16_t startposX=0xffff;
|
||||
uint16_t startposY=0xffff;
|
||||
bool itsDone = false;
|
||||
#endif
|
||||
|
||||
|
||||
|
555
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/KeyboardMouse.hex
Normal file
555
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/KeyboardMouse.hex
Normal file
@ -0,0 +1,555 @@
|
||||
:10000000E7C0000001C10000FFC00000E9C6000019
|
||||
:10001000FBC00000F9C00000F7C00000F5C0000000
|
||||
:10002000F3C00000F1C000000C94F70AEDC000001E
|
||||
:10003000EBC00000E9C00000E7C00000E5C0000020
|
||||
:10004000E3C00000E1C00000DFC00000DDC0000030
|
||||
:10005000DBC00000D9C00000D7C0000016C70000F8
|
||||
:10006000D3C00000D1C00000CFC00000CDC0000050
|
||||
:10007000CBC000007AC60000C7C00000C5C00000A9
|
||||
:10008000C3C00000C1C00000BFC00000BDC0000070
|
||||
:10009000BBC00000B9C00000B7C00000B5C0000080
|
||||
:1000A000B3C00000B1C00000AFC000003003540076
|
||||
:1000B000450052004500530020004B0065007900C8
|
||||
:1000C00062006F006100720064002B0054006F003A
|
||||
:1000D0007500630068007000610064000000180390
|
||||
:1000E0004F006C0069006D006500780020004C0036
|
||||
:1000F000740064002E0000000403090409023B00A0
|
||||
:10010000020100C0320904000001030101000921BD
|
||||
:1001100011010001223F00070585030800050904BD
|
||||
:100120000100010301020009211101000122480020
|
||||
:10013000070581030800051201100100000008BA3C
|
||||
:10014000153C0001000102DC0105010906A10105C1
|
||||
:100150000719E029E7150025017501950881029529
|
||||
:100160000175088101050819012905950575019199
|
||||
:1001700002950175039101150025FF050719002956
|
||||
:10018000FF950675088100C005010902A10109015A
|
||||
:10019000A100050919012903150025019503750121
|
||||
:1001A0008102950175058101050109300931169C0F
|
||||
:1001B000FF266400369CFF466400950275088106A0
|
||||
:1001C00009381581257F35FF450175088106C0C0B6
|
||||
:1001D00011241FBECFEFDAE0DEBFCDBF13E0A0E0F9
|
||||
:1001E000B1E0ECEBFFE102C005900D92AA3DB10732
|
||||
:1001F000D9F724E0AAEDB3E001C01D92A233B20703
|
||||
:10020000E1F78ED00C94DC0FFBCE2091200430E07F
|
||||
:1002100097FF0CC044275527481B590B2417350757
|
||||
:100220004CF488279927821B930B089528173907C8
|
||||
:100230000CF4C90108950E94820AF8942FEF83ED0F
|
||||
:1002400090E3215080409040E1F700C000009CE026
|
||||
:1002500088E10FB6F894A895809360000FBE909344
|
||||
:100260006000FFCF81E08093DE0384E180931F0470
|
||||
:100270000895CF9384B7877F84BF0FB6F894A8956D
|
||||
:1002800080916000886180936000109260000FBED2
|
||||
:1002900090E080E80FB6F89480936100909361003D
|
||||
:1002A0000FBECFEFC4B9C5B91AB88CEF8BB917B868
|
||||
:1002B00080EC88B91DB884E48EB910BA82EF81BB96
|
||||
:1002C000ECEBF0E080818460808391E09093B90052
|
||||
:1002D00088E48093B800EAE7F0E087EA80838081D1
|
||||
:1002E0008860808315BEEA9A8098AEE7B0E08C9172
|
||||
:1002F00081608C9380E680937C00ABE7B0E08C91CA
|
||||
:100300008F7D8C9380818064808316BC85E085BD61
|
||||
:1003100090936E000E94DA0AC093E103CF91089592
|
||||
:10032000A8DF7894CFEF1DEF0FEF8EEFF82EDFEB05
|
||||
:1003300080E191E00E947B0E1DB8CEB915B9C4B919
|
||||
:1003400080E091E00E947B0E0E94150D6299F0CF33
|
||||
:1003500004B9F5B88FE39CE90197F1F700C00000FC
|
||||
:100360003799E6CFD5B98FE39CE90197F1F700C043
|
||||
:1003700000004C99DDCF5FDF0895089580E191E0A2
|
||||
:100380000E94680E80E091E00E94680EE2EEF0E0CC
|
||||
:10039000808184608083089580E191E00E942F0D28
|
||||
:1003A00080E091E00C942F0D80911E0190911F012F
|
||||
:1003B000009729F0019790931F0180931E0180916F
|
||||
:1003C0000E0190910F01009729F0019790930F0172
|
||||
:1003D00080930E0108952F923F924F925F926F92F9
|
||||
:1003E0007F928F929F92AF92BF92CF92DF92EF92C5
|
||||
:1003F000FF920F931F93CF93DF931F92CDB7DEB77A
|
||||
:10040000290121E08031920709F08FC310921E0468
|
||||
:10041000D2011C9212961C92129713961C9213975B
|
||||
:1004200014961C92149715961C92159716961C926A
|
||||
:10043000169717961C928091DA0381111092DA03B5
|
||||
:100440001DB810BA17B81AB88CEF8BB98FEF8EB9E8
|
||||
:1004500081BB88B984B91092240480E090E160E403
|
||||
:1004600066246A947CEFBEE37B2E20E8822E30EE79
|
||||
:10047000932E44EEA42EE5EE50E5B52EF1EEA2E566
|
||||
:10048000CA2EBAE43B2E2BE4222EDD24D3942091F5
|
||||
:100490002404283008F03EC32111EDC0F89414B8AC
|
||||
:1004A00015B89AB99BB9AFE3BFE11197F1F700C056
|
||||
:1004B00000001E9B46C0189B0DC080911E04920137
|
||||
:1004C000280F311DD90112962C92853018F48F5FB8
|
||||
:1004D00080931E04199B11C0D2018C9182608C9371
|
||||
:1004E00080911E049201280F311DD9011296FC93B0
|
||||
:1004F000853018F48F5F80931E041D9B0DC0809182
|
||||
:100500001E049201280F311DD90112963C928530AC
|
||||
:1005100018F48F5F80931E041F9B11C0D2018C9131
|
||||
:1005200080628C9380911E049201280F311DD901A5
|
||||
:100530001296EC93853018F48F5F80931E0480E749
|
||||
:1005400044C0189B0DC040911E049201240F311D20
|
||||
:10055000D9011296CC92453018F44F5F40931E0497
|
||||
:10056000199B11C0D2012C9122602C9340911E0442
|
||||
:100570009201240F311DD9011296FC93453018F4D5
|
||||
:100580004F5F40931E041D9B0DC040911E049201BD
|
||||
:10059000240F311DD9011296BC92453018F44F5FDB
|
||||
:1005A00040931E041F9B11C0D2012C9120622C93FA
|
||||
:1005B00040911E049201240F311DD9011296EC9333
|
||||
:1005C000453018F44F5F40931E046AB96BB914B8F4
|
||||
:1005D00015B8AFE3BFE11197F1F700C000001C9B15
|
||||
:1005E00011C0D2012C9120612C9340911E049201E4
|
||||
:1005F000240F311DD9011296AC92453018F44F5F8B
|
||||
:1006000040931E041E9B11C0D2012C9121602C939B
|
||||
:1006100040911E049201240F311DD90112969C9223
|
||||
:10062000453018F44F5F40931E041B9B12C040914D
|
||||
:100630001E049201240F311DD901803719F412963E
|
||||
:100640008C9202C012967C92453018F44F5F409312
|
||||
:100650001E042091240430E02E5C3E4FD9012C91E1
|
||||
:1006600025B964B81AB87BB9AFEDBEE21197F1F7BE
|
||||
:1006700000C0000078942091240430E02E5C3E4FAE
|
||||
:10068000D9012C9125B920912404422F50E04E5CD1
|
||||
:100690005E4FDA013C9143B14313FDCF379939C026
|
||||
:1006A000BEE02B9F900111242F5F3F4F482F50E059
|
||||
:1006B0007901E40EF51EEE0CFF1CD701A65EBD4FBE
|
||||
:1006C000FC90220F331F265C3E4FD201EC90D901E3
|
||||
:1006D0002C912E29D2012C93FF20D9F0F0901E04EA
|
||||
:1006E000E090240492012F0D311DBEE0EB9E400DE1
|
||||
:1006F000511D1124440F551F445E5D4FDA014C918A
|
||||
:10070000D90112964C93B4E0BF1518F0F394F0920F
|
||||
:100710001E0436992BC0209124044EE0249F9001A2
|
||||
:1007200011242E5F3F4FA901480F511D440F551F43
|
||||
:10073000465E5D4FDA015C91220F331F265C3E4F0F
|
||||
:10074000D2014C91D9012C91242BD2012C93552309
|
||||
:1007500069F040911E049201240F311DD9011296B7
|
||||
:100760005C93453018F44F5F40931E044F9935C099
|
||||
:1007700020912404BEE02B9F900111242D5F3F4F58
|
||||
:10078000A901480F511D440F551F465E5D4FDA0108
|
||||
:100790005C91220F331F265C3E4FD2014C91D90150
|
||||
:1007A0002C91242BD2012C93573CA9F42091DF03E8
|
||||
:1007B0002D252093DF034F9BFECF40911E04920115
|
||||
:1007C000240F311DD90112965C93453030F44F5FF0
|
||||
:1007D00040931E0402C05111F0CF4B992BC02091C1
|
||||
:1007E0002404BEE02B9F900111242C5F3F4FA901F0
|
||||
:1007F000480F511D440F551F465E5D4FDA015C9155
|
||||
:10080000220F331F265C3E4FD2014C91D9012C910F
|
||||
:10081000242BD2012C93552369F040911E049201A0
|
||||
:10082000240F311DD90112965C93453018F44F5FA7
|
||||
:1008300040931E0479992BC020912404BEE02B9F85
|
||||
:10084000900111242B5F3F4FA901480F511D440F08
|
||||
:10085000551F465E5D4FDA015C91220F331F265C07
|
||||
:100860003E4FD2014C91D9012C91242BD2012C93D3
|
||||
:10087000552369F040911E049201240F311DD901C6
|
||||
:1008800012965C93453018F44F5F40931E047E9996
|
||||
:100890002BC020912404BEE02B9F900111242A5FDD
|
||||
:1008A0003F4FA901480F511D440F551F465E5D4F34
|
||||
:1008B000DA015C91220F331F265C3E4FD2014C912E
|
||||
:1008C000D9012C91242BD2012C93552369F040910E
|
||||
:1008D0001E049201240F311DD90112965C934530FC
|
||||
:1008E00018F44F5F40931E0466992BC02091240496
|
||||
:1008F000BEE02B9F90011124295F3F4FA901480FB3
|
||||
:10090000511D440F551F465E5D4FDA015C91220F69
|
||||
:10091000331F265C3E4FD2014C91D9012C91242BE0
|
||||
:10092000D2012C93552369F040911E049201240FAB
|
||||
:10093000311DD90112965C93453018F44F5F4093F6
|
||||
:100940001E047C992BC020912404BEE02B9F9001B3
|
||||
:100950001124285F3F4FA901480F511D440F551F17
|
||||
:10096000465E5D4FDA015C91220F331F265C3E4FDD
|
||||
:10097000D2014C91D9012C91242BD2012C935523D7
|
||||
:1009800069F040911E049201240F311DD901129685
|
||||
:100990005C93453018F44F5F40931E044D992BC073
|
||||
:1009A00020912404BEE02B9F90011124275F3F4F2C
|
||||
:1009B000A901480F511D440F551F465E5D4FDA01D6
|
||||
:1009C0005C91220F331F265C3E4FD2014C91D9011E
|
||||
:1009D0002C91242BD2012C93552369F040911E04B5
|
||||
:1009E0009201240F311DD90112965C93453018F401
|
||||
:1009F0004F5F40931E047D992BC020912404BEE0DC
|
||||
:100A00002B9F90011124265F3F4FA901480F511DD4
|
||||
:100A1000440F551F465E5D4FDA015C91220F331F74
|
||||
:100A2000265C3E4FD2014C91D9012C91242BD2014E
|
||||
:100A30002C93552369F040911E049201240F311D1F
|
||||
:100A4000D90112965C93453018F44F5F40931E0411
|
||||
:100A50007F992BC020912404BEE02B9F900111248C
|
||||
:100A6000255F3F4FA901480F511D440F551F465E9A
|
||||
:100A70005D4FDA015C91220F331F265C3E4FD2019D
|
||||
:100A80004C91D9012C91242BD2012C93552369F040
|
||||
:100A900040911E049201240F311DD90112965C93DE
|
||||
:100AA000453018F44F5F40931E0462992BC020918B
|
||||
:100AB0002404BEE02B9F90011124245F3F4FA90125
|
||||
:100AC000480F511D440F551F465E5D4FDA015C9182
|
||||
:100AD000220F331F265C3E4FD2014C91D9012C913D
|
||||
:100AE000242BD2012C93552369F040911E049201CE
|
||||
:100AF000240F311DD90112965C93453018F44F5FD5
|
||||
:100B000040931E041AB87BB9209124042F5F2093D0
|
||||
:100B10002404BDCCF2018081811104C080911E04A7
|
||||
:100B20008111A0DB88E090E006C18050914009F07F
|
||||
:100B300007C1109211041092100410922204109216
|
||||
:100B4000210410921904909116048091DC03892BE2
|
||||
:100B5000809316048091E203882309F4DBC0C090DF
|
||||
:100B6000F303D12CDC2CCC248091F403C82AE09030
|
||||
:100B7000F503F12CFE2CEE248091F603E82A209157
|
||||
:100B8000F203213099F120F0223009F47CC0B3C087
|
||||
:100B900080911804882339F180912304843008F16E
|
||||
:100BA000809115048830E8F4409120015091210192
|
||||
:100BB0008091220190912301840F951F8C199D092A
|
||||
:100BC0008E199F09873FEFEF9E075CF00A974CF460
|
||||
:100BD00080911404882311F082E001C081E08093A9
|
||||
:100BE000DB03109223041092200485C098E09093B8
|
||||
:100BF0001A0480911804813039F018F0823019F10C
|
||||
:100C000025C090931D041FC0809127019091280159
|
||||
:100C1000009741F1A601481B590BCA012983F5DA57
|
||||
:100C200090932204809321048091250190912601C4
|
||||
:100C3000D701A81BB90BCD01E8DA9093110480937A
|
||||
:100C4000100429810FC01092200402C0813051F09D
|
||||
:100C500010921704D0922301C0922201F092210138
|
||||
:100C6000E0922001D0922801C0922701F092260143
|
||||
:100C7000E092250180912004803809F444C08C5F03
|
||||
:100C80008093200440C080911804811104C088E042
|
||||
:100C900080931A041DC08230D9F48091250190916F
|
||||
:100CA0002601A7014B5F5F4F4817590710F481E0F9
|
||||
:100CB00005C005968E159F0518F48FEF80931904D3
|
||||
:100CC0008091190481111092230410921D040AC00E
|
||||
:100CD00010921404D0922301C0922201F0922101BB
|
||||
:100CE000E0922001D0922801C0922701F0922601C3
|
||||
:100CF000E092250108C0109228011092270110925D
|
||||
:100D0000260110922501209318041092E20381E03D
|
||||
:100D10008093DA0380911004F20182838091210490
|
||||
:100D200081838091160480838091190483831092BB
|
||||
:100D3000160484E090E0D8018D939C9381E000C07C
|
||||
:100D40000F90DF91CF911F910F91FF90EF90DF9067
|
||||
:100D5000CF90BF90AF909F908F907F906F905F905B
|
||||
:100D60004F903F902F90089508951F920F920FB6C5
|
||||
:100D70000F9211242F933F934F935F938F93809102
|
||||
:100D80007A00806180937A00809179008093E103FA
|
||||
:100D9000282F30E040911204509113042417350796
|
||||
:100DA00089F4883E60F4853910F082E005C0893707
|
||||
:100DB00010F081E001C084E08093DC0307C0109252
|
||||
:100DC000DC0304C030931304209312048F915F91CD
|
||||
:100DD0004F913F912F910F900FBE0F901F9018953C
|
||||
:100DE0001F920F920FB60F9211242F933F934F93A0
|
||||
:100DF0005F936F937F938F939F93AF93BF93CF93A3
|
||||
:100E0000DF93EF93FF936AE088E40E943E0F811125
|
||||
:100E10001BC00E94920F84E98093BC006AE089E4C1
|
||||
:100E20000E943E0F811110C0C0EFD3E060E0CE0100
|
||||
:100E30000E94A30F219683E0C63FD807B9F761E06F
|
||||
:100E400086EF93E00E94A30F84E98093BC00809119
|
||||
:100E5000DF03811107C08091DE03811103C081E0AF
|
||||
:100E60008093E203FF91EF91DF91CF91BF91AF911A
|
||||
:100E70009F918F917F916F915F914F913F912F91B2
|
||||
:100E80000F900FBE0F901F9018951F920F920FB6E4
|
||||
:100E90000F9211242F933F934F935F936F937F9300
|
||||
:100EA0008F939F93AF93BF93CF93DF93EF93FF9372
|
||||
:100EB0006AE088E4E3D781111AC00E94920F84E9A6
|
||||
:100EC0008093BC006AE089E4D9D7811110C0C0EFDB
|
||||
:100ED000D3E060E0CE010E94A30F219683E0C63FDD
|
||||
:100EE000D807B9F761E086EF93E00E94A30F84E989
|
||||
:100EF0008093BC008091DF0381110BC08091DE03E1
|
||||
:100F0000811107C08091F003882319F081E080935C
|
||||
:100F1000E203809123048F3F39F09091F203911105
|
||||
:100F200003C08F5F8093230480912304883061F491
|
||||
:100F30008091DB03809316041092DB031092170458
|
||||
:100F40001092140410921504809117048F3F39F009
|
||||
:100F50009091F203913019F48F5F80931704809180
|
||||
:100F600014048F3F39F09091F203923019F48F5F9F
|
||||
:100F70008093140480911B04882319F0815080937E
|
||||
:100F80001B0480911C04882319F0815080931C0459
|
||||
:100F900080911D04882319F0815080931D04809155
|
||||
:100FA0001F04882319F0815080931F0480911F042F
|
||||
:100FB000813011F41092DE0380911A04882319F015
|
||||
:100FC000815080931A0480911A048130A9F480938F
|
||||
:100FD00029011092280110922701109226011092E7
|
||||
:100FE00025011092E00390911D04992319F080933C
|
||||
:100FF000E20302C010921804FF91EF91DF91CF91AC
|
||||
:10100000BF91AF919F918F917F916F915F914F9120
|
||||
:101010003F912F910F900FBE0F901F901895292F81
|
||||
:10102000332723303105C9F064F42130310581F0D4
|
||||
:101030002230310509F042C08BE390E02CEF30E024
|
||||
:1010400041C021323105F1F02232310549F136C07B
|
||||
:1010500082E190E027E331E035C0992781309105A6
|
||||
:1010600041F08230910541F0892B41F5E8EFF0E045
|
||||
:1010700005C0EEEDF0E002C0ECEAF0E0849190E013
|
||||
:101080009F0120C0662339F06130C1F489E090E00F
|
||||
:1010900027E231E017C089E090E02EE031E012C095
|
||||
:1010A000662339F0613051F488E490E028E831E0BB
|
||||
:1010B00009C08FE390E029E431E004C080E090E0D3
|
||||
:1010C00020E030E0FA01318320830895CF92DF924F
|
||||
:1010D000EF92FF920F931F93CF93DF93EC018B015D
|
||||
:1010E0007A01DED1811133C0E114F10439F0F70146
|
||||
:1010F00080819181081B190BC80FD91FC12CD12CDD
|
||||
:101100000115110519F18091E80085FD16C0809147
|
||||
:10111000E8008E778093E80088D4E114F10449F068
|
||||
:10112000F70180819181C80ED91ED182C08285E0ED
|
||||
:101130000EC0B6D1882321F30AC089918093F100B3
|
||||
:1011400001501109FFEFCF1ADF0ADACF80E0DF91FB
|
||||
:10115000CF911F910F91FF90EF90DF90CF90089566
|
||||
:1011600020913004309131042617370748F061157B
|
||||
:10117000710539F42091E8002E772093E80001C032
|
||||
:10118000B90140E061157105A9F1209129042223DC
|
||||
:1011900009F443C0253009F442C02091E80023FD42
|
||||
:1011A00040C02091E80022FD32C02091E80020FFDD
|
||||
:1011B000E9CF4091F3002091F20030E0342BFC01A4
|
||||
:1011C000CF016115710559F02830310540F4819146
|
||||
:1011D0008093F100615071092F5F3F4FF1CF41E0E3
|
||||
:1011E0002830310509F040E02091E8002E77209367
|
||||
:1011F000E800C8CF4111C9CF0AC0809129048823D3
|
||||
:1012000061F0853061F08091E80083FD0AC0809133
|
||||
:10121000E80082FFF2CF80E0089582E0089583E045
|
||||
:10122000089581E008956115710529F42091E80081
|
||||
:101230002B772093E800FC016115710541F1809145
|
||||
:101240002904882361F1853061F18091E80083FDF4
|
||||
:1012500024C08091E80082FFEFCF2091F3008091BD
|
||||
:10126000F20090E0922B892B31F08091F100819374
|
||||
:101270006150710991F78091E8008B778093E800C5
|
||||
:10128000DBCF80912904882351F0853051F0809183
|
||||
:10129000E80080FFF6CF80E0089581E0089582E0C5
|
||||
:1012A000089583E008952091300430913104261789
|
||||
:1012B000370748F06115710539F42091E8002E7761
|
||||
:1012C0002093E80001C0B901FC0120E0611571051F
|
||||
:1012D00091F180912904882309F440C0853009F4F4
|
||||
:1012E0003FC08091E80083FD3DC08091E80082FD11
|
||||
:1012F0002FC08091E80080FFE9CF2091F30080911A
|
||||
:10130000F20090E0922B6115710559F0883091053B
|
||||
:1013100040F424912093F1003196615071090196B7
|
||||
:10132000F2CF21E0089709F020E08091E8008E7765
|
||||
:101330008093E800CBCF2111CCCF0AC08091290443
|
||||
:10134000882361F0853061F08091E80083FD0AC058
|
||||
:101350008091E80082FFF2CF80E0089582E0089556
|
||||
:1013600083E0089581E00895982F973058F5909381
|
||||
:10137000E900981739F07091EC002091ED00509140
|
||||
:10138000F00003C0242F762F50E021FF19C03091C8
|
||||
:10139000EB003E7F3093EB003091ED003D7F3093CA
|
||||
:1013A000ED003091EB0031603093EB007093EC0076
|
||||
:1013B0002093ED005093F0002091EE0027FF07C02E
|
||||
:1013C0009F5FD3CF8F708093E90081E0089580E024
|
||||
:1013D0000895EF92FF920F931F93CF93DF93E62E22
|
||||
:1013E000EC018C010C5F1F4FF12CFE1491F1588120
|
||||
:1013F000552351F1F801208169817A8131979081DB
|
||||
:10140000852F8F70873010F080E024C0223010F4D8
|
||||
:1014100042E001C046E0E8E0F0E020E0E617F70730
|
||||
:1014200020F42F5FEE0FFF1FF9CF2295207F422B74
|
||||
:10143000F0E49F9F90011124551F5527551F652FDC
|
||||
:10144000622B92DF882301F3F39425960B5F1F4FE5
|
||||
:10145000CCCF81E0DF91CF911F910F91FF90EF9062
|
||||
:10146000089580912A0487FF11C08091E80082FDD1
|
||||
:1014700005C0809129048111F8CF11C08091E80046
|
||||
:101480008B770BC080912904882349F08091E80074
|
||||
:1014900080FFF8CF8091E8008E778093E800089570
|
||||
:1014A0002091E4003091E50095E64091EC00842F16
|
||||
:1014B000817040FF22C08091E80080FD1CC08091B7
|
||||
:1014C0002904882391F0853091F08091EB0085FD0F
|
||||
:1014D00010C04091E4005091E5004217530729F3F2
|
||||
:1014E0009A01915011F784E0089582E0089583E015
|
||||
:1014F000089581E0089580E008954091E80042FF5A
|
||||
:10150000DECF089567D06ED0E0EEF0E0808181609C
|
||||
:101510008083E8EDF0E080818F77808319BCA7EDB0
|
||||
:10152000B0E08C918E7F8C9380818F7E808310922F
|
||||
:10153000280408950F931F93CF93DF934BD052D07D
|
||||
:10154000C8EDD0E088818F77888388818068888320
|
||||
:1015500088818F7D888319BC1092290410922504FC
|
||||
:10156000109227041092260400EE10E0F80180810A
|
||||
:101570008B7F808388818160888342E060E080E0A7
|
||||
:10158000F3DEE1EEF0E080818E7F8083E2EEF0E03A
|
||||
:10159000808181608083808188608083F801808180
|
||||
:1015A0008E7F8083888180618883DF91CF911F91B6
|
||||
:1015B0000F910895E8EDF0E080818F7E8083E7ED64
|
||||
:1015C000F0E080818160808384E082BF81E080934D
|
||||
:1015D0002804B0CFE8EDF0E080818E7F8083109208
|
||||
:1015E000E20008951092DA001092E10008951F922F
|
||||
:1015F0000F920FB60F9211242F933F934F935F9347
|
||||
:101600006F937F938F939F93AF93BF93EF93FF93CA
|
||||
:101610008091E10082FF0BC08091E20082FF07C051
|
||||
:101620008091E1008B7F8093E1000E94D401809142
|
||||
:10163000DA0080FF1FC08091D80080FF1BC080911E
|
||||
:10164000DA008E7F8093DA008091D90080FF0DC090
|
||||
:1016500080E189BD82E189BD09B400FEFDCF81E052
|
||||
:10166000809329040E94BC0105C019BC1092290472
|
||||
:101670000E94BD018091E10080FF18C08091E200CE
|
||||
:1016800080FF14C08091E2008E7F8093E200809101
|
||||
:10169000E20080618093E2008091D80080628093B4
|
||||
:1016A000D80019BC85E080932904BED18091E10067
|
||||
:1016B00084FF2FC08091E20084FF2BC080E189BDB0
|
||||
:1016C00082E189BD09B400FEFDCF8091D8008F7DF5
|
||||
:1016D0008093D8008091E1008F7E8093E10080911B
|
||||
:1016E000E2008F7E8093E2008091E200816080932F
|
||||
:1016F000E20080912504882311F084E007C08091E6
|
||||
:10170000E30087FD02C081E001C083E080932904EB
|
||||
:101710008BD18091E10083FF22C08091E20083FFA2
|
||||
:101720001EC08091E100877F8093E10082E080937A
|
||||
:101730002904109225048091E1008E7F8093E100BE
|
||||
:101740008091E2008E7F8093E2008091E2008061D0
|
||||
:101750008093E20042E060E080E006DE65D1FF9128
|
||||
:10176000EF91BF91AF919F918F917F916F915F9119
|
||||
:101770004F913F912F910F900FBE0F901F90189592
|
||||
:101780001F93CF93DF93CDB7DEB7AA970FB6F89428
|
||||
:10179000DEBF0FBECDBFEAE2F4E088E08E0F90918D
|
||||
:1017A000F10091938E13FBCF0E94CC018091E80051
|
||||
:1017B00083FF22C180912A0490912B04953009F473
|
||||
:1017C00078C030F4913081F168F0933069F114C140
|
||||
:1017D000983009F4E2C0993009F4F1C0963009F06C
|
||||
:1017E0000BC189C0803881F0823809F005C1809131
|
||||
:1017F0002E048F708093E9008091EB0085FB882791
|
||||
:1018000080F91092E90006C0809126049091270487
|
||||
:10181000911182609091E800977F9093E800809307
|
||||
:10182000F1001092F100C4C0282F2D7F09F0E4C010
|
||||
:10183000882319F0823061F0DFC080912C04813060
|
||||
:1018400009F0DAC0933009F080E0809327042BC0C0
|
||||
:1018500080912C04811127C080912E048F7009F48F
|
||||
:10186000CBC08093E9002091EB0020FF1CC0933097
|
||||
:1018700021F48091EB00806214C09091EB009061A4
|
||||
:101880009093EB0021E030E0A90102C0440F551F06
|
||||
:101890008A95E2F74093EA001092EA008091EB000B
|
||||
:1018A00088608093EB001092E9008091E800877FC8
|
||||
:1018B00082C08111A1C010912C041F778091E30098
|
||||
:1018C0008078812B8093E3008091E800877F80936C
|
||||
:1018D000E800C7DD8091E80080FFFCCF8091E30045
|
||||
:1018E00080688093E300111102C082E001C083E0B0
|
||||
:1018F0008093290481C08058823008F07DC0809197
|
||||
:101900002C0490912D048C3D53E0950771F583E0F4
|
||||
:101910008A838AE289834FB7F894DE01139620E028
|
||||
:101920003EE051E2E32FF0E050935700E49120FFB6
|
||||
:1019300003C0E295EF703F5FEF708E2F90E0EA30CA
|
||||
:1019400010F0C79601C0C0968D939D932F5F2431F0
|
||||
:1019500049F74FBF8091E800877F8093E8006AE2F3
|
||||
:1019600070E0CE010196FCDB12C0AE014F5F5F4F0D
|
||||
:1019700060912E0454DBBC01892B09F43DC0909189
|
||||
:10198000E800977F9093E80089819A818CDC8091B0
|
||||
:10199000E8008B778093E8002FC0803869F580914C
|
||||
:1019A000E800877F8093E800809125048093F10010
|
||||
:1019B0008091E8008E778093E80053DD1DC081118F
|
||||
:1019C0001BC090912C049230B8F48091E800877F7E
|
||||
:1019D0008093E8009093250444DD809125048111D3
|
||||
:1019E00006C08091E30087FD02C081E001C084E071
|
||||
:1019F000809329040E94BE018091E80083FF0AC001
|
||||
:101A00008091E800877F8093E8008091EB008062FE
|
||||
:101A10008093EB00AA960FB6F894DEBF0FBECDBF41
|
||||
:101A2000DF91CF911F9108950895CF93809129045C
|
||||
:101A3000882399F0C091E900CF709091EC00892F34
|
||||
:101A4000817090FD80E8C82B1092E9008091E80039
|
||||
:101A500083FD96DECF70C093E900CF9108956F9219
|
||||
:101A60007F928F929F92AF92BF92CF92DF92EF922E
|
||||
:101A7000FF920F931F93CF93DF9300D01F92CDB7A8
|
||||
:101A8000DEB77C01CDB6DEB68091E80083FF09C1E8
|
||||
:101A9000F701808190E020912E0430912F042817C7
|
||||
:101AA000390709F0FEC080912B04833009F4A0C0EF
|
||||
:101AB00030F4813071F0823009F4D7C0F2C08A303E
|
||||
:101AC00009F4BBC08B3009F4A4C0893009F0E9C027
|
||||
:101AD00052C080912A04813A09F0E3C08DB69EB6C7
|
||||
:101AE0001A82198280912C0410912D048B83F701A6
|
||||
:101AF0008085482F50E08DB79EB7841B950B0FB69D
|
||||
:101B0000F8949EBF0FBE8DBFEDB7FEB731965F0153
|
||||
:101B100060E070E0CF0149D24FEF410F8E010F5FBF
|
||||
:101B20001F4F9501BE016D5F7F4FC7010E94EB0102
|
||||
:101B3000F70186819781009721F0408550E0B5013B
|
||||
:101B40002BD21092E9008091E800877F8093E80013
|
||||
:101B50008B8181118093F10069817A81C50100DB5D
|
||||
:101B60008091E8008B778093E8000FB6F8949EBED2
|
||||
:101B70000FBE8DBE96C080912A04813209F091C0BB
|
||||
:101B8000ADB6BEB6009130041091310470902C04B3
|
||||
:101B900060902D048DB79EB7801B910B0FB6F89403
|
||||
:101BA0009EBF0FBE8DBFEDB7FEB731964F0180913E
|
||||
:101BB000E800877F8093E800B801CF0134DB809193
|
||||
:101BC000E8008E778093E80021E0711001C020E0EA
|
||||
:101BD00030E0021B130B280D391D4FEF460D672D0A
|
||||
:101BE000C701C2D80FB6F894BEBE0FBEADBE59C075
|
||||
:101BF00080912A04813A09F054C08091E800877FDF
|
||||
:101C00008093E8008091E80080FFFCCFF701818598
|
||||
:101C100040C080912A04813209F043C08091E800DD
|
||||
:101C2000877F8093E8001DDC90912C0481E0911166
|
||||
:101C300001C080E0F701818734C080912A0481329D
|
||||
:101C400081F58091E800877F8093E8000ADC80912D
|
||||
:101C50002C0490912D04882736E0969587953A9527
|
||||
:101C6000E1F7F701958784871CC080912A04813AA7
|
||||
:101C7000C1F48091E800877F8093E8008091E800BC
|
||||
:101C800080FFFCCFF701848595859695879596957D
|
||||
:101C900087958093F1008091E8008E778093E8002B
|
||||
:101CA000E0DB0FB6F894DEBE0FBECDBE0F900F90F6
|
||||
:101CB0000F90DF91CF911F910F91FF90EF90DF90E8
|
||||
:101CC000CF90BF90AF909F908F907F906F9008952E
|
||||
:101CD000FC01399627E0DF011D922A95E9F721E002
|
||||
:101CE000FC01218724EF31E03587248723E024831A
|
||||
:101CF00061E001966ECB4F925F926F927F928F92CE
|
||||
:101D00009F92AF92BF92CF92DF92EF92FF920F938A
|
||||
:101D10001F93CF93DF9300D01F92CDB7DEB77C0126
|
||||
:101D2000ADB6BEB680912904843009F08EC0809192
|
||||
:101D3000E4009091E500F7012285338528173907E3
|
||||
:101D400009F483C081818F708093E9008091E8005D
|
||||
:101D500085FF7BC08DB69EB6408550E08DB79EB79F
|
||||
:101D6000841B950B0FB6F8949EBF0FBE8DBFEDB7C9
|
||||
:101D7000FEB731966F011B821A82198260E070E013
|
||||
:101D8000CF0113D18E010F5F1F4F960140E0BE01BE
|
||||
:101D90006D5F7F4FC7010E94EB01482EF7018485DC
|
||||
:101DA0009585892B51F091E080E026853785232B9E
|
||||
:101DB00009F090E0092F182F02C000E010E0F701B1
|
||||
:101DC000668077806114710489F049815A81B3017A
|
||||
:101DD000C601D5D055245394892B09F4512CF70111
|
||||
:101DE000408550E0B601C301D7D001C0512C898194
|
||||
:101DF0009A81892BF1F0411004C0511002C0012BCF
|
||||
:101E0000C1F0F701848595859787868781818F70DA
|
||||
:101E10008093E9008B8181118093F10069817A813F
|
||||
:101E200040E050E0C60152D98091E8008E7780935F
|
||||
:101E3000E8008091E4009091E500F70193878287A4
|
||||
:101E40000FB6F8949EBE0FBE8DBE0FB6F894BEBE00
|
||||
:101E50000FBEADBE0F900F900F90DF91CF911F91ED
|
||||
:101E60000F91FF90EF90DF90CF90BF90AF909F9039
|
||||
:101E70008F907F906F905F904F90089594EA909329
|
||||
:101E8000BC0094E6699FB00111249B0140E054EA34
|
||||
:101E900021153105F9F0411122C09091BC0097FF46
|
||||
:101EA00012C09091B900987F903161F0983339F069
|
||||
:101EB000983041F084E08093BC0081E00895509315
|
||||
:101EC000BC00E6CF41E095E39A95F1F70000215080
|
||||
:101ED0003109DECF84E08093BC0082E008958093D6
|
||||
:101EE000BB0084E88093BC006115710559F08091B6
|
||||
:101EF000BC0087FD09C085E38A95F1F700006150B9
|
||||
:101F00007109F2CF83E008958091B900887F88310C
|
||||
:101F100011F480E008958034E1F384E98093BC00FB
|
||||
:101F200084E008958093BB0084E88093BC00809196
|
||||
:101F3000BC0087FFFCCF9091B900987F81E0983278
|
||||
:101F400009F080E00895FC01611102C094EC01C029
|
||||
:101F500094E89093BC008091BC0087FFFCCF8091F7
|
||||
:101F6000BB0080839091B900987F81E0662319F0CF
|
||||
:101F7000983519F403C0903509F080E00895FB010D
|
||||
:101F8000DC0104C08D910190801921F44150504032
|
||||
:101F9000C8F7881B990B0895FB01DC0102C0019072
|
||||
:101FA0000D9241505040D8F70895DC0101C06D9367
|
||||
:0C1FB00041505040E0F70895F894FFCF36
|
||||
:101FBC00018108000001E40304000000000000009F
|
||||
:101FCC00008508000001E803080000000000000084
|
||||
:101FDC00FFFFFFFF01FFFFFFFF0140028001102008
|
||||
:101FEC000408BFFD7FFEEFDFFBF7010000000000DF
|
||||
:101FFC0000000000000000000000000000000000D5
|
||||
:10200C0000000000000000000000000000000000C4
|
||||
:10201C0000000000000000000000000000000800AC
|
||||
:10202C0002000000000000000000000000000000A2
|
||||
:10203C000000000000000000000000002000000074
|
||||
:10204C000000000000000000000000000000000084
|
||||
:10205C000400000000000000000010000000000060
|
||||
:10206C000000000000000000000000000000000064
|
||||
:10207C000000000000000000000000000000000054
|
||||
:10208C000000000000000000400000000000000004
|
||||
:10209C000000000000000000000000000000000034
|
||||
:1020AC000000000000000000000000000000000024
|
||||
:1020BC000000000000000000000000000000000014
|
||||
:1020CC0000000000000000000000E00035003A00B5
|
||||
:1020DC003B00220023002E0041002D000000420096
|
||||
:1020EC004C000000000000002B0039003C001700E1
|
||||
:1020FC001C00300040002F0000002A0000000000EF
|
||||
:10210C00E100000004001600070009000D000E009D
|
||||
:10211C000F0033000000310000000000E50000005B
|
||||
:10212C00290000003D000A000B003F0000003400B5
|
||||
:10213C00E20044002C0000005200E4001D001B00D3
|
||||
:10214C0006001900100036003700000000002800BF
|
||||
:10215C00000000000000000000000000000005006E
|
||||
:10216C00110000007F003800E600450051004F00D0
|
||||
:10217C005000000014001A000800150018000C0094
|
||||
:10218C0012001300000000000000000000003E00E0
|
||||
:10219C001E001F002000210024002500260027001F
|
||||
:1021AC0046004300000000000000E000350066001F
|
||||
:1021BC00F600220023002E0070002D000000E3002A
|
||||
:1021CC004C000000000000002B003900C700170075
|
||||
:1021DC001C0030006F002F0000002A0000000000DF
|
||||
:1021EC00E1000000040016000700090059005A0025
|
||||
:1021FC005B0056000000310000000000E50000000C
|
||||
:10220C002900000081000A000B007F000000340050
|
||||
:10221C00E20049002C0000004B00E4001D001B00F4
|
||||
:10222C00060019006200360037000000000028008C
|
||||
:10223C00000000000000000000000000000005008D
|
||||
:10224C00110000007F005700E60045004E004D00D5
|
||||
:10225C004A00000014001A00080015005C005D0024
|
||||
:10226C005E0055000000000000000000000080002F
|
||||
:10227C001E001F0020002100240025002600540011
|
||||
:0A228C0053004800000000000000AD
|
||||
:00000001FF
|
@ -0,0 +1,81 @@
|
||||
/** \file
|
||||
*
|
||||
* This file contains special DoxyGen information for the generation of the main page and other special
|
||||
* documentation pages. It is not a project source file.
|
||||
*/
|
||||
|
||||
/** \mainpage Dual HID Keyboard and Mouse Device Demo
|
||||
*
|
||||
* \section Sec_Compat Demo Compatibility:
|
||||
*
|
||||
* The following list indicates what microcontrollers are compatible with this demo.
|
||||
*
|
||||
* \li Series 7 USB AVRs (AT90USBxxx7)
|
||||
* \li Series 6 USB AVRs (AT90USBxxx6)
|
||||
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
||||
* \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
|
||||
* \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
|
||||
* \li Series B XMEGA AVRs (ATXMEGAxxxBx)
|
||||
* \li Series C XMEGA AVRs (ATXMEGAxxxCx)
|
||||
*
|
||||
* \section Sec_Info USB Information:
|
||||
*
|
||||
* The following table gives a rundown of the USB utilization of this demo.
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <td><b>USB Mode:</b></td>
|
||||
* <td>Device</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><b>USB Class:</b></td>
|
||||
* <td>Human Interface Device (HID)</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><b>USB Subclass:</b></td>
|
||||
* <td>N/A</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><b>Relevant Standards:</b></td>
|
||||
* <td>USBIF HID Specification \n
|
||||
* USBIF HID Usage Tables</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><b>Supported USB Speeds:</b></td>
|
||||
* <td>Low Speed Mode \n
|
||||
* Full Speed Mode</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*
|
||||
* \section Sec_Description Project Description:
|
||||
*
|
||||
* Keyboard/Mouse demonstration application. This gives a simple reference
|
||||
* application for implementing a composite device containing both USB Keyboard
|
||||
* and USB Mouse functionality using the basic USB HID drivers in all modern OSes
|
||||
* (i.e. no special drivers required). This example uses two separate HID
|
||||
* interfaces for each function. It is boot protocol compatible, and thus works under
|
||||
* compatible BIOS as if it was a native keyboard and mouse (e.g. PS/2).
|
||||
*
|
||||
* On start-up the system will automatically enumerate and function
|
||||
* as a keyboard when the USB connection to a host is present and the HWB is not
|
||||
* pressed. When enabled, manipulate the joystick to send the letters
|
||||
* a, b, c, d and e. See the USB HID documentation for more information
|
||||
* on sending keyboard event and key presses.
|
||||
*
|
||||
* When the HWB is pressed, the mouse mode is enabled. When enabled, move the
|
||||
* joystick to move the pointer, and push the joystick inwards to simulate a
|
||||
* left-button click.
|
||||
*
|
||||
* \section Sec_Options Project Options
|
||||
*
|
||||
* The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.
|
||||
*
|
||||
* <table>
|
||||
* <tr>
|
||||
* <td>
|
||||
* None
|
||||
* </td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*/
|
||||
|
62
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/asf.xml
Normal file
62
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/asf.xml
Normal file
@ -0,0 +1,62 @@
|
||||
<asf xmlversion="1.0">
|
||||
<project caption="Keyboard and Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard_mouse.example.avr8">
|
||||
<require idref="lufa.demos.device.class.keyboard_mouse"/>
|
||||
<require idref="lufa.boards.dummy.avr8"/>
|
||||
<generator value="as5_8"/>
|
||||
|
||||
<device-support value="at90usb1287"/>
|
||||
<config name="lufa.drivers.board.name" value="none"/>
|
||||
|
||||
<build type="define" name="F_CPU" value="16000000UL"/>
|
||||
<build type="define" name="F_USB" value="16000000UL"/>
|
||||
</project>
|
||||
|
||||
<project caption="Keyboard and Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard_mouse.example.xmega">
|
||||
<require idref="lufa.demos.device.class.keyboard_mouse"/>
|
||||
<require idref="lufa.boards.dummy.xmega"/>
|
||||
<generator value="as5_8"/>
|
||||
|
||||
<device-support value="atxmega128a1u"/>
|
||||
<config name="lufa.drivers.board.name" value="none"/>
|
||||
|
||||
<build type="define" name="F_CPU" value="32000000UL"/>
|
||||
<build type="define" name="F_USB" value="48000000UL"/>
|
||||
</project>
|
||||
|
||||
<module type="application" id="lufa.demos.device.class.keyboard_mouse" caption="Keyboard and Mouse HID Device Demo (Class Driver APIs)">
|
||||
<info type="description" value="summary">
|
||||
Keyboard and Mouse HID device demo, implementing a basic USB keyboard and mouse using a pair of HID interfaces. This demo uses the user-friendly USB Class Driver APIs to provide a simple, abstracted interface into the USB stack.
|
||||
</info>
|
||||
|
||||
<info type="gui-flag" value="move-to-root"/>
|
||||
|
||||
<info type="keyword" value="Technology">
|
||||
<keyword value="Class Driver APIs"/>
|
||||
<keyword value="USB Device"/>
|
||||
<keyword value="HID Class"/>
|
||||
</info>
|
||||
|
||||
<device-support-alias value="lufa_avr8"/>
|
||||
<device-support-alias value="lufa_xmega"/>
|
||||
<device-support-alias value="lufa_uc3"/>
|
||||
|
||||
<build type="distribute" subtype="user-file" value="doxyfile"/>
|
||||
<build type="distribute" subtype="user-file" value="KeyboardMouse.txt"/>
|
||||
|
||||
<build type="c-source" value="KeyboardMouse.c"/>
|
||||
<build type="c-source" value="Descriptors.c"/>
|
||||
<build type="header-file" value="KeyboardMouse.h"/>
|
||||
<build type="header-file" value="Descriptors.h"/>
|
||||
|
||||
<build type="module-config" subtype="path" value="Config"/>
|
||||
<build type="header-file" value="Config/LUFAConfig.h"/>
|
||||
|
||||
<require idref="lufa.common"/>
|
||||
<require idref="lufa.platform"/>
|
||||
<require idref="lufa.drivers.usb"/>
|
||||
<require idref="lufa.drivers.board"/>
|
||||
<require idref="lufa.drivers.board.leds"/>
|
||||
<require idref="lufa.drivers.board.joystick"/>
|
||||
<require idref="lufa.drivers.board.buttons"/>
|
||||
</module>
|
||||
</asf>
|
2395
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/doxyfile
Normal file
2395
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/doxyfile
Normal file
@ -0,0 +1,2395 @@
|
||||
# Doxyfile 1.8.9
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project.
|
||||
#
|
||||
# All text after a double hash (##) is considered a comment and is placed in
|
||||
# front of the TAG it is preceding.
|
||||
#
|
||||
# All text after a single hash (#) is considered a comment and will be ignored.
|
||||
# The format is:
|
||||
# TAG = value [value, ...]
|
||||
# For lists, items can also be appended using:
|
||||
# TAG += value [value, ...]
|
||||
# Values that contain spaces should be placed between quotes (\" \").
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# This tag specifies the encoding used for all characters in the config file
|
||||
# that follow. The default is UTF-8 which is also the encoding used for all text
|
||||
# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
|
||||
# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
|
||||
# for the list of possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
|
||||
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
|
||||
# double-quotes, unless you are using Doxywizard) that should identify the
|
||||
# project for which the documentation is generated. This name is used in the
|
||||
# title of most generated pages and in a few other places.
|
||||
# The default value is: My Project.
|
||||
|
||||
PROJECT_NAME = "LUFA Library - Combined Keyboard/Mouse Device Demo"
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER =
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
# quick idea about the purpose of the project. Keep the description short.
|
||||
|
||||
PROJECT_BRIEF =
|
||||
|
||||
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
|
||||
# in the documentation. The maximum height of the logo should not exceed 55
|
||||
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
|
||||
# the logo to the output directory.
|
||||
|
||||
PROJECT_LOGO =
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
|
||||
# into which the generated documentation will be written. If a relative path is
|
||||
# entered, it will be relative to the location where doxygen was started. If
|
||||
# left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = ./Documentation/
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
|
||||
# directories (in 2 levels) under the output directory of each output format and
|
||||
# will distribute the generated files over these directories. Enabling this
|
||||
# option can be useful when feeding doxygen a huge amount of source files, where
|
||||
# putting all generated files in the same directory would otherwise causes
|
||||
# performance problems for the file system.
|
||||
# The default value is: NO.
|
||||
|
||||
CREATE_SUBDIRS = NO
|
||||
|
||||
# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
|
||||
# characters to appear in the names of generated files. If set to NO, non-ASCII
|
||||
# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
|
||||
# U+3044.
|
||||
# The default value is: NO.
|
||||
|
||||
ALLOW_UNICODE_NAMES = NO
|
||||
|
||||
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
# information to generate all constant output in the proper language.
|
||||
# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
|
||||
# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
|
||||
# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
|
||||
# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
|
||||
# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
|
||||
# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
|
||||
# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
|
||||
# Ukrainian and Vietnamese.
|
||||
# The default value is: English.
|
||||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
|
||||
# descriptions after the members that are listed in the file and class
|
||||
# documentation (similar to Javadoc). Set to NO to disable this.
|
||||
# The default value is: YES.
|
||||
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
|
||||
# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
|
||||
# description of a member or function before the detailed description
|
||||
#
|
||||
# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
|
||||
# brief descriptions will be completely suppressed.
|
||||
# The default value is: YES.
|
||||
|
||||
REPEAT_BRIEF = YES
|
||||
|
||||
# This tag implements a quasi-intelligent brief description abbreviator that is
|
||||
# used to form the text in various listings. Each string in this list, if found
|
||||
# as the leading text of the brief description, will be stripped from the text
|
||||
# and the result, after processing the whole list, is used as the annotated
|
||||
# text. Otherwise, the brief description is used as-is. If left blank, the
|
||||
# following values are used ($name is automatically replaced with the name of
|
||||
# the entity):The $name class, The $name widget, The $name file, is, provides,
|
||||
# specifies, contains, represents, a, an and the.
|
||||
|
||||
ABBREVIATE_BRIEF = "The $name class" \
|
||||
"The $name widget" \
|
||||
"The $name file" \
|
||||
is \
|
||||
provides \
|
||||
specifies \
|
||||
contains \
|
||||
represents \
|
||||
a \
|
||||
an \
|
||||
the
|
||||
|
||||
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
|
||||
# doxygen will generate a detailed section even if there is only a brief
|
||||
# description.
|
||||
# The default value is: NO.
|
||||
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
|
||||
# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
|
||||
# inherited members of a class in the documentation of that class as if those
|
||||
# members were ordinary class members. Constructors, destructors and assignment
|
||||
# operators of the base classes will not be shown.
|
||||
# The default value is: NO.
|
||||
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
|
||||
# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
|
||||
# before files name in the file list and in the header files. If set to NO the
|
||||
# shortest path that makes the file name unique will be used
|
||||
# The default value is: YES.
|
||||
|
||||
FULL_PATH_NAMES = YES
|
||||
|
||||
# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
|
||||
# Stripping is only done if one of the specified strings matches the left-hand
|
||||
# part of the path. The tag can be used to show relative paths in the file list.
|
||||
# If left blank the directory from which doxygen is run is used as the path to
|
||||
# strip.
|
||||
#
|
||||
# Note that you can specify absolute paths here, but also relative paths, which
|
||||
# will be relative from the directory where doxygen is started.
|
||||
# This tag requires that the tag FULL_PATH_NAMES is set to YES.
|
||||
|
||||
STRIP_FROM_PATH =
|
||||
|
||||
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
|
||||
# path mentioned in the documentation of a class, which tells the reader which
|
||||
# header file to include in order to use a class. If left blank only the name of
|
||||
# the header file containing the class definition is used. Otherwise one should
|
||||
# specify the list of include paths that are normally passed to the compiler
|
||||
# using the -I flag.
|
||||
|
||||
STRIP_FROM_INC_PATH =
|
||||
|
||||
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
|
||||
# less readable) file names. This can be useful is your file systems doesn't
|
||||
# support long names like on DOS, Mac, or CD-ROM.
|
||||
# The default value is: NO.
|
||||
|
||||
SHORT_NAMES = YES
|
||||
|
||||
# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
|
||||
# first line (until the first dot) of a Javadoc-style comment as the brief
|
||||
# description. If set to NO, the Javadoc-style will behave just like regular Qt-
|
||||
# style comments (thus requiring an explicit @brief command for a brief
|
||||
# description.)
|
||||
# The default value is: NO.
|
||||
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
|
||||
# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
|
||||
# line (until the first dot) of a Qt-style comment as the brief description. If
|
||||
# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
|
||||
# requiring an explicit \brief command for a brief description.)
|
||||
# The default value is: NO.
|
||||
|
||||
QT_AUTOBRIEF = NO
|
||||
|
||||
# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
|
||||
# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
|
||||
# a brief description. This used to be the default behavior. The new default is
|
||||
# to treat a multi-line C++ comment block as a detailed description. Set this
|
||||
# tag to YES if you prefer the old behavior instead.
|
||||
#
|
||||
# Note that setting this tag to YES also means that rational rose comments are
|
||||
# not recognized any more.
|
||||
# The default value is: NO.
|
||||
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
|
||||
# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
|
||||
# documentation from any documented member that it re-implements.
|
||||
# The default value is: YES.
|
||||
|
||||
INHERIT_DOCS = YES
|
||||
|
||||
# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
|
||||
# page for each member. If set to NO, the documentation of a member will be part
|
||||
# of the file/class/namespace that contains it.
|
||||
# The default value is: NO.
|
||||
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
|
||||
# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
|
||||
# uses this value to replace tabs by spaces in code fragments.
|
||||
# Minimum value: 1, maximum value: 16, default value: 4.
|
||||
|
||||
TAB_SIZE = 4
|
||||
|
||||
# This tag can be used to specify a number of aliases that act as commands in
|
||||
# the documentation. An alias has the form:
|
||||
# name=value
|
||||
# For example adding
|
||||
# "sideeffect=@par Side Effects:\n"
|
||||
# will allow you to put the command \sideeffect (or @sideeffect) in the
|
||||
# documentation, which will result in a user-defined paragraph with heading
|
||||
# "Side Effects:". You can put \n's in the value part of an alias to insert
|
||||
# newlines.
|
||||
|
||||
ALIASES =
|
||||
|
||||
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
||||
# A mapping has the form "name=value". For example adding "class=itcl::class"
|
||||
# will allow you to use the command class in the itcl::class meaning.
|
||||
|
||||
TCL_SUBST =
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
|
||||
# only. Doxygen will then generate output that is more tailored for C. For
|
||||
# instance, some of the names that are used will be different. The list of all
|
||||
# members will be omitted, etc.
|
||||
# The default value is: NO.
|
||||
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
|
||||
# Python sources only. Doxygen will then generate output that is more tailored
|
||||
# for that language. For instance, namespaces will be presented as packages,
|
||||
# qualified scopes will look different, etc.
|
||||
# The default value is: NO.
|
||||
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
|
||||
# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
|
||||
# sources. Doxygen will then generate output that is tailored for Fortran.
|
||||
# The default value is: NO.
|
||||
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
|
||||
# sources. Doxygen will then generate output that is tailored for VHDL.
|
||||
# The default value is: NO.
|
||||
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
|
||||
# Doxygen selects the parser to use depending on the extension of the files it
|
||||
# parses. With this tag you can assign which parser to use for a given
|
||||
# extension. Doxygen has a built-in mapping, but you can override or extend it
|
||||
# using this tag. The format is ext=language, where ext is a file extension, and
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
|
||||
# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
|
||||
# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
|
||||
# Fortran. In the later case the parser tries to guess whether the code is fixed
|
||||
# or free formatted code, this is the default for Fortran type files), VHDL. For
|
||||
# instance to make doxygen treat .inc files as Fortran files (default is PHP),
|
||||
# and .f files as C (default is Fortran), use: inc=Fortran f=C.
|
||||
#
|
||||
# Note: For files without extension you can use no_extension as a placeholder.
|
||||
#
|
||||
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
|
||||
# the files are not read by doxygen.
|
||||
|
||||
EXTENSION_MAPPING =
|
||||
|
||||
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
|
||||
# according to the Markdown format, which allows for more readable
|
||||
# documentation. See http://daringfireball.net/projects/markdown/ for details.
|
||||
# The output of markdown processing is further processed by doxygen, so you can
|
||||
# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
|
||||
# case of backward compatibilities issues.
|
||||
# The default value is: YES.
|
||||
|
||||
MARKDOWN_SUPPORT = NO
|
||||
|
||||
# When enabled doxygen tries to link words that correspond to documented
|
||||
# classes, or namespaces to their corresponding documentation. Such a link can
|
||||
# be prevented in individual cases by putting a % sign in front of the word or
|
||||
# globally by setting AUTOLINK_SUPPORT to NO.
|
||||
# The default value is: YES.
|
||||
|
||||
AUTOLINK_SUPPORT = YES
|
||||
|
||||
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
|
||||
# to include (a tag file for) the STL sources as input, then you should set this
|
||||
# tag to YES in order to let doxygen match functions declarations and
|
||||
# definitions whose arguments contain STL classes (e.g. func(std::string);
|
||||
# versus func(std::string) {}). This also make the inheritance and collaboration
|
||||
# diagrams that involve STL classes more complete and accurate.
|
||||
# The default value is: NO.
|
||||
|
||||
BUILTIN_STL_SUPPORT = NO
|
||||
|
||||
# If you use Microsoft's C++/CLI language, you should set this option to YES to
|
||||
# enable parsing support.
|
||||
# The default value is: NO.
|
||||
|
||||
CPP_CLI_SUPPORT = NO
|
||||
|
||||
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
|
||||
# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
|
||||
# will parse them like normal C++ but will assume all classes use public instead
|
||||
# of private inheritance when no explicit protection keyword is present.
|
||||
# The default value is: NO.
|
||||
|
||||
SIP_SUPPORT = NO
|
||||
|
||||
# For Microsoft's IDL there are propget and propput attributes to indicate
|
||||
# getter and setter methods for a property. Setting this option to YES will make
|
||||
# doxygen to replace the get and set methods by a property in the documentation.
|
||||
# This will only work if the methods are indeed getting or setting a simple
|
||||
# type. If this is not the case, or you want to show the methods anyway, you
|
||||
# should set this option to NO.
|
||||
# The default value is: YES.
|
||||
|
||||
IDL_PROPERTY_SUPPORT = YES
|
||||
|
||||
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
|
||||
# tag is set to YES then doxygen will reuse the documentation of the first
|
||||
# member in the group (if any) for the other members of the group. By default
|
||||
# all members of a group must be documented explicitly.
|
||||
# The default value is: NO.
|
||||
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
|
||||
# Set the SUBGROUPING tag to YES to allow class member groups of the same type
|
||||
# (for instance a group of public functions) to be put as a subgroup of that
|
||||
# type (e.g. under the Public Functions section). Set it to NO to prevent
|
||||
# subgrouping. Alternatively, this can be done per class using the
|
||||
# \nosubgrouping command.
|
||||
# The default value is: YES.
|
||||
|
||||
SUBGROUPING = YES
|
||||
|
||||
# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
|
||||
# are shown inside the group in which they are included (e.g. using \ingroup)
|
||||
# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
|
||||
# and RTF).
|
||||
#
|
||||
# Note that this feature does not work in combination with
|
||||
# SEPARATE_MEMBER_PAGES.
|
||||
# The default value is: NO.
|
||||
|
||||
INLINE_GROUPED_CLASSES = NO
|
||||
|
||||
# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
|
||||
# with only public data fields or simple typedef fields will be shown inline in
|
||||
# the documentation of the scope in which they are defined (i.e. file,
|
||||
# namespace, or group documentation), provided this scope is documented. If set
|
||||
# to NO, structs, classes, and unions are shown on a separate page (for HTML and
|
||||
# Man pages) or section (for LaTeX and RTF).
|
||||
# The default value is: NO.
|
||||
|
||||
INLINE_SIMPLE_STRUCTS = NO
|
||||
|
||||
# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
|
||||
# enum is documented as struct, union, or enum with the name of the typedef. So
|
||||
# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
|
||||
# with name TypeT. When disabled the typedef will appear as a member of a file,
|
||||
# namespace, or class. And the struct will be named TypeS. This can typically be
|
||||
# useful for C code in case the coding convention dictates that all compound
|
||||
# types are typedef'ed and only the typedef is referenced, never the tag name.
|
||||
# The default value is: NO.
|
||||
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
|
||||
# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
|
||||
# cache is used to resolve symbols given their name and scope. Since this can be
|
||||
# an expensive process and often the same symbol appears multiple times in the
|
||||
# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
|
||||
# doxygen will become slower. If the cache is too large, memory is wasted. The
|
||||
# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
|
||||
# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
|
||||
# symbols. At the end of a run doxygen will report the cache usage and suggest
|
||||
# the optimal cache size from a speed point of view.
|
||||
# Minimum value: 0, maximum value: 9, default value: 0.
|
||||
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
|
||||
# documentation are documented, even if no documentation was available. Private
|
||||
# class members and static file members will be hidden unless the
|
||||
# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
|
||||
# Note: This will also disable the warnings about undocumented members that are
|
||||
# normally produced when WARNINGS is set to YES.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_ALL = YES
|
||||
|
||||
# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
|
||||
# be included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_PRIVATE = YES
|
||||
|
||||
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
|
||||
# scope will be included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_PACKAGE = NO
|
||||
|
||||
# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
|
||||
# included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_STATIC = YES
|
||||
|
||||
# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
|
||||
# locally in source files will be included in the documentation. If set to NO,
|
||||
# only classes defined in header files are included. Does not have any effect
|
||||
# for Java sources.
|
||||
# The default value is: YES.
|
||||
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
|
||||
# This flag is only useful for Objective-C code. If set to YES, local methods,
|
||||
# which are defined in the implementation section but not in the interface are
|
||||
# included in the documentation. If set to NO, only methods in the interface are
|
||||
# included.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
|
||||
# If this flag is set to YES, the members of anonymous namespaces will be
|
||||
# extracted and appear in the documentation as a namespace called
|
||||
# 'anonymous_namespace{file}', where file will be replaced with the base name of
|
||||
# the file that contains the anonymous namespace. By default anonymous namespace
|
||||
# are hidden.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
|
||||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
|
||||
# undocumented members inside documented classes or files. If set to NO these
|
||||
# members will be included in the various overviews, but no documentation
|
||||
# section is generated. This option has no effect if EXTRACT_ALL is enabled.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
|
||||
# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
|
||||
# undocumented classes that are normally visible in the class hierarchy. If set
|
||||
# to NO, these classes will be included in the various overviews. This option
|
||||
# has no effect if EXTRACT_ALL is enabled.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
|
||||
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
|
||||
# (class|struct|union) declarations. If set to NO, these declarations will be
|
||||
# included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
|
||||
# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
|
||||
# documentation blocks found inside the body of a function. If set to NO, these
|
||||
# blocks will be appended to the function's detailed documentation block.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
|
||||
# The INTERNAL_DOCS tag determines if documentation that is typed after a
|
||||
# \internal command is included. If the tag is set to NO then the documentation
|
||||
# will be excluded. Set it to YES to include the internal documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
INTERNAL_DOCS = NO
|
||||
|
||||
# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
|
||||
# names in lower-case letters. If set to YES, upper-case letters are also
|
||||
# allowed. This is useful if you have classes or files whose names only differ
|
||||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# and Mac users are advised to set this option to NO.
|
||||
# The default value is: system dependent.
|
||||
|
||||
CASE_SENSE_NAMES = NO
|
||||
|
||||
# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
|
||||
# their full class and namespace scopes in the documentation. If set to YES, the
|
||||
# scope will be hidden.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
|
||||
# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
|
||||
# append additional text to a page's title, such as Class Reference. If set to
|
||||
# YES the compound reference will be hidden.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_COMPOUND_REFERENCE= NO
|
||||
|
||||
# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
|
||||
# the files that are included by a file in the documentation of that file.
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
|
||||
# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
|
||||
# grouped member an include statement to the documentation, telling the reader
|
||||
# which file to include in order to use the member.
|
||||
# The default value is: NO.
|
||||
|
||||
SHOW_GROUPED_MEMB_INC = NO
|
||||
|
||||
# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
|
||||
# files with double quotes in the documentation rather than with sharp brackets.
|
||||
# The default value is: NO.
|
||||
|
||||
FORCE_LOCAL_INCLUDES = NO
|
||||
|
||||
# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
|
||||
# documentation for inline members.
|
||||
# The default value is: YES.
|
||||
|
||||
INLINE_INFO = YES
|
||||
|
||||
# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
|
||||
# (detailed) documentation of file and class members alphabetically by member
|
||||
# name. If set to NO, the members will appear in declaration order.
|
||||
# The default value is: YES.
|
||||
|
||||
SORT_MEMBER_DOCS = YES
|
||||
|
||||
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
|
||||
# descriptions of file, namespace and class members alphabetically by member
|
||||
# name. If set to NO, the members will appear in declaration order. Note that
|
||||
# this will also influence the order of the classes in the class list.
|
||||
# The default value is: NO.
|
||||
|
||||
SORT_BRIEF_DOCS = NO
|
||||
|
||||
# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
|
||||
# (brief and detailed) documentation of class members so that constructors and
|
||||
# destructors are listed first. If set to NO the constructors will appear in the
|
||||
# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
|
||||
# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
|
||||
# member documentation.
|
||||
# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
|
||||
# detailed member documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
SORT_MEMBERS_CTORS_1ST = NO
|
||||
|
||||
# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
|
||||
# of group names into alphabetical order. If set to NO the group names will
|
||||
# appear in their defined order.
|
||||
# The default value is: NO.
|
||||
|
||||
SORT_GROUP_NAMES = NO
|
||||
|
||||
# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
|
||||
# fully-qualified names, including namespaces. If set to NO, the class list will
|
||||
# be sorted only by class name, not including the namespace part.
|
||||
# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
|
||||
# Note: This option applies only to the class list, not to the alphabetical
|
||||
# list.
|
||||
# The default value is: NO.
|
||||
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
|
||||
# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
|
||||
# type resolution of all parameters of a function it will reject a match between
|
||||
# the prototype and the implementation of a member function even if there is
|
||||
# only one candidate or it is obvious which candidate to choose by doing a
|
||||
# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
|
||||
# accept a match between prototype and implementation in such cases.
|
||||
# The default value is: NO.
|
||||
|
||||
STRICT_PROTO_MATCHING = NO
|
||||
|
||||
# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
|
||||
# list. This list is created by putting \todo commands in the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
GENERATE_TODOLIST = NO
|
||||
|
||||
# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
|
||||
# list. This list is created by putting \test commands in the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
GENERATE_TESTLIST = NO
|
||||
|
||||
# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
|
||||
# list. This list is created by putting \bug commands in the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
GENERATE_BUGLIST = NO
|
||||
|
||||
# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
|
||||
# the deprecated list. This list is created by putting \deprecated commands in
|
||||
# the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
|
||||
# The ENABLED_SECTIONS tag can be used to enable conditional documentation
|
||||
# sections, marked by \if <section_label> ... \endif and \cond <section_label>
|
||||
# ... \endcond blocks.
|
||||
|
||||
ENABLED_SECTIONS =
|
||||
|
||||
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
|
||||
# initial value of a variable or macro / define can have for it to appear in the
|
||||
# documentation. If the initializer consists of more lines than specified here
|
||||
# it will be hidden. Use a value of 0 to hide initializers completely. The
|
||||
# appearance of the value of individual variables and macros / defines can be
|
||||
# controlled using \showinitializer or \hideinitializer command in the
|
||||
# documentation regardless of this setting.
|
||||
# Minimum value: 0, maximum value: 10000, default value: 30.
|
||||
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
|
||||
# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
|
||||
# the bottom of the documentation of classes and structs. If set to YES, the
|
||||
# list will mention the files that were used to generate the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_USED_FILES = YES
|
||||
|
||||
# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
|
||||
# will remove the Files entry from the Quick Index and from the Folder Tree View
|
||||
# (if specified).
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_FILES = YES
|
||||
|
||||
# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
|
||||
# page. This will remove the Namespaces entry from the Quick Index and from the
|
||||
# Folder Tree View (if specified).
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_NAMESPACES = YES
|
||||
|
||||
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
|
||||
# doxygen should invoke to get the current version for each file (typically from
|
||||
# the version control system). Doxygen will invoke the program by executing (via
|
||||
# popen()) the command command input-file, where command is the value of the
|
||||
# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
|
||||
# by doxygen. Whatever the program writes to standard output is used as the file
|
||||
# version. For an example see the documentation.
|
||||
|
||||
FILE_VERSION_FILTER =
|
||||
|
||||
# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
|
||||
# by doxygen. The layout file controls the global structure of the generated
|
||||
# output files in an output format independent way. To create the layout file
|
||||
# that represents doxygen's defaults, run doxygen with the -l option. You can
|
||||
# optionally specify a file name after the option, if omitted DoxygenLayout.xml
|
||||
# will be used as the name of the layout file.
|
||||
#
|
||||
# Note that if you run doxygen from a directory containing a file called
|
||||
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
|
||||
# tag is left empty.
|
||||
|
||||
LAYOUT_FILE =
|
||||
|
||||
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
|
||||
# the reference definitions. This must be a list of .bib files. The .bib
|
||||
# extension is automatically appended if omitted. This requires the bibtex tool
|
||||
# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
|
||||
# For LaTeX the style of the bibliography can be controlled using
|
||||
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
|
||||
# search path. See also \cite for info how to create references.
|
||||
|
||||
CITE_BIB_FILES =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The QUIET tag can be used to turn on/off the messages that are generated to
|
||||
# standard output by doxygen. If QUIET is set to YES this implies that the
|
||||
# messages are off.
|
||||
# The default value is: NO.
|
||||
|
||||
QUIET = YES
|
||||
|
||||
# The WARNINGS tag can be used to turn on/off the warning messages that are
|
||||
# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
|
||||
# this implies that the warnings are on.
|
||||
#
|
||||
# Tip: Turn warnings on while writing the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
WARNINGS = YES
|
||||
|
||||
# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
|
||||
# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
|
||||
# will automatically be disabled.
|
||||
# The default value is: YES.
|
||||
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
|
||||
# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
|
||||
# potential errors in the documentation, such as not documenting some parameters
|
||||
# in a documented function, or documenting parameters that don't exist or using
|
||||
# markup commands wrongly.
|
||||
# The default value is: YES.
|
||||
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
|
||||
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
|
||||
# are documented, but have no documentation for their parameters or return
|
||||
# value. If set to NO, doxygen will only warn about wrong or incomplete
|
||||
# parameter documentation, but not about the absence of documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_NO_PARAMDOC = YES
|
||||
|
||||
# The WARN_FORMAT tag determines the format of the warning messages that doxygen
|
||||
# can produce. The string should contain the $file, $line, and $text tags, which
|
||||
# will be replaced by the file and line number from which the warning originated
|
||||
# and the warning text. Optionally the format may contain $version, which will
|
||||
# be replaced by the version of the file (if it could be obtained via
|
||||
# FILE_VERSION_FILTER)
|
||||
# The default value is: $file:$line: $text.
|
||||
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
|
||||
# The WARN_LOGFILE tag can be used to specify a file to which warning and error
|
||||
# messages should be written. If left blank the output is written to standard
|
||||
# error (stderr).
|
||||
|
||||
WARN_LOGFILE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The INPUT tag is used to specify the files and/or directories that contain
|
||||
# documented source files. You may enter file names like myfile.cpp or
|
||||
# directories like /usr/src/myproject. Separate the files or directories with
|
||||
# spaces.
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = ./
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
|
||||
# documentation (see: http://www.gnu.org/software/libiconv) for the list of
|
||||
# possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
INPUT_ENCODING = UTF-8
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
|
||||
# *.h) to filter out the source-files in the directories. If left blank the
|
||||
# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
|
||||
# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
|
||||
# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
|
||||
# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
|
||||
# *.qsf, *.as and *.js.
|
||||
|
||||
FILE_PATTERNS = *.h \
|
||||
*.c \
|
||||
*.txt
|
||||
|
||||
# The RECURSIVE tag can be used to specify whether or not subdirectories should
|
||||
# be searched for input files as well.
|
||||
# The default value is: NO.
|
||||
|
||||
RECURSIVE = YES
|
||||
|
||||
# The EXCLUDE tag can be used to specify files and/or directories that should be
|
||||
# excluded from the INPUT source files. This way you can easily exclude a
|
||||
# subdirectory from a directory tree whose root is specified with the INPUT tag.
|
||||
#
|
||||
# Note that relative paths are relative to the directory from which doxygen is
|
||||
# run.
|
||||
|
||||
EXCLUDE = Documentation/
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
||||
# directories that are symbolic links (a Unix file system feature) are excluded
|
||||
# from the input.
|
||||
# The default value is: NO.
|
||||
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
|
||||
# certain files from those directories.
|
||||
#
|
||||
# Note that the wildcards are matched against the file with absolute path, so to
|
||||
# exclude all test directories for example use the pattern */test/*
|
||||
|
||||
EXCLUDE_PATTERNS =
|
||||
|
||||
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
||||
# (namespaces, classes, functions, etc.) that should be excluded from the
|
||||
# output. The symbol name can be a fully qualified name, a word, or if the
|
||||
# wildcard * is used, a substring. Examples: ANamespace, AClass,
|
||||
# AClass::ANamespace, ANamespace::*Test
|
||||
#
|
||||
# Note that the wildcards are matched against the file with absolute path, so to
|
||||
# exclude all test directories use the pattern */test/*
|
||||
|
||||
EXCLUDE_SYMBOLS = __* \
|
||||
INCLUDE_FROM_*
|
||||
|
||||
# The EXAMPLE_PATH tag can be used to specify one or more files or directories
|
||||
# that contain example code fragments that are included (see the \include
|
||||
# command).
|
||||
|
||||
EXAMPLE_PATH =
|
||||
|
||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
|
||||
# *.h) to filter out the source-files in the directories. If left blank all
|
||||
# files are included.
|
||||
|
||||
EXAMPLE_PATTERNS = *
|
||||
|
||||
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
|
||||
# searched for input files to be used with the \include or \dontinclude commands
|
||||
# irrespective of the value of the RECURSIVE tag.
|
||||
# The default value is: NO.
|
||||
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
|
||||
# The IMAGE_PATH tag can be used to specify one or more files or directories
|
||||
# that contain images that are to be included in the documentation (see the
|
||||
# \image command).
|
||||
|
||||
IMAGE_PATH =
|
||||
|
||||
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||
# invoke to filter for each input file. Doxygen will invoke the filter program
|
||||
# by executing (via popen()) the command:
|
||||
#
|
||||
# <filter> <input-file>
|
||||
#
|
||||
# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
|
||||
# name of an input file. Doxygen will then use the output that the filter
|
||||
# program writes to standard output. If FILTER_PATTERNS is specified, this tag
|
||||
# will be ignored.
|
||||
#
|
||||
# Note that the filter must not add or remove lines; it is applied before the
|
||||
# code is scanned, but not when the output code is generated. If lines are added
|
||||
# or removed, the anchors will not be placed correctly.
|
||||
|
||||
INPUT_FILTER =
|
||||
|
||||
# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
|
||||
# basis. Doxygen will compare the file name with each pattern and apply the
|
||||
# filter if there is a match. The filters are a list of the form: pattern=filter
|
||||
# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
|
||||
# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
|
||||
# patterns match the file name, INPUT_FILTER is applied.
|
||||
|
||||
FILTER_PATTERNS =
|
||||
|
||||
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
|
||||
# INPUT_FILTER) will also be used to filter the input files that are used for
|
||||
# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
|
||||
# The default value is: NO.
|
||||
|
||||
FILTER_SOURCE_FILES = NO
|
||||
|
||||
# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
|
||||
# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
|
||||
# it is also possible to disable source filtering for a specific pattern using
|
||||
# *.ext= (so without naming a filter).
|
||||
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
|
||||
|
||||
FILTER_SOURCE_PATTERNS =
|
||||
|
||||
# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
|
||||
# is part of the input, its contents will be placed on the main page
|
||||
# (index.html). This can be useful if you have a project on for instance GitHub
|
||||
# and want to reuse the introduction page also for the doxygen output.
|
||||
|
||||
USE_MDFILE_AS_MAINPAGE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
|
||||
# generated. Documented entities will be cross-referenced with these sources.
|
||||
#
|
||||
# Note: To get rid of all source code in the generated output, make sure that
|
||||
# also VERBATIM_HEADERS is set to NO.
|
||||
# The default value is: NO.
|
||||
|
||||
SOURCE_BROWSER = NO
|
||||
|
||||
# Setting the INLINE_SOURCES tag to YES will include the body of functions,
|
||||
# classes and enums directly into the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
INLINE_SOURCES = NO
|
||||
|
||||
# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
|
||||
# special comment blocks from generated source code fragments. Normal C, C++ and
|
||||
# Fortran comments will always remain visible.
|
||||
# The default value is: YES.
|
||||
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
|
||||
# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
|
||||
# function all documented functions referencing it will be listed.
|
||||
# The default value is: NO.
|
||||
|
||||
REFERENCED_BY_RELATION = NO
|
||||
|
||||
# If the REFERENCES_RELATION tag is set to YES then for each documented function
|
||||
# all documented entities called/used by that function will be listed.
|
||||
# The default value is: NO.
|
||||
|
||||
REFERENCES_RELATION = NO
|
||||
|
||||
# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
|
||||
# to YES then the hyperlinks from functions in REFERENCES_RELATION and
|
||||
# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
|
||||
# link to the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
REFERENCES_LINK_SOURCE = NO
|
||||
|
||||
# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
|
||||
# source code will show a tooltip with additional information such as prototype,
|
||||
# brief description and links to the definition and documentation. Since this
|
||||
# will make the HTML file larger and loading of large files a bit slower, you
|
||||
# can opt to disable this feature.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag SOURCE_BROWSER is set to YES.
|
||||
|
||||
SOURCE_TOOLTIPS = YES
|
||||
|
||||
# If the USE_HTAGS tag is set to YES then the references to source code will
|
||||
# point to the HTML generated by the htags(1) tool instead of doxygen built-in
|
||||
# source browser. The htags tool is part of GNU's global source tagging system
|
||||
# (see http://www.gnu.org/software/global/global.html). You will need version
|
||||
# 4.8.6 or higher.
|
||||
#
|
||||
# To use it do the following:
|
||||
# - Install the latest version of global
|
||||
# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
|
||||
# - Make sure the INPUT points to the root of the source tree
|
||||
# - Run doxygen as normal
|
||||
#
|
||||
# Doxygen will invoke htags (and that will in turn invoke gtags), so these
|
||||
# tools must be available from the command line (i.e. in the search path).
|
||||
#
|
||||
# The result: instead of the source browser generated by doxygen, the links to
|
||||
# source code will now point to the output of htags.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag SOURCE_BROWSER is set to YES.
|
||||
|
||||
USE_HTAGS = NO
|
||||
|
||||
# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
|
||||
# verbatim copy of the header file for each class for which an include is
|
||||
# specified. Set to NO to disable this.
|
||||
# See also: Section \class.
|
||||
# The default value is: YES.
|
||||
|
||||
VERBATIM_HEADERS = NO
|
||||
|
||||
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
|
||||
# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
|
||||
# cost of reduced performance. This can be particularly helpful with template
|
||||
# rich C++ code for which doxygen's built-in parser lacks the necessary type
|
||||
# information.
|
||||
# Note: The availability of this option depends on whether or not doxygen was
|
||||
# compiled with the --with-libclang option.
|
||||
# The default value is: NO.
|
||||
|
||||
CLANG_ASSISTED_PARSING = NO
|
||||
|
||||
# If clang assisted parsing is enabled you can provide the compiler with command
|
||||
# line options that you would normally use when invoking the compiler. Note that
|
||||
# the include paths will already be set by doxygen for the files and directories
|
||||
# specified with INPUT and INCLUDE_PATH.
|
||||
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
|
||||
|
||||
CLANG_OPTIONS =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
|
||||
# compounds will be generated. Enable this if the project contains a lot of
|
||||
# classes, structs, unions or interfaces.
|
||||
# The default value is: YES.
|
||||
|
||||
ALPHABETICAL_INDEX = YES
|
||||
|
||||
# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
|
||||
# which the alphabetical index list will be split.
|
||||
# Minimum value: 1, maximum value: 20, default value: 5.
|
||||
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
|
||||
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
|
||||
# In case all classes in a project start with a common prefix, all classes will
|
||||
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
|
||||
# can be used to specify a prefix (or a list of prefixes) that should be ignored
|
||||
# while generating the index headers.
|
||||
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
|
||||
|
||||
IGNORE_PREFIX =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
|
||||
# The default value is: YES.
|
||||
|
||||
GENERATE_HTML = YES
|
||||
|
||||
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
|
||||
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
|
||||
# it.
|
||||
# The default directory is: html.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_OUTPUT = html
|
||||
|
||||
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
|
||||
# generated HTML page (for example: .htm, .php, .asp).
|
||||
# The default value is: .html.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_FILE_EXTENSION = .html
|
||||
|
||||
# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
|
||||
# each generated HTML page. If the tag is left blank doxygen will generate a
|
||||
# standard header.
|
||||
#
|
||||
# To get valid HTML the header file that includes any scripts and style sheets
|
||||
# that doxygen needs, which is dependent on the configuration options used (e.g.
|
||||
# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
|
||||
# default header using
|
||||
# doxygen -w html new_header.html new_footer.html new_stylesheet.css
|
||||
# YourConfigFile
|
||||
# and then modify the file new_header.html. See also section "Doxygen usage"
|
||||
# for information on how to generate the default header that doxygen normally
|
||||
# uses.
|
||||
# Note: The header is subject to change so you typically have to regenerate the
|
||||
# default header when upgrading to a newer version of doxygen. For a description
|
||||
# of the possible markers and block names see the documentation.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_HEADER =
|
||||
|
||||
# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
|
||||
# generated HTML page. If the tag is left blank doxygen will generate a standard
|
||||
# footer. See HTML_HEADER for more information on how to generate a default
|
||||
# footer and what special commands can be used inside the footer. See also
|
||||
# section "Doxygen usage" for information on how to generate the default footer
|
||||
# that doxygen normally uses.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_FOOTER =
|
||||
|
||||
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
|
||||
# sheet that is used by each HTML page. It can be used to fine-tune the look of
|
||||
# the HTML output. If left blank doxygen will generate a default style sheet.
|
||||
# See also section "Doxygen usage" for information on how to generate the style
|
||||
# sheet that doxygen normally uses.
|
||||
# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
|
||||
# it is more robust and this tag (HTML_STYLESHEET) will in the future become
|
||||
# obsolete.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_STYLESHEET =
|
||||
|
||||
# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
|
||||
# cascading style sheets that are included after the standard style sheets
|
||||
# created by doxygen. Using this option one can overrule certain style aspects.
|
||||
# This is preferred over using HTML_STYLESHEET since it does not replace the
|
||||
# standard style sheet and is therefore more robust against future updates.
|
||||
# Doxygen will copy the style sheet files to the output directory.
|
||||
# Note: The order of the extra style sheet files is of importance (e.g. the last
|
||||
# style sheet in the list overrules the setting of the previous ones in the
|
||||
# list). For an example see the documentation.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_EXTRA_STYLESHEET =
|
||||
|
||||
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
|
||||
# other source files which should be copied to the HTML output directory. Note
|
||||
# that these files will be copied to the base HTML output directory. Use the
|
||||
# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
|
||||
# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
|
||||
# files will be copied as-is; there are no commands or markers available.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_EXTRA_FILES =
|
||||
|
||||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
|
||||
# will adjust the colors in the style sheet and background images according to
|
||||
# this color. Hue is specified as an angle on a colorwheel, see
|
||||
# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
|
||||
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
|
||||
# purple, and 360 is red again.
|
||||
# Minimum value: 0, maximum value: 359, default value: 220.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_COLORSTYLE_HUE = 220
|
||||
|
||||
# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
|
||||
# in the HTML output. For a value of 0 the output will use grayscales only. A
|
||||
# value of 255 will produce the most vivid colors.
|
||||
# Minimum value: 0, maximum value: 255, default value: 100.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_COLORSTYLE_SAT = 100
|
||||
|
||||
# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
|
||||
# luminance component of the colors in the HTML output. Values below 100
|
||||
# gradually make the output lighter, whereas values above 100 make the output
|
||||
# darker. The value divided by 100 is the actual gamma applied, so 80 represents
|
||||
# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
|
||||
# change the gamma.
|
||||
# Minimum value: 40, maximum value: 240, default value: 80.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_COLORSTYLE_GAMMA = 80
|
||||
|
||||
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
|
||||
# page will contain the date and time when the page was generated. Setting this
|
||||
# to NO can help when comparing the output of multiple runs.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_TIMESTAMP = NO
|
||||
|
||||
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
|
||||
# documentation will contain sections that can be hidden and shown after the
|
||||
# page has loaded.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_DYNAMIC_SECTIONS = YES
|
||||
|
||||
# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
|
||||
# shown in the various tree structured indices initially; the user can expand
|
||||
# and collapse entries dynamically later on. Doxygen will expand the tree to
|
||||
# such a level that at most the specified number of entries are visible (unless
|
||||
# a fully collapsed tree already exceeds this amount). So setting the number of
|
||||
# entries 1 will produce a full collapsed tree by default. 0 is a special value
|
||||
# representing an infinite number of entries and will result in a full expanded
|
||||
# tree by default.
|
||||
# Minimum value: 0, maximum value: 9999, default value: 100.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_INDEX_NUM_ENTRIES = 100
|
||||
|
||||
# If the GENERATE_DOCSET tag is set to YES, additional index files will be
|
||||
# generated that can be used as input for Apple's Xcode 3 integrated development
|
||||
# environment (see: http://developer.apple.com/tools/xcode/), introduced with
|
||||
# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
|
||||
# Makefile in the HTML output directory. Running make will produce the docset in
|
||||
# that directory and running make install will install the docset in
|
||||
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
|
||||
# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
|
||||
# for more information.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
GENERATE_DOCSET = NO
|
||||
|
||||
# This tag determines the name of the docset feed. A documentation feed provides
|
||||
# an umbrella under which multiple documentation sets from a single provider
|
||||
# (such as a company or product suite) can be grouped.
|
||||
# The default value is: Doxygen generated docs.
|
||||
# This tag requires that the tag GENERATE_DOCSET is set to YES.
|
||||
|
||||
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||
|
||||
# This tag specifies a string that should uniquely identify the documentation
|
||||
# set bundle. This should be a reverse domain-name style string, e.g.
|
||||
# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
|
||||
# The default value is: org.doxygen.Project.
|
||||
# This tag requires that the tag GENERATE_DOCSET is set to YES.
|
||||
|
||||
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||
|
||||
# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
|
||||
# the documentation publisher. This should be a reverse domain-name style
|
||||
# string, e.g. com.mycompany.MyDocSet.documentation.
|
||||
# The default value is: org.doxygen.Publisher.
|
||||
# This tag requires that the tag GENERATE_DOCSET is set to YES.
|
||||
|
||||
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
|
||||
|
||||
# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
|
||||
# The default value is: Publisher.
|
||||
# This tag requires that the tag GENERATE_DOCSET is set to YES.
|
||||
|
||||
DOCSET_PUBLISHER_NAME = Publisher
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
|
||||
# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
|
||||
# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
|
||||
# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
|
||||
# Windows.
|
||||
#
|
||||
# The HTML Help Workshop contains a compiler that can convert all HTML output
|
||||
# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
|
||||
# files are now used as the Windows 98 help format, and will replace the old
|
||||
# Windows help format (.hlp) on all Windows platforms in the future. Compressed
|
||||
# HTML files also contain an index, a table of contents, and you can search for
|
||||
# words in the documentation. The HTML workshop also contains a viewer for
|
||||
# compressed HTML files.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
GENERATE_HTMLHELP = NO
|
||||
|
||||
# The CHM_FILE tag can be used to specify the file name of the resulting .chm
|
||||
# file. You can add a path in front of the file if the result should not be
|
||||
# written to the html output directory.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
CHM_FILE =
|
||||
|
||||
# The HHC_LOCATION tag can be used to specify the location (absolute path
|
||||
# including file name) of the HTML help compiler (hhc.exe). If non-empty,
|
||||
# doxygen will try to run the HTML help compiler on the generated index.hhp.
|
||||
# The file has to be specified with full path.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
HHC_LOCATION =
|
||||
|
||||
# The GENERATE_CHI flag controls if a separate .chi index file is generated
|
||||
# (YES) or that it should be included in the master .chm file (NO).
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
GENERATE_CHI = NO
|
||||
|
||||
# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
|
||||
# and project file content.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
CHM_INDEX_ENCODING =
|
||||
|
||||
# The BINARY_TOC flag controls whether a binary table of contents is generated
|
||||
# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
|
||||
# enables the Previous and Next buttons.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
BINARY_TOC = NO
|
||||
|
||||
# The TOC_EXPAND flag can be set to YES to add extra items for group members to
|
||||
# the table of contents of the HTML help documentation and to the tree view.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
TOC_EXPAND = YES
|
||||
|
||||
# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
|
||||
# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
|
||||
# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
|
||||
# (.qch) of the generated HTML documentation.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
GENERATE_QHP = NO
|
||||
|
||||
# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
|
||||
# the file name of the resulting .qch file. The path specified is relative to
|
||||
# the HTML output folder.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QCH_FILE =
|
||||
|
||||
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
|
||||
# Project output. For more information please see Qt Help Project / Namespace
|
||||
# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
|
||||
# The default value is: org.doxygen.Project.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_NAMESPACE = org.doxygen.Project
|
||||
|
||||
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
|
||||
# Help Project output. For more information please see Qt Help Project / Virtual
|
||||
# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
|
||||
# folders).
|
||||
# The default value is: doc.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_VIRTUAL_FOLDER = doc
|
||||
|
||||
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
|
||||
# filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
|
||||
# filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_CUST_FILTER_NAME =
|
||||
|
||||
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
|
||||
# custom filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
|
||||
# filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_CUST_FILTER_ATTRS =
|
||||
|
||||
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
|
||||
# project's filter section matches. Qt Help Project / Filter Attributes (see:
|
||||
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_SECT_FILTER_ATTRS =
|
||||
|
||||
# The QHG_LOCATION tag can be used to specify the location of Qt's
|
||||
# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
|
||||
# generated .qhp file.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHG_LOCATION =
|
||||
|
||||
# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
|
||||
# generated, together with the HTML files, they form an Eclipse help plugin. To
|
||||
# install this plugin and make it available under the help contents menu in
|
||||
# Eclipse, the contents of the directory containing the HTML and XML files needs
|
||||
# to be copied into the plugins directory of eclipse. The name of the directory
|
||||
# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
|
||||
# After copying Eclipse needs to be restarted before the help appears.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
GENERATE_ECLIPSEHELP = NO
|
||||
|
||||
# A unique identifier for the Eclipse help plugin. When installing the plugin
|
||||
# the directory name containing the HTML and XML files should also have this
|
||||
# name. Each documentation set should have its own identifier.
|
||||
# The default value is: org.doxygen.Project.
|
||||
# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
|
||||
|
||||
ECLIPSE_DOC_ID = org.doxygen.Project
|
||||
|
||||
# If you want full control over the layout of the generated HTML pages it might
|
||||
# be necessary to disable the index and replace it with your own. The
|
||||
# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
|
||||
# of each HTML page. A value of NO enables the index and the value YES disables
|
||||
# it. Since the tabs in the index contain the same information as the navigation
|
||||
# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
DISABLE_INDEX = YES
|
||||
|
||||
# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
|
||||
# structure should be generated to display hierarchical information. If the tag
|
||||
# value is set to YES, a side panel will be generated containing a tree-like
|
||||
# index structure (just like the one that is generated for HTML Help). For this
|
||||
# to work a browser that supports JavaScript, DHTML, CSS and frames is required
|
||||
# (i.e. any modern browser). Windows users are probably better off using the
|
||||
# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
|
||||
# further fine-tune the look of the index. As an example, the default style
|
||||
# sheet generated by doxygen has an example that shows how to put an image at
|
||||
# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
|
||||
# the same information as the tab index, you could consider setting
|
||||
# DISABLE_INDEX to YES when enabling this option.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
GENERATE_TREEVIEW = YES
|
||||
|
||||
# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
|
||||
# doxygen will group on one line in the generated HTML documentation.
|
||||
#
|
||||
# Note that a value of 0 will completely suppress the enum values from appearing
|
||||
# in the overview section.
|
||||
# Minimum value: 0, maximum value: 20, default value: 4.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
ENUM_VALUES_PER_LINE = 1
|
||||
|
||||
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
|
||||
# to set the initial width (in pixels) of the frame in which the tree is shown.
|
||||
# Minimum value: 0, maximum value: 1500, default value: 250.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
TREEVIEW_WIDTH = 250
|
||||
|
||||
# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
|
||||
# external symbols imported via tag files in a separate window.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
EXT_LINKS_IN_WINDOW = NO
|
||||
|
||||
# Use this tag to change the font size of LaTeX formulas included as images in
|
||||
# the HTML documentation. When you change the font size after a successful
|
||||
# doxygen run you need to manually remove any form_*.png images from the HTML
|
||||
# output directory to force them to be regenerated.
|
||||
# Minimum value: 8, maximum value: 50, default value: 10.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
FORMULA_FONTSIZE = 10
|
||||
|
||||
# Use the FORMULA_TRANPARENT tag to determine whether or not the images
|
||||
# generated for formulas are transparent PNGs. Transparent PNGs are not
|
||||
# supported properly for IE 6.0, but are supported on all modern browsers.
|
||||
#
|
||||
# Note that when changing this option you need to delete any form_*.png files in
|
||||
# the HTML output directory before the changes have effect.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
FORMULA_TRANSPARENT = YES
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
|
||||
# http://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
|
||||
# installed or if you want to formulas look prettier in the HTML output. When
|
||||
# enabled you may also need to install MathJax separately and configure the path
|
||||
# to it using the MATHJAX_RELPATH option.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
USE_MATHJAX = NO
|
||||
|
||||
# When MathJax is enabled you can set the default output format to be used for
|
||||
# the MathJax output. See the MathJax site (see:
|
||||
# http://docs.mathjax.org/en/latest/output.html) for more details.
|
||||
# Possible values are: HTML-CSS (which is slower, but has the best
|
||||
# compatibility), NativeMML (i.e. MathML) and SVG.
|
||||
# The default value is: HTML-CSS.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_FORMAT = HTML-CSS
|
||||
|
||||
# When MathJax is enabled you need to specify the location relative to the HTML
|
||||
# output directory using the MATHJAX_RELPATH option. The destination directory
|
||||
# should contain the MathJax.js script. For instance, if the mathjax directory
|
||||
# is located at the same level as the HTML output directory, then
|
||||
# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
|
||||
# Content Delivery Network so you can quickly see the result without installing
|
||||
# MathJax. However, it is strongly recommended to install a local copy of
|
||||
# MathJax from http://www.mathjax.org before deployment.
|
||||
# The default value is: http://cdn.mathjax.org/mathjax/latest.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||
|
||||
# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
|
||||
# extension names that should be enabled during MathJax rendering. For example
|
||||
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_EXTENSIONS =
|
||||
|
||||
# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
|
||||
# of code that will be used on startup of the MathJax code. See the MathJax site
|
||||
# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
|
||||
# example see the documentation.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_CODEFILE =
|
||||
|
||||
# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
|
||||
# the HTML output. The underlying search engine uses javascript and DHTML and
|
||||
# should work on any modern browser. Note that when using HTML help
|
||||
# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
|
||||
# there is already a search function so this one should typically be disabled.
|
||||
# For large projects the javascript based search engine can be slow, then
|
||||
# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
|
||||
# search using the keyboard; to jump to the search box use <access key> + S
|
||||
# (what the <access key> is depends on the OS and browser, but it is typically
|
||||
# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
|
||||
# key> to jump into the search results window, the results can be navigated
|
||||
# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
|
||||
# the search. The filter options can be selected when the cursor is inside the
|
||||
# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
|
||||
# to select a filter and <Enter> or <escape> to activate or cancel the filter
|
||||
# option.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
SEARCHENGINE = NO
|
||||
|
||||
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
|
||||
# implemented using a web server instead of a web client using Javascript. There
|
||||
# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
|
||||
# setting. When disabled, doxygen will generate a PHP script for searching and
|
||||
# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
|
||||
# and searching needs to be provided by external tools. See the section
|
||||
# "External Indexing and Searching" for details.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
SERVER_BASED_SEARCH = NO
|
||||
|
||||
# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
|
||||
# script for searching. Instead the search results are written to an XML file
|
||||
# which needs to be processed by an external indexer. Doxygen will invoke an
|
||||
# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
|
||||
# search results.
|
||||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: http://xapian.org/).
|
||||
#
|
||||
# See the section "External Indexing and Searching" for details.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
EXTERNAL_SEARCH = NO
|
||||
|
||||
# The SEARCHENGINE_URL should point to a search engine hosted by a web server
|
||||
# which will return the search results when EXTERNAL_SEARCH is enabled.
|
||||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: http://xapian.org/). See the section "External Indexing and
|
||||
# Searching" for details.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
SEARCHENGINE_URL =
|
||||
|
||||
# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
|
||||
# search data is written to a file for indexing by an external tool. With the
|
||||
# SEARCHDATA_FILE tag the name of this file can be specified.
|
||||
# The default file is: searchdata.xml.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
SEARCHDATA_FILE = searchdata.xml
|
||||
|
||||
# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
|
||||
# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
|
||||
# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
|
||||
# projects and redirect the results back to the right project.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
EXTERNAL_SEARCH_ID =
|
||||
|
||||
# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
|
||||
# projects other than the one defined by this configuration file, but that are
|
||||
# all added to the same external search index. Each project needs to have a
|
||||
# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
|
||||
# to a relative location where the documentation can be found. The format is:
|
||||
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
EXTRA_SEARCH_MAPPINGS =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
|
||||
# The default value is: YES.
|
||||
|
||||
GENERATE_LATEX = NO
|
||||
|
||||
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
|
||||
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
|
||||
# it.
|
||||
# The default directory is: latex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_OUTPUT = latex
|
||||
|
||||
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
|
||||
# invoked.
|
||||
#
|
||||
# Note that when enabling USE_PDFLATEX this option is only used for generating
|
||||
# bitmaps for formulas in the HTML output, but not in the Makefile that is
|
||||
# written to the output directory.
|
||||
# The default file is: latex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_CMD_NAME = latex
|
||||
|
||||
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
|
||||
# index for LaTeX.
|
||||
# The default file is: makeindex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
|
||||
# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
|
||||
# documents. This may be useful for small projects and may help to save some
|
||||
# trees in general.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
COMPACT_LATEX = NO
|
||||
|
||||
# The PAPER_TYPE tag can be used to set the paper type that is used by the
|
||||
# printer.
|
||||
# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
|
||||
# 14 inches) and executive (7.25 x 10.5 inches).
|
||||
# The default value is: a4.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
PAPER_TYPE = a4wide
|
||||
|
||||
# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
|
||||
# that should be included in the LaTeX output. To get the times font for
|
||||
# instance you can specify
|
||||
# EXTRA_PACKAGES=times
|
||||
# If left blank no extra packages will be included.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
EXTRA_PACKAGES =
|
||||
|
||||
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
|
||||
# generated LaTeX document. The header should contain everything until the first
|
||||
# chapter. If it is left blank doxygen will generate a standard header. See
|
||||
# section "Doxygen usage" for information on how to let doxygen write the
|
||||
# default header to a separate file.
|
||||
#
|
||||
# Note: Only use a user-defined header if you know what you are doing! The
|
||||
# following commands have a special meaning inside the header: $title,
|
||||
# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
|
||||
# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
|
||||
# string, for the replacement values of the other commands the user is referred
|
||||
# to HTML_HEADER.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_HEADER =
|
||||
|
||||
# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
|
||||
# generated LaTeX document. The footer should contain everything after the last
|
||||
# chapter. If it is left blank doxygen will generate a standard footer. See
|
||||
# LATEX_HEADER for more information on how to generate a default footer and what
|
||||
# special commands can be used inside the footer.
|
||||
#
|
||||
# Note: Only use a user-defined footer if you know what you are doing!
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_FOOTER =
|
||||
|
||||
# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
|
||||
# LaTeX style sheets that are included after the standard style sheets created
|
||||
# by doxygen. Using this option one can overrule certain style aspects. Doxygen
|
||||
# will copy the style sheet files to the output directory.
|
||||
# Note: The order of the extra style sheet files is of importance (e.g. the last
|
||||
# style sheet in the list overrules the setting of the previous ones in the
|
||||
# list).
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_EXTRA_STYLESHEET =
|
||||
|
||||
# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
|
||||
# other source files which should be copied to the LATEX_OUTPUT output
|
||||
# directory. Note that the files will be copied as-is; there are no commands or
|
||||
# markers available.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_EXTRA_FILES =
|
||||
|
||||
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
|
||||
# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
|
||||
# contain links (just like the HTML output) instead of page references. This
|
||||
# makes the output suitable for online browsing using a PDF viewer.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
PDF_HYPERLINKS = YES
|
||||
|
||||
# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
|
||||
# the PDF file directly from the LaTeX files. Set this option to YES, to get a
|
||||
# higher quality PDF documentation.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
USE_PDFLATEX = YES
|
||||
|
||||
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
|
||||
# command to the generated LaTeX files. This will instruct LaTeX to keep running
|
||||
# if errors occur, instead of asking the user for help. This option is also used
|
||||
# when generating formulas in HTML.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_BATCHMODE = NO
|
||||
|
||||
# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
|
||||
# index chapters (such as File Index, Compound Index, etc.) in the output.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_HIDE_INDICES = NO
|
||||
|
||||
# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
|
||||
# code with syntax highlighting in the LaTeX output.
|
||||
#
|
||||
# Note that which sources are shown also depends on other settings such as
|
||||
# SOURCE_BROWSER.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_SOURCE_CODE = NO
|
||||
|
||||
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
|
||||
# bibliography, e.g. plainnat, or ieeetr. See
|
||||
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
|
||||
# The default value is: plain.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_BIB_STYLE = plain
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
|
||||
# RTF output is optimized for Word 97 and may not look too pretty with other RTF
|
||||
# readers/editors.
|
||||
# The default value is: NO.
|
||||
|
||||
GENERATE_RTF = NO
|
||||
|
||||
# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
|
||||
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
|
||||
# it.
|
||||
# The default directory is: rtf.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_OUTPUT = rtf
|
||||
|
||||
# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
|
||||
# documents. This may be useful for small projects and may help to save some
|
||||
# trees in general.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
COMPACT_RTF = NO
|
||||
|
||||
# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
|
||||
# contain hyperlink fields. The RTF file will contain links (just like the HTML
|
||||
# output) instead of page references. This makes the output suitable for online
|
||||
# browsing using Word or some other Word compatible readers that support those
|
||||
# fields.
|
||||
#
|
||||
# Note: WordPad (write) and others do not support links.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_HYPERLINKS = NO
|
||||
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's config
|
||||
# file, i.e. a series of assignments. You only have to provide replacements,
|
||||
# missing definitions are set to their default value.
|
||||
#
|
||||
# See also section "Doxygen usage" for information on how to generate the
|
||||
# default style sheet that doxygen normally uses.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_STYLESHEET_FILE =
|
||||
|
||||
# Set optional variables used in the generation of an RTF document. Syntax is
|
||||
# similar to doxygen's config file. A template extensions file can be generated
|
||||
# using doxygen -e rtf extensionFile.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_EXTENSIONS_FILE =
|
||||
|
||||
# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
|
||||
# with syntax highlighting in the RTF output.
|
||||
#
|
||||
# Note that which sources are shown also depends on other settings such as
|
||||
# SOURCE_BROWSER.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_SOURCE_CODE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
|
||||
# classes and files.
|
||||
# The default value is: NO.
|
||||
|
||||
GENERATE_MAN = NO
|
||||
|
||||
# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
|
||||
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
|
||||
# it. A directory man3 will be created inside the directory specified by
|
||||
# MAN_OUTPUT.
|
||||
# The default directory is: man.
|
||||
# This tag requires that the tag GENERATE_MAN is set to YES.
|
||||
|
||||
MAN_OUTPUT = man
|
||||
|
||||
# The MAN_EXTENSION tag determines the extension that is added to the generated
|
||||
# man pages. In case the manual section does not start with a number, the number
|
||||
# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
|
||||
# optional.
|
||||
# The default value is: .3.
|
||||
# This tag requires that the tag GENERATE_MAN is set to YES.
|
||||
|
||||
MAN_EXTENSION = .3
|
||||
|
||||
# The MAN_SUBDIR tag determines the name of the directory created within
|
||||
# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
|
||||
# MAN_EXTENSION with the initial . removed.
|
||||
# This tag requires that the tag GENERATE_MAN is set to YES.
|
||||
|
||||
MAN_SUBDIR =
|
||||
|
||||
# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
|
||||
# will generate one additional man file for each entity documented in the real
|
||||
# man page(s). These additional files only source the real man page, but without
|
||||
# them the man command would be unable to find the correct page.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_MAN is set to YES.
|
||||
|
||||
MAN_LINKS = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
|
||||
# captures the structure of the code including all documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
GENERATE_XML = NO
|
||||
|
||||
# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
|
||||
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
|
||||
# it.
|
||||
# The default directory is: xml.
|
||||
# This tag requires that the tag GENERATE_XML is set to YES.
|
||||
|
||||
XML_OUTPUT = xml
|
||||
|
||||
# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
|
||||
# listings (including syntax highlighting and cross-referencing information) to
|
||||
# the XML output. Note that enabling this will significantly increase the size
|
||||
# of the XML output.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_XML is set to YES.
|
||||
|
||||
XML_PROGRAMLISTING = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the DOCBOOK output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
|
||||
# that can be used to generate PDF.
|
||||
# The default value is: NO.
|
||||
|
||||
GENERATE_DOCBOOK = NO
|
||||
|
||||
# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
|
||||
# front of it.
|
||||
# The default directory is: docbook.
|
||||
# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
|
||||
|
||||
DOCBOOK_OUTPUT = docbook
|
||||
|
||||
# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
|
||||
# program listings (including syntax highlighting and cross-referencing
|
||||
# information) to the DOCBOOK output. Note that enabling this will significantly
|
||||
# increase the size of the DOCBOOK output.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
|
||||
|
||||
DOCBOOK_PROGRAMLISTING = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
|
||||
# AutoGen Definitions (see http://autogen.sf.net) file that captures the
|
||||
# structure of the code including all documentation. Note that this feature is
|
||||
# still experimental and incomplete at the moment.
|
||||
# The default value is: NO.
|
||||
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
|
||||
# file that captures the structure of the code including all documentation.
|
||||
#
|
||||
# Note that this feature is still experimental and incomplete at the moment.
|
||||
# The default value is: NO.
|
||||
|
||||
GENERATE_PERLMOD = NO
|
||||
|
||||
# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
|
||||
# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
|
||||
# output from the Perl module output.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
|
||||
|
||||
PERLMOD_LATEX = NO
|
||||
|
||||
# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
|
||||
# formatted so it can be parsed by a human reader. This is useful if you want to
|
||||
# understand what is going on. On the other hand, if this tag is set to NO, the
|
||||
# size of the Perl module output will be much smaller and Perl will parse it
|
||||
# just the same.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
|
||||
|
||||
PERLMOD_PRETTY = YES
|
||||
|
||||
# The names of the make variables in the generated doxyrules.make file are
|
||||
# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
|
||||
# so different doxyrules.make files included by the same Makefile don't
|
||||
# overwrite each other's variables.
|
||||
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
|
||||
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
|
||||
# C-preprocessor directives found in the sources and include files.
|
||||
# The default value is: YES.
|
||||
|
||||
ENABLE_PREPROCESSING = YES
|
||||
|
||||
# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
|
||||
# in the source code. If set to NO, only conditional compilation will be
|
||||
# performed. Macro expansion can be done in a controlled way by setting
|
||||
# EXPAND_ONLY_PREDEF to YES.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
MACRO_EXPANSION = YES
|
||||
|
||||
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
|
||||
# the macro expansion is limited to the macros specified with the PREDEFINED and
|
||||
# EXPAND_AS_DEFINED tags.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
EXPAND_ONLY_PREDEF = YES
|
||||
|
||||
# If the SEARCH_INCLUDES tag is set to YES, the include files in the
|
||||
# INCLUDE_PATH will be searched if a #include is found.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
SEARCH_INCLUDES = YES
|
||||
|
||||
# The INCLUDE_PATH tag can be used to specify one or more directories that
|
||||
# contain include files that are not input files but should be processed by the
|
||||
# preprocessor.
|
||||
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
|
||||
|
||||
INCLUDE_PATH =
|
||||
|
||||
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
||||
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
||||
# directories. If left blank, the patterns specified with FILE_PATTERNS will be
|
||||
# used.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
|
||||
# The PREDEFINED tag can be used to specify one or more macro names that are
|
||||
# defined before the preprocessor is started (similar to the -D option of e.g.
|
||||
# gcc). The argument of the tag is a list of macros of the form: name or
|
||||
# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
|
||||
# is assumed. To prevent a macro definition from being undefined via #undef or
|
||||
# recursively expanded use the := operator instead of the = operator.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
PREDEFINED = __DOXYGEN__ \
|
||||
PROGMEM
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||
# tag can be used to specify a list of macro names that should be expanded. The
|
||||
# macro definition that is found in the sources will be used. Use the PREDEFINED
|
||||
# tag if you want to use a different macro definition that overrules the
|
||||
# definition found in the source code.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
EXPAND_AS_DEFINED =
|
||||
|
||||
# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
|
||||
# remove all references to function-like macros that are alone on a line, have
|
||||
# an all uppercase name, and do not end with a semicolon. Such function macros
|
||||
# are typically used for boiler-plate code, and will confuse the parser if not
|
||||
# removed.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# The TAGFILES tag can be used to specify one or more tag files. For each tag
|
||||
# file the location of the external documentation should be added. The format of
|
||||
# a tag file without this location is as follows:
|
||||
# TAGFILES = file1 file2 ...
|
||||
# Adding location for the tag files is done as follows:
|
||||
# TAGFILES = file1=loc1 "file2 = loc2" ...
|
||||
# where loc1 and loc2 can be relative or absolute paths or URLs. See the
|
||||
# section "Linking to external documentation" for more information about the use
|
||||
# of tag files.
|
||||
# Note: Each tag file must have a unique name (where the name does NOT include
|
||||
# the path). If a tag file is not located in the directory in which doxygen is
|
||||
# run, you must also specify the path to the tagfile here.
|
||||
|
||||
TAGFILES =
|
||||
|
||||
# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
|
||||
# tag file that is based on the input files it reads. See section "Linking to
|
||||
# external documentation" for more information about the usage of tag files.
|
||||
|
||||
GENERATE_TAGFILE =
|
||||
|
||||
# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
|
||||
# the class index. If set to NO, only the inherited external classes will be
|
||||
# listed.
|
||||
# The default value is: NO.
|
||||
|
||||
ALLEXTERNALS = NO
|
||||
|
||||
# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
|
||||
# in the modules index. If set to NO, only the current project's groups will be
|
||||
# listed.
|
||||
# The default value is: YES.
|
||||
|
||||
EXTERNAL_GROUPS = YES
|
||||
|
||||
# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
|
||||
# the related pages index. If set to NO, only the current project's pages will
|
||||
# be listed.
|
||||
# The default value is: YES.
|
||||
|
||||
EXTERNAL_PAGES = YES
|
||||
|
||||
# The PERL_PATH should be the absolute path and name of the perl script
|
||||
# interpreter (i.e. the result of 'which perl').
|
||||
# The default file (with absolute path) is: /usr/bin/perl.
|
||||
|
||||
PERL_PATH = /usr/bin/perl
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
|
||||
# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
|
||||
# NO turns the diagrams off. Note that this option also works with HAVE_DOT
|
||||
# disabled, but it is recommended to install and use dot, since it yields more
|
||||
# powerful graphs.
|
||||
# The default value is: YES.
|
||||
|
||||
CLASS_DIAGRAMS = NO
|
||||
|
||||
# You can define message sequence charts within doxygen comments using the \msc
|
||||
# command. Doxygen will then run the mscgen tool (see:
|
||||
# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
|
||||
# documentation. The MSCGEN_PATH tag allows you to specify the directory where
|
||||
# the mscgen tool resides. If left empty the tool is assumed to be found in the
|
||||
# default search path.
|
||||
|
||||
MSCGEN_PATH =
|
||||
|
||||
# You can include diagrams made with dia in doxygen documentation. Doxygen will
|
||||
# then run dia to produce the diagram and insert it in the documentation. The
|
||||
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
|
||||
# If left empty dia is assumed to be found in the default search path.
|
||||
|
||||
DIA_PATH =
|
||||
|
||||
# If set to YES the inheritance and collaboration graphs will hide inheritance
|
||||
# and usage relations if the target is undocumented or is not a class.
|
||||
# The default value is: YES.
|
||||
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
|
||||
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
|
||||
# available from the path. This tool is part of Graphviz (see:
|
||||
# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
|
||||
# Bell Labs. The other options in this section have no effect if this option is
|
||||
# set to NO
|
||||
# The default value is: NO.
|
||||
|
||||
HAVE_DOT = NO
|
||||
|
||||
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
|
||||
# to run in parallel. When set to 0 doxygen will base this on the number of
|
||||
# processors available in the system. You can set it explicitly to a value
|
||||
# larger than 0 to get control over the balance between CPU load and processing
|
||||
# speed.
|
||||
# Minimum value: 0, maximum value: 32, default value: 0.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_NUM_THREADS = 0
|
||||
|
||||
# When you want a differently looking font in the dot files that doxygen
|
||||
# generates you can specify the font name using DOT_FONTNAME. You need to make
|
||||
# sure dot is able to find the font, which can be done by putting it in a
|
||||
# standard location or by setting the DOTFONTPATH environment variable or by
|
||||
# setting DOT_FONTPATH to the directory containing the font.
|
||||
# The default value is: Helvetica.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_FONTNAME =
|
||||
|
||||
# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
|
||||
# dot graphs.
|
||||
# Minimum value: 4, maximum value: 24, default value: 10.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_FONTSIZE = 10
|
||||
|
||||
# By default doxygen will tell dot to use the default font as specified with
|
||||
# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
|
||||
# the path where dot can find it using this tag.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_FONTPATH =
|
||||
|
||||
# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
|
||||
# each documented class showing the direct and indirect inheritance relations.
|
||||
# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
CLASS_GRAPH = NO
|
||||
|
||||
# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
|
||||
# graph for each documented class showing the direct and indirect implementation
|
||||
# dependencies (inheritance, containment, and class references variables) of the
|
||||
# class with other documented classes.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
COLLABORATION_GRAPH = NO
|
||||
|
||||
# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
|
||||
# groups, showing the direct groups dependencies.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
GROUP_GRAPHS = NO
|
||||
|
||||
# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
|
||||
# collaboration diagrams in a style similar to the OMG's Unified Modeling
|
||||
# Language.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
UML_LOOK = NO
|
||||
|
||||
# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
|
||||
# class node. If there are many fields or methods and many nodes the graph may
|
||||
# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
|
||||
# number of items for each type to make the size more manageable. Set this to 0
|
||||
# for no limit. Note that the threshold may be exceeded by 50% before the limit
|
||||
# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
|
||||
# but if the number exceeds 15, the total amount of fields shown is limited to
|
||||
# 10.
|
||||
# Minimum value: 0, maximum value: 100, default value: 10.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
UML_LIMIT_NUM_FIELDS = 10
|
||||
|
||||
# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
|
||||
# collaboration graphs will show the relations between templates and their
|
||||
# instances.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
TEMPLATE_RELATIONS = NO
|
||||
|
||||
# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
|
||||
# YES then doxygen will generate a graph for each documented file showing the
|
||||
# direct and indirect include dependencies of the file with other documented
|
||||
# files.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
INCLUDE_GRAPH = NO
|
||||
|
||||
# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
|
||||
# set to YES then doxygen will generate a graph for each documented file showing
|
||||
# the direct and indirect include dependencies of the file with other documented
|
||||
# files.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
INCLUDED_BY_GRAPH = NO
|
||||
|
||||
# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
|
||||
# dependency graph for every global function or class method.
|
||||
#
|
||||
# Note that enabling this option will significantly increase the time of a run.
|
||||
# So in most cases it will be better to enable call graphs for selected
|
||||
# functions only using the \callgraph command.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
CALL_GRAPH = NO
|
||||
|
||||
# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
|
||||
# dependency graph for every global function or class method.
|
||||
#
|
||||
# Note that enabling this option will significantly increase the time of a run.
|
||||
# So in most cases it will be better to enable caller graphs for selected
|
||||
# functions only using the \callergraph command.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
CALLER_GRAPH = NO
|
||||
|
||||
# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
|
||||
# hierarchy of all classes instead of a textual one.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
GRAPHICAL_HIERARCHY = NO
|
||||
|
||||
# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
|
||||
# dependencies a directory has on other directories in a graphical way. The
|
||||
# dependency relations are determined by the #include relations between the
|
||||
# files in the directories.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DIRECTORY_GRAPH = NO
|
||||
|
||||
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
|
||||
# generated by dot.
|
||||
# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
|
||||
# to make the SVG files visible in IE 9+ (other browsers do not have this
|
||||
# requirement).
|
||||
# Possible values are: png, jpg, gif and svg.
|
||||
# The default value is: png.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_IMAGE_FORMAT = png
|
||||
|
||||
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
|
||||
# enable generation of interactive SVG images that allow zooming and panning.
|
||||
#
|
||||
# Note that this requires a modern browser other than Internet Explorer. Tested
|
||||
# and working are Firefox, Chrome, Safari, and Opera.
|
||||
# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
|
||||
# the SVG files visible. Older versions of IE do not have SVG support.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
INTERACTIVE_SVG = NO
|
||||
|
||||
# The DOT_PATH tag can be used to specify the path where the dot tool can be
|
||||
# found. If left blank, it is assumed the dot tool can be found in the path.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_PATH =
|
||||
|
||||
# The DOTFILE_DIRS tag can be used to specify one or more directories that
|
||||
# contain dot files that are included in the documentation (see the \dotfile
|
||||
# command).
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOTFILE_DIRS =
|
||||
|
||||
# The MSCFILE_DIRS tag can be used to specify one or more directories that
|
||||
# contain msc files that are included in the documentation (see the \mscfile
|
||||
# command).
|
||||
|
||||
MSCFILE_DIRS =
|
||||
|
||||
# The DIAFILE_DIRS tag can be used to specify one or more directories that
|
||||
# contain dia files that are included in the documentation (see the \diafile
|
||||
# command).
|
||||
|
||||
DIAFILE_DIRS =
|
||||
|
||||
# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
|
||||
# path where java can find the plantuml.jar file. If left blank, it is assumed
|
||||
# PlantUML is not used or called during a preprocessing step. Doxygen will
|
||||
# generate a warning when it encounters a \startuml command in this case and
|
||||
# will not generate output for the diagram.
|
||||
|
||||
PLANTUML_JAR_PATH =
|
||||
|
||||
# When using plantuml, the specified paths are searched for files specified by
|
||||
# the !include statement in a plantuml block.
|
||||
|
||||
PLANTUML_INCLUDE_PATH =
|
||||
|
||||
# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
|
||||
# that will be shown in the graph. If the number of nodes in a graph becomes
|
||||
# larger than this value, doxygen will truncate the graph, which is visualized
|
||||
# by representing a node as a red box. Note that doxygen if the number of direct
|
||||
# children of the root node in a graph is already larger than
|
||||
# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
|
||||
# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
|
||||
# Minimum value: 0, maximum value: 10000, default value: 50.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_GRAPH_MAX_NODES = 15
|
||||
|
||||
# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
|
||||
# generated by dot. A depth value of 3 means that only nodes reachable from the
|
||||
# root by following a path via at most 3 edges will be shown. Nodes that lay
|
||||
# further from the root node will be omitted. Note that setting this option to 1
|
||||
# or 2 may greatly reduce the computation time needed for large code bases. Also
|
||||
# note that the size of a graph can be further restricted by
|
||||
# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
|
||||
# Minimum value: 0, maximum value: 1000, default value: 0.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
MAX_DOT_GRAPH_DEPTH = 2
|
||||
|
||||
# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
|
||||
# background. This is disabled by default, because dot on Windows does not seem
|
||||
# to support this out of the box.
|
||||
#
|
||||
# Warning: Depending on the platform used, enabling this option may lead to
|
||||
# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
|
||||
# read).
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_TRANSPARENT = YES
|
||||
|
||||
# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
|
||||
# files in one run (i.e. multiple -o and -T options on the command line). This
|
||||
# makes dot run faster, but since only newer versions of dot (>1.8.10) support
|
||||
# this, this feature is disabled by default.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_MULTI_TARGETS = NO
|
||||
|
||||
# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
|
||||
# explaining the meaning of the various boxes and arrows in the dot generated
|
||||
# graphs.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
GENERATE_LEGEND = YES
|
||||
|
||||
# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
|
||||
# files that are used to generate the various graphs.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_CLEANUP = YES
|
BIN
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/hid_bootloader_cli
Executable file
BIN
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/hid_bootloader_cli
Executable file
Binary file not shown.
44
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/makefile
Normal file
44
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/makefile
Normal file
@ -0,0 +1,44 @@
|
||||
#
|
||||
# LUFA Library
|
||||
# Copyright (C) Dean Camera, 2015.
|
||||
#
|
||||
# dean [at] fourwalledcubicle [dot] com
|
||||
# www.lufa-lib.org
|
||||
#
|
||||
# --------------------------------------
|
||||
# LUFA Project Makefile.
|
||||
# --------------------------------------
|
||||
|
||||
# Run "make help" for target help.
|
||||
|
||||
MCU = atmega32u4
|
||||
ARCH = AVR8
|
||||
#BOARD = OLIMEX32U4
|
||||
F_CPU = 16000000
|
||||
F_USB = $(F_CPU)
|
||||
OPTIMIZATION = s
|
||||
TARGET = KeyboardMouse
|
||||
SRC = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_TWI)
|
||||
LUFA_PATH = ../lufa-LUFA-151115/LUFA
|
||||
#LUFA_PATH = ../lufa-LUFA-170418/LUFA
|
||||
CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/
|
||||
LD_FLAGS =
|
||||
FLASH_SIZE_KB = 32
|
||||
BOOT_SECTION_SIZE_KB = 4
|
||||
# Default target
|
||||
all:
|
||||
|
||||
# Include LUFA build script makefiles
|
||||
include $(LUFA_PATH)/Build/lufa_core.mk
|
||||
include $(LUFA_PATH)/Build/lufa_sources.mk
|
||||
include $(LUFA_PATH)/Build/lufa_build.mk
|
||||
include $(LUFA_PATH)/Build/lufa_cppcheck.mk
|
||||
include $(LUFA_PATH)/Build/lufa_doxygen.mk
|
||||
include $(LUFA_PATH)/Build/lufa_dfu.mk
|
||||
include $(LUFA_PATH)/Build/lufa_hid.mk
|
||||
include $(LUFA_PATH)/Build/lufa_avrdude.mk
|
||||
include $(LUFA_PATH)/Build/lufa_atprogram.mk
|
||||
|
||||
#install:
|
||||
#avrdude -pm32u4 -cavr109 -P/dev/ttyACM0 -Uflash:w:KeyboardMouse.hex:a
|
||||
#avrdude -V -D -pm32u4 -cstk500v2 -P/dev/ttyACM0 -Uflash:w:KeyboardMouse.hex:a -U hfuse:w:0xD9:m
|
3659
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/running.config
Normal file
3659
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/running.config
Normal file
File diff suppressed because it is too large
Load Diff
1
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/update
Executable file
1
SOFTWARE/A64-TERES/TERES-KBD-RELEASE/TERES-HID/update
Executable file
@ -0,0 +1 @@
|
||||
./hid_bootloader_cli KeyboardMouse.hex
|
5
SOFTWARE/A64-TERES/sunxi-pack-tools/.gitignore
vendored
Normal file
5
SOFTWARE/A64-TERES/sunxi-pack-tools/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
merge_uboot/merge_uboot
|
||||
update_uboot_fdt/update_uboot_fdt
|
||||
update_uboot/update_uboot
|
||||
script/script
|
||||
/bin
|
339
SOFTWARE/A64-TERES/sunxi-pack-tools/LICENSE.txt
Normal file
339
SOFTWARE/A64-TERES/sunxi-pack-tools/LICENSE.txt
Normal file
@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
16
SOFTWARE/A64-TERES/sunxi-pack-tools/Makefile
Normal file
16
SOFTWARE/A64-TERES/sunxi-pack-tools/Makefile
Normal file
@ -0,0 +1,16 @@
|
||||
SUBDIRS := merge_uboot update_uboot_fdt update_uboot script
|
||||
|
||||
all: $(SUBDIRS)
|
||||
|
||||
bin:
|
||||
mkdir -p bin/
|
||||
|
||||
$(SUBDIRS): bin
|
||||
$(MAKE) -C $@
|
||||
cp -va $@/$@ bin/
|
||||
|
||||
clean:
|
||||
-for d in $(SUBDIRS); do ($(MAKE) -C $$d clean); done
|
||||
-$(RM) -rf bin
|
||||
|
||||
.PHONY: all clean $(SUBDIRS)
|
8
SOFTWARE/A64-TERES/sunxi-pack-tools/merge_uboot/makefile
Normal file
8
SOFTWARE/A64-TERES/sunxi-pack-tools/merge_uboot/makefile
Normal file
@ -0,0 +1,8 @@
|
||||
objects = merge_uboot.o
|
||||
edit:$(objects)
|
||||
gcc -o merge_uboot $(objects) -static
|
||||
rm -rf $(objects)
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf merge_uboot $(objects)
|
219
SOFTWARE/A64-TERES/sunxi-pack-tools/merge_uboot/merge_uboot.c
Normal file
219
SOFTWARE/A64-TERES/sunxi-pack-tools/merge_uboot/merge_uboot.c
Normal file
@ -0,0 +1,219 @@
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include "uboot_head.h"
|
||||
|
||||
#define ANDR_BOOT_MAGIC "ANDROID!"
|
||||
#define ANDR_BOOT_MAGIC_SIZE 8
|
||||
#define ANDR_BOOT_NAME_SIZE 16
|
||||
#define ANDR_BOOT_ARGS_SIZE 512
|
||||
|
||||
typedef unsigned int u32;
|
||||
|
||||
|
||||
|
||||
void Usage(void)
|
||||
{
|
||||
printf("\n");
|
||||
printf("Usage:\n");
|
||||
printf("merge some file to then end of uboot\n");
|
||||
printf("merge_uboot.exe u-boot.bin infile outfile mode[secmonitor|secos|scp]\n\n");
|
||||
}
|
||||
|
||||
u32 randto1k(u32 num)
|
||||
{
|
||||
if(num % 1024)
|
||||
{
|
||||
printf("merge_uboot: num %d randto1k\n", num);
|
||||
return ((num+1023)/1024 * 1024);
|
||||
}
|
||||
else
|
||||
{
|
||||
return num;
|
||||
}
|
||||
}
|
||||
|
||||
int IsFullName(const char *FilePath)
|
||||
{
|
||||
if (isalpha(FilePath[0]) && ':' == FilePath[1])
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void GetFullPath(char *dName, const char *sName)
|
||||
{
|
||||
char Buffer[256];
|
||||
|
||||
if(IsFullName(sName))
|
||||
{
|
||||
strcpy(dName, sName);
|
||||
return ;
|
||||
}
|
||||
|
||||
/* Get the current working directory: */
|
||||
if(getcwd(Buffer, 256 ) == NULL)
|
||||
{
|
||||
perror( "getcwd error" );
|
||||
return ;
|
||||
}
|
||||
sprintf(dName, "%s/%s", Buffer, sName);
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
char file_name1[256];
|
||||
char file_name2[256];
|
||||
char file_name3[256];
|
||||
char file_mode[32];
|
||||
FILE *file1 = NULL;
|
||||
FILE *file2 = NULL;
|
||||
FILE *file3 = NULL;
|
||||
unsigned int file1_len, file2_len,file1_len_align,file2_len_align;
|
||||
unsigned char *file1_buffer = NULL;
|
||||
unsigned char *file2_buffer = NULL;
|
||||
unsigned char *file_dst_buffer = NULL;
|
||||
|
||||
struct spare_boot_head_t * img_hdr = NULL;
|
||||
if(argc != 5 )
|
||||
{
|
||||
Usage();
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("merge_uboot: %s will merge %s, generate %s, mode %s\n", argv[1], argv[2], argv[3],argv[4]);
|
||||
memset(file_name1, 0, sizeof(file_name1));
|
||||
memset(file_name2, 0, sizeof(file_name2));
|
||||
memset(file_name3, 0, sizeof(file_name3));
|
||||
|
||||
|
||||
/*strcpy(file_name1, "boot.img");
|
||||
strcpy(file_name2, "sun50iw1p1.dtb");
|
||||
strcpy(file_name3, "test.img");*/
|
||||
GetFullPath(file_name1, argv[1]);
|
||||
GetFullPath(file_name2, argv[2]);
|
||||
GetFullPath(file_name3, argv[3]);
|
||||
strcpy(file_mode,argv[4]);
|
||||
|
||||
//printf("%s will concatenate %s, generate %s", file_name1, file_name2, file_name3);
|
||||
|
||||
|
||||
file1 = fopen(file_name1, "rb");
|
||||
if(!file1)
|
||||
{
|
||||
printf("unable to open file %s\n", file_name1);
|
||||
|
||||
goto _err_out;
|
||||
}
|
||||
|
||||
file2 = fopen(file_name2, "rb");
|
||||
if(!file2)
|
||||
{
|
||||
printf("unable to open file %s\n", file_name2);
|
||||
|
||||
goto _err_out;
|
||||
}
|
||||
|
||||
//file1
|
||||
fseek(file1, 0, SEEK_END);
|
||||
file1_len = ftell(file1);
|
||||
fseek(file1, 0, SEEK_SET);
|
||||
|
||||
file1_buffer = (char *)malloc(file1_len+1);
|
||||
if(file1_buffer == NULL)
|
||||
{
|
||||
printf("unable to malloc memory for udpate_fdt \n");
|
||||
goto _err_out;
|
||||
}
|
||||
memset(file1_buffer,0,file1_len+1);
|
||||
fread(file1_buffer, 1, file1_len, file1);
|
||||
fclose(file1); file1 = NULL;
|
||||
|
||||
//img_hdr = (struct andr_img_hdr *)file1_buffer;
|
||||
img_hdr = (struct spare_boot_head_t *)file1_buffer;
|
||||
if (memcmp(img_hdr->boot_head.magic, UBOOT_MAGIC, 5)) {
|
||||
puts("merge_uboot: bad boot image magic, maybe not a uboot?\n");
|
||||
goto _err_out;
|
||||
}
|
||||
|
||||
//file2
|
||||
fseek(file2, 0, SEEK_END);
|
||||
file2_len = ftell(file2);
|
||||
fseek(file2, 0, SEEK_SET);
|
||||
|
||||
file2_buffer = (char *)malloc(file2_len+1);
|
||||
if(file2_buffer == NULL)
|
||||
{
|
||||
printf("unable to malloc memory for udpate_fdt \n");
|
||||
goto _err_out;
|
||||
}
|
||||
memset(file2_buffer,0,file2_len+1);
|
||||
fread(file2_buffer, 1, file2_len, file2);
|
||||
fclose(file2); file2=NULL;
|
||||
|
||||
|
||||
file1_len_align = randto1k(file1_len);
|
||||
file2_len_align = randto1k(file2_len);
|
||||
printf("file1_len = %x, file2_len = %x\n", file1_len_align, file2_len_align);
|
||||
|
||||
//update head
|
||||
if(strcmp(file_mode,"secmonitor") == 0)
|
||||
{
|
||||
img_hdr->boot_ext[0].data[0] = file1_len_align; //offset
|
||||
img_hdr->boot_ext[0].data[1] = file2_len_align; //size
|
||||
}
|
||||
else if(strcmp(file_mode,"secos") == 0)
|
||||
{
|
||||
img_hdr->boot_ext[1].data[0] = file1_len_align; //offset
|
||||
img_hdr->boot_ext[1].data[1] = file2_len_align; //size
|
||||
}
|
||||
else if(strcmp(file_mode,"scp") == 0)
|
||||
{
|
||||
img_hdr->boot_ext[2].data[0] = file1_len_align; //offset
|
||||
img_hdr->boot_ext[2].data[1] = file2_len_align; //size
|
||||
}
|
||||
else
|
||||
{
|
||||
Usage();
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("file[%s] offset %x,size %x \n",file_mode, file1_len_align,file2_len_align);
|
||||
|
||||
|
||||
file_dst_buffer = (char *)malloc(file1_len_align+file2_len_align);
|
||||
if(file_dst_buffer == NULL)
|
||||
{
|
||||
printf("unable to malloc memory for udpate_fdt \n");
|
||||
goto _err_out;
|
||||
}
|
||||
memset(file_dst_buffer,0, file1_len_align+file2_len_align);
|
||||
memcpy(file_dst_buffer, file1_buffer, file1_len);
|
||||
memcpy(file_dst_buffer+file1_len_align, file2_buffer, file2_len);
|
||||
|
||||
file3 = fopen(file_name3, "wb");
|
||||
if(!file3)
|
||||
{
|
||||
printf("unable to open file %s\n", file_name3);
|
||||
goto _err_out;
|
||||
}
|
||||
fwrite(file_dst_buffer, file1_len_align+file2_len_align, 1, file3);
|
||||
fclose(file3); file3 = NULL;
|
||||
|
||||
printf("merge_uboot:genrate %s ok\n",file_name3);
|
||||
free(file_dst_buffer);
|
||||
free(file1_buffer);
|
||||
free(file2_buffer);
|
||||
return 0;
|
||||
|
||||
_err_out:
|
||||
if(file_dst_buffer != NULL) free(file_dst_buffer);
|
||||
if(file1_buffer != NULL) free(file1_buffer);
|
||||
if(file2_buffer != NULL) free(file2_buffer);
|
||||
|
||||
return -1;
|
||||
}
|
74
SOFTWARE/A64-TERES/sunxi-pack-tools/merge_uboot/uboot_head.h
Normal file
74
SOFTWARE/A64-TERES/sunxi-pack-tools/merge_uboot/uboot_head.h
Normal file
@ -0,0 +1,74 @@
|
||||
|
||||
#ifndef __spare_head_h__
|
||||
#define __spare_head_h__
|
||||
|
||||
|
||||
#define UBOOT_MAGIC "uboot"
|
||||
#define MAGIC_SIZE 8
|
||||
|
||||
|
||||
typedef struct _normal_gpio_cfg
|
||||
{
|
||||
char port; //ex.PA,PB...
|
||||
char port_num; //ex.PA0,PA1
|
||||
char mul_sel; //function num
|
||||
char pull; //
|
||||
char drv_level; //
|
||||
char data; //
|
||||
char reserved[2]; //
|
||||
}
|
||||
normal_gpio_cfg;
|
||||
|
||||
/******************************************************************************/
|
||||
/* the control information stored in file head */
|
||||
/******************************************************************************/
|
||||
struct spare_boot_ctrl_head
|
||||
{
|
||||
unsigned int jump_instruction; // one intruction jumping to real code
|
||||
unsigned char magic[MAGIC_SIZE]; // ="u-boot"
|
||||
unsigned int check_sum; // generated by PC
|
||||
unsigned int align_size; // align size in byte
|
||||
unsigned int length; // the size of all file
|
||||
unsigned int uboot_length; // the size of uboot
|
||||
unsigned char version[8]; // uboot version
|
||||
unsigned char platform[8]; // platform information
|
||||
int reserved[1]; //stamp space, 16bytes align
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
/* the data stored in file head */
|
||||
/******************************************************************************/
|
||||
struct spare_boot_data_head
|
||||
{
|
||||
unsigned int dram_para[32];
|
||||
int run_clock; // Mhz
|
||||
int run_core_vol; // mV
|
||||
int uart_port; // UART
|
||||
normal_gpio_cfg uart_gpio[2]; // UART GPIO
|
||||
int twi_port; // TWI
|
||||
normal_gpio_cfg twi_gpio[2]; // GPIO TWI
|
||||
int work_mode;
|
||||
int storage_type; // 0:nand 1:sdcard 2:spinor
|
||||
normal_gpio_cfg nand_gpio[32]; // nand GPIO
|
||||
char nand_spare_data[256]; // nand
|
||||
normal_gpio_cfg sdcard_gpio[32]; // sdcard GPIO
|
||||
char sdcard_spare_data[256]; // sdcard
|
||||
int secureos_exist;
|
||||
int dtb_offset;
|
||||
int reserved[4]; //256bytes align
|
||||
|
||||
};
|
||||
|
||||
struct spare_boot_ext_head
|
||||
{
|
||||
int data[4];
|
||||
};
|
||||
|
||||
|
||||
struct spare_boot_head_t
|
||||
{
|
||||
struct spare_boot_ctrl_head boot_head;
|
||||
struct spare_boot_data_head boot_data;
|
||||
struct spare_boot_ext_head boot_ext[16];
|
||||
};
|
||||
#endif
|
13
SOFTWARE/A64-TERES/sunxi-pack-tools/script/makefile
Executable file
13
SOFTWARE/A64-TERES/sunxi-pack-tools/script/makefile
Executable file
@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
objects = script.o
|
||||
|
||||
|
||||
edit:$(objects)
|
||||
gcc -o script $(objects)
|
||||
rm -rf $(objects)
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf script $(objects)
|
||||
|
951
SOFTWARE/A64-TERES/sunxi-pack-tools/script/script.c
Executable file
951
SOFTWARE/A64-TERES/sunxi-pack-tools/script/script.c
Executable file
@ -0,0 +1,951 @@
|
||||
// script.cpp : Defines the entry point for the console application.
|
||||
//
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include "types.h"
|
||||
#include "script.h"
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
|
||||
__asm__(".symver memcpy ,memcpy@GLIBC_2.2.5");
|
||||
|
||||
int parser_script(void *pbuf, int script_len, FILE *hfile);
|
||||
//------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// 函数说明
|
||||
//
|
||||
//
|
||||
// 参数说明
|
||||
//
|
||||
//
|
||||
// 返回值
|
||||
//
|
||||
//
|
||||
// 其他
|
||||
// 无
|
||||
//
|
||||
//------------------------------------------------------------------------------------------------------------
|
||||
int IsFullName(const char *FilePath)
|
||||
{
|
||||
if ( FilePath[0] == '/')
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// 函数说明
|
||||
//
|
||||
//
|
||||
// 参数说明
|
||||
//
|
||||
//
|
||||
// 返回值
|
||||
//
|
||||
//
|
||||
// 其他
|
||||
// 无
|
||||
//
|
||||
//------------------------------------------------------------------------------------------------------------
|
||||
void GetFullPath(char *dName, const char *sName)
|
||||
{
|
||||
char Buffer[MAX_PATH];
|
||||
|
||||
if(IsFullName(sName))
|
||||
{
|
||||
strcpy(dName, sName);
|
||||
return ;
|
||||
}
|
||||
|
||||
/* Get the current working directory: */
|
||||
if(getcwd(Buffer, MAX_PATH ) == NULL)
|
||||
{
|
||||
perror( "_getcwd error" );
|
||||
return ;
|
||||
}
|
||||
sprintf(dName, "%s/%s", Buffer, sName);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// 函数说明
|
||||
//
|
||||
//
|
||||
// 参数说明
|
||||
//
|
||||
//
|
||||
// 返回值
|
||||
//
|
||||
//
|
||||
// 其他
|
||||
// 无
|
||||
//
|
||||
//------------------------------------------------------------------------------------------------------------
|
||||
void Usage(void)
|
||||
{
|
||||
printf("\n");
|
||||
printf("Usage:\n");
|
||||
printf("script.exe script file path para file path\n\n");
|
||||
}
|
||||
static int _get_str_length(char *str)
|
||||
{
|
||||
int length = 0;
|
||||
|
||||
while(str[length])
|
||||
{
|
||||
length ++;
|
||||
}
|
||||
|
||||
return length;
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// 函数说明
|
||||
//
|
||||
//
|
||||
// 参数说明
|
||||
//
|
||||
//
|
||||
// 返回值
|
||||
//
|
||||
//
|
||||
// 其他
|
||||
// 无
|
||||
//
|
||||
//------------------------------------------------------------------------------------------------------------
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
//char str1[] = "D:\\winners\\eBase\\eGON\\eGON2\\workspace\\sun_20\\eFex\\sys_config1.fex";
|
||||
//char str2[] = "D:\\winners\\eBase\\eGON\\eGON2\\workspace\\sun_20\\eFex\\sys_config.bin";
|
||||
char str1[] = "sys_config.fex";
|
||||
char str2[] = "sys_config.bin";
|
||||
char src[MAX_PATH];
|
||||
char dest[MAX_PATH];
|
||||
FILE *dst_file = NULL;
|
||||
FILE *script_file = NULL;
|
||||
int ret = -1, src_length;
|
||||
char *script_addr = NULL;
|
||||
int script_len, i;
|
||||
|
||||
printf("argc = %d\n", argc);
|
||||
for(i=1;i<argc;i++)
|
||||
{
|
||||
if(argv[i] == NULL)
|
||||
{
|
||||
printf("script error: input source file name is empty\n");
|
||||
|
||||
return __LINE__;
|
||||
}
|
||||
printf("input name %s\n", argv[i]);
|
||||
memset(src, 0, sizeof(MAX_PATH));
|
||||
memset(dest, 0, sizeof(MAX_PATH));
|
||||
GetFullPath(src, argv[i]);
|
||||
|
||||
src_length = _get_str_length(src);
|
||||
memcpy(dest, src, src_length);
|
||||
dest[src_length - 0] = NULL;
|
||||
dest[src_length - 1] = 'n';
|
||||
dest[src_length - 2] = 'i';
|
||||
dest[src_length - 3] = 'b';
|
||||
|
||||
printf("Script %d source file Path=%s\n", i, src);
|
||||
printf("Script %d bin file Path=%s\n", i, dest);
|
||||
|
||||
//打开脚本文件,打不开则失败
|
||||
script_file = fopen(src, "rb");
|
||||
if(!script_file)
|
||||
{
|
||||
printf("unable to open script file %s\n", src);
|
||||
|
||||
goto _err_out;
|
||||
}
|
||||
|
||||
//打开目的文件,打不开则失败
|
||||
dst_file = fopen(dest, "wb");
|
||||
if(!dst_file)
|
||||
{
|
||||
printf("unable to open dest file\n");
|
||||
|
||||
goto _err_out;
|
||||
}
|
||||
//读出脚本的数据
|
||||
//首先获取脚本的长度
|
||||
fseek(script_file, 0, SEEK_END);
|
||||
script_len = ftell(script_file);
|
||||
fseek(script_file, 0, SEEK_SET);
|
||||
//读出脚本所有的内容
|
||||
script_addr = (char *)malloc(script_len+1);
|
||||
memset(script_addr,0,script_len+1);
|
||||
if(!script_addr)
|
||||
{
|
||||
printf("unable to malloc memory for script\n");
|
||||
|
||||
goto _err_out;
|
||||
}
|
||||
fread(script_addr, 1, script_len, script_file);
|
||||
fclose(script_file);
|
||||
script_file = NULL;
|
||||
//对顶格书写的中括号做匹配,认为是一个数据项,标准是,在回车符号后面出现的
|
||||
ret = parser_script(script_addr, script_len, dst_file);
|
||||
if(ret)
|
||||
{
|
||||
printf("error1\n");
|
||||
goto _err_out;
|
||||
}
|
||||
free(script_addr);
|
||||
script_addr = NULL;
|
||||
fclose(dst_file);
|
||||
dst_file = NULL;
|
||||
printf("parser %d file ok\n", i);
|
||||
}
|
||||
|
||||
_err_out:
|
||||
//退出时候的处理
|
||||
if(script_addr)
|
||||
{
|
||||
free(script_addr);
|
||||
}
|
||||
if(script_file)
|
||||
{
|
||||
fclose(script_file);
|
||||
script_file = NULL;
|
||||
}
|
||||
|
||||
if(dst_file)
|
||||
{
|
||||
fclose(dst_file);
|
||||
dst_file = NULL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#define THIS_LINE_NULL (0)
|
||||
#define THIS_LINE_MAINKEY (1)
|
||||
#define THIS_LINE_SUBKEY (2)
|
||||
#define THIS_LINE_ERROR (-1)
|
||||
//此函数返回当前行的长度,用指针返回当前的意义
|
||||
/********************************************
|
||||
* flag = 0 //当前是注释行,或空行
|
||||
* = 1 //当前是字段行
|
||||
* = 2 //当前是子项行,属于字段的下一项
|
||||
* = -1 //当前行不符合规范,出错
|
||||
*********************************************/
|
||||
static int _get_line_status(char *daddr, int *flag, int last_len)
|
||||
{
|
||||
char *src;
|
||||
int len;
|
||||
char ch;
|
||||
|
||||
src = daddr;
|
||||
ch = *src++;
|
||||
last_len --;
|
||||
switch(ch)
|
||||
{
|
||||
case ';': //注释行
|
||||
case 0x0D: //回车行
|
||||
{
|
||||
*flag = THIS_LINE_NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
case '[': //主键行
|
||||
{
|
||||
*flag = THIS_LINE_MAINKEY;
|
||||
break;
|
||||
}
|
||||
|
||||
default: //子键行
|
||||
{
|
||||
*flag = THIS_LINE_SUBKEY;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
len = 1;
|
||||
ch = *src++;
|
||||
while((ch != 0x0A) && (last_len > len)) //只要不是换行符号,继续查找
|
||||
{
|
||||
ch = *src++;
|
||||
len ++;
|
||||
if(len >= 512)
|
||||
{
|
||||
*flag = THIS_LINE_ERROR;
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return len + 1;
|
||||
}
|
||||
|
||||
//查找出主键的字符串名称
|
||||
static int _fill_line_mainkey(char *pbuf, script_item_t *item)
|
||||
{
|
||||
char *src;
|
||||
char ch, i;
|
||||
|
||||
i = 0;
|
||||
src = pbuf + 1; //跳过 【
|
||||
ch = *src++;
|
||||
|
||||
while(']' != ch)
|
||||
{
|
||||
item->item_name[i] = ch;
|
||||
i++;
|
||||
ch = *src++;
|
||||
if(i >= ITEM_MAIN_NAME_MAX)
|
||||
{
|
||||
item->item_name[i-1] = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
static int _get_item_value(char *pbuf, char *name, char *value)
|
||||
{
|
||||
char *src, *dstname, *dstvalue;
|
||||
int len;
|
||||
|
||||
src = pbuf;
|
||||
dstname = name;
|
||||
dstvalue = value;
|
||||
|
||||
len = 0;
|
||||
//首先检查整行字符的合法性
|
||||
while(1)
|
||||
{
|
||||
//如果一开始遇到空格或者TAB,则移动指针,直到找到一个合法字符为止
|
||||
if((*src == ' ') || (*src == 0x09))
|
||||
{
|
||||
src ++;
|
||||
}
|
||||
//如果什么都没有找到,则直接返回
|
||||
else if((*src == 0x0D) || (*src == 0x0A))
|
||||
{
|
||||
dstname[0] = '\0';
|
||||
dstvalue[0] = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
//已经找到一个合法字符,继续找,直到寻找到等号,去除尾部的空格或者TAB
|
||||
while(*src != '=')
|
||||
{
|
||||
dstname[len ++] = *src;
|
||||
src ++;
|
||||
if(len >= 31)
|
||||
{
|
||||
dstname[len] = '\0';
|
||||
break;
|
||||
}
|
||||
}
|
||||
while(1)
|
||||
{
|
||||
len --;
|
||||
if((dstname[len] == ' ') || (dstname[len] == 0x09))
|
||||
{
|
||||
dstname[len] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
dstname[len + 1] = '\0';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
while(*src != '=')
|
||||
{
|
||||
src ++;
|
||||
}
|
||||
|
||||
src++;
|
||||
len = 0;
|
||||
//首先检查整行字符的合法性
|
||||
while(1)
|
||||
{
|
||||
//如果一开始遇到空格或者TAB,则移动指针,直到找到一个合法字符为止
|
||||
if((*src == ' ') || (*src == 0x09))
|
||||
{
|
||||
src ++;
|
||||
}
|
||||
//如果什么都没有找到,则直接返回
|
||||
else if((*src == 0x0D) || (*src == 0x0A))
|
||||
{
|
||||
dstvalue[0] = '\0';
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
//已经找到一个合法字符,继续找,直到寻找到等号,去除尾部的空格或者TAB
|
||||
while((*src != 0x0D) && (*src != 0x0A))
|
||||
{
|
||||
dstvalue[len ++] = *src;
|
||||
src ++;
|
||||
if(len >= 127)
|
||||
{
|
||||
dstvalue[len] = '\0';
|
||||
break;
|
||||
}
|
||||
}
|
||||
while(1)
|
||||
{
|
||||
len --;
|
||||
if((dstvalue[len] == ' ') || (dstvalue[len] == 0x09))
|
||||
{
|
||||
dstvalue[len] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
dstvalue[len + 1] = '\0';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
//此函数转换字符数据称为整型数据,包括10进制和16进制
|
||||
//转换结果存在在value中,返回值标志转换成功或者失败
|
||||
static int _get_str2int(char *saddr, int value[] )
|
||||
{
|
||||
char *src;
|
||||
char off, ch;
|
||||
unsigned int tmp_value = 0;
|
||||
int data_count, i;
|
||||
char tmp_str[128];
|
||||
int sign = 1;
|
||||
|
||||
data_count = 2;
|
||||
src = saddr;
|
||||
off = 0; //0代表10进制,1代表16进制
|
||||
|
||||
if(!strncmp(src, "port:", 5))
|
||||
{
|
||||
if((src[5] == 'P') || (src[5] == 'p'))
|
||||
{
|
||||
off = 3; //表示是端口描述符号
|
||||
src += 6;
|
||||
}
|
||||
}
|
||||
else if(!strncmp(src, "string:", 7))
|
||||
{
|
||||
off = 0;
|
||||
src += 7;
|
||||
}
|
||||
else if(src[0] == '"')
|
||||
{
|
||||
off = 5;
|
||||
src += 1;
|
||||
}
|
||||
else if((src[0] == '0') && ((src[1] == 'x') || (src[1] == 'X'))) //十六进制
|
||||
{
|
||||
src += 2;
|
||||
off = 2;
|
||||
}
|
||||
else if((src[0] >= '0') && (src[0] <= '9')) //十进制
|
||||
{
|
||||
off = 1;
|
||||
}
|
||||
else if(((src[1] >= '0') && (src[1] <= '9')) && (src[0] == '-'))
|
||||
{
|
||||
src ++;
|
||||
off = 1;
|
||||
sign = -1;
|
||||
}
|
||||
else if(src[0] == '\0')
|
||||
{
|
||||
src++;
|
||||
off = 4;
|
||||
}
|
||||
//表示是字符串
|
||||
if(off == 0)
|
||||
{
|
||||
data_count = 0;
|
||||
while(src[data_count] != '\0')
|
||||
{
|
||||
data_count ++;
|
||||
if(data_count > 127)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(data_count & 0x03) //要求四字节对齐
|
||||
{
|
||||
data_count = (data_count & (~0x03)) + 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
data_count = data_count + 4;
|
||||
}
|
||||
value[0] = data_count>>2;
|
||||
if(saddr != src)
|
||||
{
|
||||
value[1] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
value[1] = 1;
|
||||
}
|
||||
return DATA_TYPE_STRING;
|
||||
}
|
||||
else if(off == 5) //表示是字符串
|
||||
{
|
||||
data_count = 0;
|
||||
while(src[data_count] != '"')
|
||||
{
|
||||
data_count ++;
|
||||
if(data_count > 127)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
src[data_count] = '\0';
|
||||
if(data_count & 0x03) //要求四字节对齐
|
||||
{
|
||||
data_count = (data_count & (~0x03)) + 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
data_count = data_count + 4;
|
||||
}
|
||||
value[0] = data_count>>2;
|
||||
value[1] = 5;
|
||||
|
||||
return DATA_TYPE_STRING;
|
||||
}
|
||||
else if(off == 1)
|
||||
{
|
||||
while(*src != '\0')
|
||||
{
|
||||
if((*src >= '0') && (*src <= '9'))
|
||||
{
|
||||
tmp_value = tmp_value * 10 + (*src - '0');
|
||||
src ++;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
value[0] = tmp_value * sign;
|
||||
|
||||
return DATA_TYPE_SINGLE_WORD;
|
||||
}
|
||||
else if(off == 2)
|
||||
{
|
||||
while(*src != '\0')
|
||||
{
|
||||
if((*src >= '0') && (*src <= '9'))
|
||||
{
|
||||
tmp_value = tmp_value * 16 + (*src - '0');
|
||||
src ++;
|
||||
}
|
||||
else if((*src >= 'A') && (*src <= 'F'))
|
||||
{
|
||||
tmp_value = tmp_value * 16 + (*src - 'A' + 10);
|
||||
src ++;
|
||||
}
|
||||
else if((*src >= 'a') && (*src <= 'f'))
|
||||
{
|
||||
tmp_value = tmp_value * 16 + (*src - 'a' + 10);
|
||||
src ++;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
value[0] = tmp_value;
|
||||
|
||||
return DATA_TYPE_SINGLE_WORD;
|
||||
}
|
||||
else if(off == 3) //表示是GPIO信息,必须按照标准格式对齐 端口编号:端口引脚编号:mult-driving:pull:driving-level:data共6个word
|
||||
{
|
||||
//获取字符编组信息:编组
|
||||
int tmp_flag = 0;
|
||||
|
||||
ch = *src++;
|
||||
if((ch == 'o') || (ch == 'O')) //用1代表A组,2代表B组,依次类推,用0xffff代表POWER按键
|
||||
{
|
||||
ch = src[0];
|
||||
if((ch == 'w') || (ch == 'W'))
|
||||
{
|
||||
ch = src[1];
|
||||
if((ch == 'e') || (ch == 'E'))
|
||||
{
|
||||
ch = src[2];
|
||||
if((ch == 'r') || (ch == 'R'))
|
||||
{
|
||||
//确定,是POWER按键
|
||||
value[0] = 0xffff;
|
||||
src += 3;
|
||||
tmp_flag = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!tmp_flag)
|
||||
{
|
||||
if((ch >= 'A') && (ch <= 'Z'))
|
||||
{
|
||||
value[0] = ch - 'A' + 1;
|
||||
}
|
||||
else if((ch >= 'a') && (ch <= 'z'))
|
||||
{
|
||||
value[0] = ch - 'a' + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
//获取字符编组信息:组内序号
|
||||
//第一个版本,不支持自动获取参数
|
||||
ch = *src++;
|
||||
tmp_value = 0;
|
||||
while(ch != '<')
|
||||
{
|
||||
if((ch >= '0') && (ch <= '9'))
|
||||
{
|
||||
tmp_value = tmp_value * 10 + (ch - '0');
|
||||
ch = *src++;
|
||||
}
|
||||
else if(ch == 0)
|
||||
{
|
||||
src --;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
value[1] = tmp_value;
|
||||
//开始遍历所有的尖括号
|
||||
ch = *src++;
|
||||
while(ch != '\0')
|
||||
{
|
||||
i = 0;
|
||||
memset(tmp_str, 0, sizeof(tmp_str));
|
||||
while(ch != '>') //如果是数字
|
||||
{
|
||||
if((ch >= 'A') && (ch <= 'Z'))
|
||||
{
|
||||
ch += 'a' - 'A';
|
||||
}
|
||||
tmp_str[i++] = ch;
|
||||
ch = *src++;
|
||||
}
|
||||
tmp_str[i] = '\0';
|
||||
//比较字符串
|
||||
if(!strcmp(tmp_str, "default"))
|
||||
{
|
||||
value[data_count] = -1;
|
||||
}
|
||||
else if(!strcmp(tmp_str, "none"))
|
||||
{
|
||||
value[data_count] = -1;
|
||||
}
|
||||
else if(!strcmp(tmp_str, "null"))
|
||||
{
|
||||
value[data_count] = -1;
|
||||
}
|
||||
else if(!strcmp(tmp_str, "-1"))
|
||||
{
|
||||
value[data_count] = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
i = 0;
|
||||
ch = tmp_str[i++];
|
||||
tmp_value = 0;
|
||||
if(ch == '-')
|
||||
{
|
||||
sign = -1;
|
||||
ch = tmp_str[i++];
|
||||
}
|
||||
while(ch != '\0')
|
||||
{
|
||||
if((ch >= '0') && (ch <= '9'))
|
||||
{
|
||||
tmp_value = tmp_value * 10 + (ch - '0');
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
ch = tmp_str[i++];
|
||||
}
|
||||
value[data_count] = tmp_value * sign;
|
||||
}
|
||||
|
||||
data_count ++;
|
||||
ch = *src++;
|
||||
if(ch == '<')
|
||||
{
|
||||
ch = *src++;
|
||||
}
|
||||
else if(ch == '\0')
|
||||
{
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
switch(data_count)
|
||||
{
|
||||
case 3:
|
||||
value[3] = -1; // 上拉能力
|
||||
case 4:
|
||||
value[4] = -1; // 驱动能力
|
||||
case 5:
|
||||
value[5] = -1; // 输出端口
|
||||
case 6:
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
return DATA_TYPE_GPIO;
|
||||
}
|
||||
else if(off == 4)
|
||||
{
|
||||
value[0] = 4>>2;
|
||||
return DATA_EMPTY;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
//算法:一行一行的查找
|
||||
// 查找到冒号,直接认为是注释行,然后找到回车换行符号,找到下一行去 (语法规则)
|
||||
// 查找到'['(左中括号),认为是一个主键(记为A主键),找出中括号中间的字符串,以及右中括号
|
||||
// 找到下面的字符以及数据,依次存放在一块内存中
|
||||
// 直到找到后面的主键(B主键),然后认为A主键查找完毕
|
||||
// 把A主键下的所有数据,按照从键名,键值的顺序排列,存放在另一个内存块中
|
||||
// 记录A主键的长度(从键的个数),记录A主键下的数据存放在内存中的偏移量
|
||||
|
||||
#define TIEM_MAIN_MAX 128
|
||||
|
||||
int parser_script(void *pbuf, int script_len, FILE *hfile)
|
||||
{
|
||||
int ret = -1;
|
||||
char *src, *dest = NULL, *tmp_dest;
|
||||
int *dest_data = NULL, *tmp_dest_data, dest_data_index;
|
||||
int line_len, line_status;
|
||||
int new_main_key_flag = 0, sub_value_index = 0;
|
||||
script_item_t item_table[TIEM_MAIN_MAX];
|
||||
char sub_name[128], sub_value[128];
|
||||
int value[8];
|
||||
unsigned int i, main_key_index = 0;
|
||||
script_head_t script_head;
|
||||
|
||||
src = (char *)pbuf;
|
||||
//申请字段空间
|
||||
dest = (char *)malloc(512 * 1024);
|
||||
if(!dest)
|
||||
{
|
||||
printf("fail to get memory for script storage key\n");
|
||||
|
||||
goto _err;
|
||||
}
|
||||
memset(dest, 0, 512 * 1024);
|
||||
tmp_dest = dest;
|
||||
//申请数据空间
|
||||
dest_data = (int *)malloc(512 * 1024);
|
||||
if(!dest_data)
|
||||
{
|
||||
printf("fail to get memory for script storage data\n");
|
||||
|
||||
goto _err;
|
||||
}
|
||||
memset(dest_data, 0, 512 * 1024);
|
||||
dest_data_index = 0;
|
||||
tmp_dest_data = dest_data;
|
||||
|
||||
memset(item_table, 0, TIEM_MAIN_MAX * sizeof(script_item_t));
|
||||
|
||||
while(script_len)
|
||||
{
|
||||
line_len = _get_line_status(src, &line_status, script_len);//判断当前行的状态
|
||||
script_len -= line_len;
|
||||
|
||||
switch(line_status)
|
||||
{
|
||||
case THIS_LINE_NULL: //注释行
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
case THIS_LINE_MAINKEY: //主键行
|
||||
{
|
||||
if(_fill_line_mainkey(src, &item_table[main_key_index])) //获取一个主键,立刻保存主键的相关信息
|
||||
{
|
||||
goto _err;
|
||||
}
|
||||
if(!new_main_key_flag)
|
||||
{
|
||||
new_main_key_flag = 1;
|
||||
item_table[main_key_index].item_offset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
item_table[main_key_index].item_offset = item_table[main_key_index - 1].item_offset + item_table[main_key_index - 1].item_length * 10;
|
||||
}
|
||||
main_key_index ++;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case THIS_LINE_SUBKEY: //子键行,和前面的主键对应
|
||||
{
|
||||
if(!new_main_key_flag)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if(_get_item_value(src, sub_name, sub_value)) //转换,把等号左方的存在到sub_nam,等号右方的存放到sub_value,都是字符串形式
|
||||
{
|
||||
goto _err;
|
||||
}
|
||||
|
||||
//等号左方的直接放到内存中,按照最长32个字节的截取32个字节,不足32个字节的补齐后占用32个字节
|
||||
//后面4个字节用于存放对应数据的偏移量
|
||||
strcpy(tmp_dest, sub_name);
|
||||
tmp_dest += ITEM_MAIN_NAME_MAX;
|
||||
//右方数据存放到另一块内存中
|
||||
ret = _get_str2int(sub_value, value);
|
||||
if(ret == -1) //数据错误
|
||||
{
|
||||
goto _err;
|
||||
}
|
||||
else if(ret == DATA_TYPE_SINGLE_WORD) //数据正确,并且是普通数据,10进制或者16进制
|
||||
{
|
||||
*tmp_dest_data = value[0];
|
||||
*((unsigned int *)tmp_dest) = dest_data_index;
|
||||
tmp_dest += 4;
|
||||
*((unsigned int *)tmp_dest) = (1 << 0) | (DATA_TYPE_SINGLE_WORD << 16); //该子键的长度1 word,类型为1,普通数据类型
|
||||
tmp_dest_data ++;
|
||||
dest_data_index ++;
|
||||
}
|
||||
else if(ret == DATA_EMPTY)
|
||||
{
|
||||
*((int *)tmp_dest) = dest_data_index;
|
||||
tmp_dest += 4;
|
||||
*((unsigned int *)tmp_dest) = (value[0] << 0) | (DATA_EMPTY << 16); //该子键的长度value word,类型为2,字符串类型
|
||||
tmp_dest_data += value[0];
|
||||
dest_data_index += value[0];
|
||||
}
|
||||
else if(ret == DATA_TYPE_STRING)
|
||||
{
|
||||
*((int *)tmp_dest) = dest_data_index;
|
||||
if(value[1] == 0)
|
||||
{
|
||||
strncpy((char *)tmp_dest_data, sub_value + sizeof("string:") - 1, value[0]<<2);
|
||||
}
|
||||
else if(value[1] == 1)
|
||||
{
|
||||
strncpy((char *)tmp_dest_data,sub_value,value[0]<<2);
|
||||
}
|
||||
else
|
||||
{
|
||||
strncpy((char *)tmp_dest_data, sub_value + 1, value[0]<<2);
|
||||
}
|
||||
tmp_dest += 4;
|
||||
*((unsigned int *)tmp_dest) = (value[0] << 0) | (DATA_TYPE_STRING << 16); //该子键的长度value word,类型为2,字符串类型
|
||||
tmp_dest_data += value[0];
|
||||
dest_data_index += value[0];
|
||||
}
|
||||
else if(ret == DATA_TYPE_GPIO) //转换出多个字节数据
|
||||
{
|
||||
for(i=0;i<6;i++)
|
||||
{
|
||||
*(tmp_dest_data ++) = value[i];
|
||||
}
|
||||
*((unsigned int *)tmp_dest) = dest_data_index;
|
||||
tmp_dest += 4;
|
||||
*((unsigned int *)tmp_dest) = (6 << 0) | (DATA_TYPE_GPIO << 16); //该子键的长度ret word,类型为3,多字节数据类型
|
||||
dest_data_index += 6;
|
||||
}
|
||||
else if(ret == DATA_TYPE_MULTI_WORD)
|
||||
{
|
||||
;
|
||||
}
|
||||
sub_value_index ++;
|
||||
tmp_dest += 4;
|
||||
item_table[main_key_index - 1].item_length ++;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
goto _err;
|
||||
}
|
||||
}
|
||||
src += line_len;
|
||||
}
|
||||
//保存所有的数据到文件中
|
||||
if(!main_key_index)
|
||||
{
|
||||
goto _err;
|
||||
}
|
||||
//校正主键的第一个子键的偏移,全部加上所有主键引起的偏移,注意是整型单位
|
||||
for(i=0;i<main_key_index;i++)
|
||||
{
|
||||
item_table[i].item_offset += ((sizeof(script_item_t) * main_key_index) >> 2) + (sizeof(script_head_t) >> 2);
|
||||
}
|
||||
//校正每个子键的偏移,全部加上所有主键引起偏移和所有子键名称引起的偏移,注意是整型单位
|
||||
{
|
||||
src = dest;
|
||||
i = 0;
|
||||
while(i < sub_value_index * 10 * sizeof(int))
|
||||
{
|
||||
src += ITEM_MAIN_NAME_MAX;
|
||||
*(unsigned int *)src += ((sizeof(script_item_t) * main_key_index) >> 2) + (sub_value_index * 10) + (sizeof(script_head_t)>>2);
|
||||
i += 10 * sizeof(int);
|
||||
src += 8;
|
||||
}
|
||||
}
|
||||
script_head.item_num = main_key_index;
|
||||
script_head.length = sizeof(script_head_t) + sizeof(script_item_t) * main_key_index +
|
||||
sub_value_index * 10 * sizeof(int) + dest_data_index * sizeof(int);
|
||||
script_head.version[0] = 1;
|
||||
script_head.version[1] = 2;
|
||||
fwrite(&script_head, 1, sizeof(script_head_t), hfile);
|
||||
fwrite(item_table, 1, sizeof(script_item_t) * main_key_index, hfile); //保存所有的主键项目
|
||||
fwrite(dest, 1, sub_value_index * 10 * sizeof(int), hfile); //保存子键名称项目
|
||||
fwrite(dest_data, 1, dest_data_index * sizeof(int), hfile); //保存所有的子键数值项目
|
||||
|
||||
_err:
|
||||
if(dest)
|
||||
{
|
||||
free(dest);
|
||||
}
|
||||
if(dest_data)
|
||||
{
|
||||
free(dest_data);
|
||||
}
|
||||
|
||||
ret = ((ret >= 0) ? 0: -1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
30
SOFTWARE/A64-TERES/sunxi-pack-tools/script/script.h
Executable file
30
SOFTWARE/A64-TERES/sunxi-pack-tools/script/script.h
Executable file
@ -0,0 +1,30 @@
|
||||
#ifndef _SCRIPT_H_
|
||||
#define _SCRIPT_H_
|
||||
|
||||
#define MAX_PATH 260
|
||||
#define ITEM_MAIN_NAME_MAX 32
|
||||
|
||||
#define DATA_COUNT_MAX (4)
|
||||
#define DATA_TYPE_SINGLE_WORD (1)
|
||||
#define DATA_TYPE_STRING (2)
|
||||
#define DATA_TYPE_MULTI_WORD (3)
|
||||
#define DATA_TYPE_GPIO (4)
|
||||
#define DATA_EMPTY (5)
|
||||
typedef struct _script_item
|
||||
{
|
||||
char item_name[ITEM_MAIN_NAME_MAX]; //主键名称
|
||||
int item_length; //主键成员的个数
|
||||
int item_offset; //主键成员开始的偏移量
|
||||
}
|
||||
script_item_t;
|
||||
|
||||
typedef struct _script_head
|
||||
{
|
||||
unsigned item_num;
|
||||
unsigned length;
|
||||
unsigned version[2];
|
||||
}
|
||||
script_head_t;
|
||||
|
||||
#endif //_SCRIPT_H_
|
||||
|
186
SOFTWARE/A64-TERES/sunxi-pack-tools/script/types.h
Executable file
186
SOFTWARE/A64-TERES/sunxi-pack-tools/script/types.h
Executable file
@ -0,0 +1,186 @@
|
||||
/*
|
||||
**********************************************************************************************************************
|
||||
* eGon
|
||||
* the Embedded GO-ON Bootloader System
|
||||
* eGON arm boot sub-system
|
||||
*
|
||||
* Copyright(C), 2006-2010, SoftWinners Microelectronic Co., Ltd.
|
||||
* All Rights Reserved
|
||||
*
|
||||
* File : types.h
|
||||
*
|
||||
* By : Jerry
|
||||
*
|
||||
* Version : V2.00
|
||||
*
|
||||
* Date :
|
||||
*
|
||||
* Descript:
|
||||
**********************************************************************************************************************
|
||||
*/
|
||||
#ifndef __TYPES_H_
|
||||
#define __TYPES_H_ 1
|
||||
|
||||
|
||||
//#define NULL 0 /* Ö¸Õë¿Õ */
|
||||
|
||||
/*
|
||||
**********************************************************************************************************************
|
||||
* DATA TYPES
|
||||
**********************************************************************************************************************
|
||||
*/
|
||||
//**************************************************
|
||||
//normal typedef
|
||||
/*
|
||||
typedef unsigned __int64 __u64;
|
||||
typedef unsigned __int64 u64;
|
||||
|
||||
typedef signed __int64 __s64;
|
||||
typedef signed __int64 s64;
|
||||
*/
|
||||
typedef unsigned int __u32;
|
||||
typedef unsigned int u32;
|
||||
|
||||
typedef signed int __s32;
|
||||
typedef signed int s32;
|
||||
|
||||
typedef unsigned short __u16;
|
||||
typedef unsigned short u16;
|
||||
|
||||
typedef signed short __s16;
|
||||
typedef signed short s16;
|
||||
|
||||
typedef unsigned char __u8;
|
||||
typedef unsigned char u8;
|
||||
|
||||
typedef signed char __s8;
|
||||
typedef signed char s8;
|
||||
|
||||
|
||||
typedef signed char __bool;
|
||||
typedef signed char __Bool;
|
||||
|
||||
typedef unsigned int __stk; /* Each stack entry is 32-bit wide */
|
||||
typedef unsigned int __cpu_sr; /* Define size of CPU status register (PSR = 32 bits) */
|
||||
|
||||
|
||||
typedef float __fp32; /* Single precision floating point */
|
||||
typedef double __fp64; /* Double precision floating point */
|
||||
|
||||
typedef unsigned int __hdle;
|
||||
|
||||
//typedef unsigned int __size;
|
||||
//typedef unsigned int __size_t;
|
||||
|
||||
typedef unsigned int __sector_t;
|
||||
|
||||
typedef unsigned char u_char;
|
||||
typedef unsigned short u_short;
|
||||
typedef unsigned int u_int;
|
||||
typedef unsigned long u_long;
|
||||
|
||||
/* sysv */
|
||||
typedef unsigned char unchar;
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned int uint;
|
||||
typedef unsigned long ulong;
|
||||
|
||||
typedef __u8 uint8_t;
|
||||
typedef __u16 uint16_t;
|
||||
typedef __u32 uint32_t;
|
||||
|
||||
#define eGON2_OK (0)
|
||||
#define eGON2_FAIL (-1)
|
||||
|
||||
#undef _set_bit
|
||||
#define _set_bit( value, bit ) ( (x) |= ( 1U << (y) ) )
|
||||
|
||||
#undef set_bit
|
||||
#define set_bit( value, bit ) ( (x) |= ( 1U << (y) ) )
|
||||
|
||||
#undef _clear_bit
|
||||
#define _clear_bit( value, bit ) ( (x) &= ~( 1U << (y) ) )
|
||||
|
||||
#undef clear_bit
|
||||
#define clear_bit( value, bit ) ( (x) &= ~( 1U << (y) ) )
|
||||
|
||||
#undef _set_bit
|
||||
#define _set_bit( value, bit ) ( (value) |= ( 1U << (bit) ) )
|
||||
|
||||
#undef set_bit
|
||||
#define set_bit( value, bit ) ( (value) |= ( 1U << (bit) ) )
|
||||
|
||||
#undef _clear_bit
|
||||
#define _clear_bit( value, bit ) ( (value) &= ~( 1U << (bit) ) )
|
||||
|
||||
#undef clear_bit
|
||||
#define clear_bit( value, bit ) ( (value) &= ~( 1U << (bit) ) )
|
||||
|
||||
#undef _reverse_bit
|
||||
#define _reverse_bit( value, bit ) ( (value) ^= ( 1U << (bit) ) )
|
||||
|
||||
#undef reverse_bit
|
||||
#define reverse_bit( value, bit ) ( (value) ^= ( 1U << (bit) ) )
|
||||
|
||||
#undef _test_bit
|
||||
#define _test_bit( value, bit ) ( (value) & ( 1U << (bit) ) )
|
||||
|
||||
#undef test_bit
|
||||
#define test_bit( value, bit ) ( (value) & ( 1U << (bit) ) )
|
||||
|
||||
|
||||
#undef _min
|
||||
#define _min( x, y ) ( (x) < (y) ? (x) : (y) )
|
||||
|
||||
#undef min
|
||||
#define min( x, y ) ( (x) < (y) ? (x) : (y) )
|
||||
|
||||
#undef _max
|
||||
#define _max( x, y ) ( (x) > (y) ? (x) : (y) )
|
||||
|
||||
#undef max
|
||||
#define max( x, y ) ( (x) > (y) ? (x) : (y) )
|
||||
|
||||
/* È¡¾ø¶ÔÖµ */
|
||||
#undef _absolute
|
||||
#define _absolute(p) ((p) > 0 ? (p) : -(p))
|
||||
|
||||
#undef absolute
|
||||
#define absolute(p) ((p) > 0 ? (p) : -(p))
|
||||
|
||||
|
||||
#ifndef SZ_1K
|
||||
#define SZ_512 0x00000200U
|
||||
#define SZ_1K 0x00000400U
|
||||
#define SZ_2K 0x00000800U
|
||||
#define SZ_4K 0x00001000U
|
||||
#define SZ_8K 0x00002000U
|
||||
#define SZ_16K 0x00004000U
|
||||
#define SZ_32K 0x00008000U
|
||||
#define SZ_64K 0x00010000U
|
||||
#define SZ_128K 0x00020000U
|
||||
#define SZ_256K 0x00040000U
|
||||
#define SZ_512K 0x00080000U
|
||||
#define SZ_1M 0x00100000U
|
||||
#define SZ_2M 0x00200000U
|
||||
#define SZ_4M 0x00400000U
|
||||
#define SZ_8M 0x00800000U
|
||||
#define SZ_16M 0x01000000U
|
||||
#define SZ_32M 0x02000000U
|
||||
#define SZ_64M 0x04000000U
|
||||
#define SZ_128M 0x08000000U
|
||||
#define SZ_256M 0x10000000U
|
||||
#define SZ_512M 0x20000000U
|
||||
#define SZ_1G 0x40000000U
|
||||
#define SZ_2G 0x80000000U
|
||||
#define SZ_4G 0x0100000000ULL
|
||||
#define SZ_8G 0x0200000000ULL
|
||||
#define SZ_16G 0x0400000000ULL
|
||||
#define SZ_32G 0x0800000000ULL
|
||||
#define SZ_64G 0x1000000000ULL
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*#ifndef __TYPES_H_*/
|
||||
|
||||
|
106
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/boot0_v2.h
Normal file
106
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/boot0_v2.h
Normal file
@ -0,0 +1,106 @@
|
||||
/*
|
||||
************************************************************************************************************************
|
||||
* eGON
|
||||
* the Embedded GO-ON Bootloader System
|
||||
*
|
||||
* Copyright(C), 2006-2008, SoftWinners Microelectronic Co., Ltd.
|
||||
* All Rights Reserved
|
||||
*
|
||||
* File Name : boot0.h
|
||||
*
|
||||
* Author : Gary.Wang
|
||||
*
|
||||
* Version : 1.1.0
|
||||
*
|
||||
* Date : 2009.05.21
|
||||
*
|
||||
* Description :
|
||||
*
|
||||
* Others : None at present.
|
||||
*
|
||||
*
|
||||
* History :
|
||||
*
|
||||
* <Author> <time> <version> <description>
|
||||
*
|
||||
* Gary.Wang 2009.05.21 1.1.0 build the file
|
||||
*
|
||||
************************************************************************************************************************
|
||||
*/
|
||||
#ifndef __boot0_v2_h
|
||||
#define __boot0_v2_h
|
||||
|
||||
|
||||
#include "egon_def.h"
|
||||
#include "egon_i.h"
|
||||
|
||||
#define UBOOT_BASE 0x4a000000
|
||||
|
||||
#define BOOT0_START_BLK_NUM 0
|
||||
#define BLKS_FOR_BOOT0 2
|
||||
#define BOOT0_LAST_BLK_NUM ( BOOT0_START_BLK_NUM + BLKS_FOR_BOOT0 - 1 )
|
||||
|
||||
#define BOOT0_SPI_NOR_START_ADDR 0 // add for spi nor. by Gary,2009-12-8 11:47:17
|
||||
#define SPI_NOR_SIZE_FOR_BOOT0 SZ_64K // add for spi nor. by Gary,2009-12-8 11:47:17
|
||||
|
||||
#define BOOT0_MAGIC "eGON.BT0"
|
||||
|
||||
#define BOOT0_START_PAGE_NUM 0 // add for 1618
|
||||
#define BOOT0_PAGE_ADVANCE 64 // add for 1618
|
||||
#define BOOT0_PAGES_MAX_COUNT ( BLKS_FOR_BOOT0 * 256 ) // add for 1618
|
||||
#define BOOT0_PAGE_SIZE SZ_1K // add for 1618
|
||||
#define BOOT0_PAGE_SIZE_BIT_WIDTH 10 // add for 1618
|
||||
|
||||
#define BOOT0_23_START_PAGE_NUM 0 // add for 1623
|
||||
#define BOOT0_23_PAGE_ADVANCE 64 // add for 1623
|
||||
#define BOOT0_23_PAGES_MAX_COUNT ( BOOT0_23_PAGE_ADVANCE * 8 ) // add for 1623
|
||||
//#define BOOT0_23_PAGE_SIZE SZ_1K // add for 1623
|
||||
#define BOOT0_23_PAGE_SIZE_BIT_WIDTH 10 // add for 1623
|
||||
|
||||
//以下是提供给SDMMC卡使用,固定不可改变
|
||||
#define BOOT0_SDMMC_START_ADDR 16
|
||||
|
||||
|
||||
typedef struct _boot_sdcard_info_t
|
||||
{
|
||||
__s32 card_ctrl_num; //总共的卡的个数
|
||||
__s32 boot_offset; //指定卡启动之后,逻辑和物理分区的管理
|
||||
__s32 card_no[4]; //当前启动的卡号, 16-31:GPIO编号,0-15:实际卡控制器编号
|
||||
__s32 speed_mode[4]; //卡的速度模式,0:低速,其它:高速
|
||||
__s32 line_sel[4]; //卡的线制,0: 1线,其它,4线
|
||||
__s32 line_count[4]; //卡使用线的个数
|
||||
}
|
||||
boot_sdcard_info_t;
|
||||
|
||||
/******************************************************************************/
|
||||
/* file head of Boot0 */
|
||||
/******************************************************************************/
|
||||
typedef struct _boot0_private_head_t
|
||||
{
|
||||
__u32 prvt_head_size;
|
||||
char prvt_head_vsn[4]; // the version of boot0_private_head_t
|
||||
boot_dram_para_t dram_para; // DRAM patameters for initialising dram. Original values is arbitrary,
|
||||
__s32 uart_port; // UART控制器编号
|
||||
normal_gpio_cfg uart_ctrl[2]; // UART控制器(调试打印口)数据信息
|
||||
__s32 enable_jtag; // 1 : enable, 0 : disable
|
||||
normal_gpio_cfg jtag_gpio[5]; // 保存JTAG的全部GPIO信息
|
||||
normal_gpio_cfg storage_gpio[32]; // 存储设备 GPIO信息
|
||||
char storage_data[512 - sizeof(normal_gpio_cfg) * 32]; // 用户保留数据信息
|
||||
//boot_nand_connect_info_t nand_connect_info;
|
||||
}boot0_private_head_t;
|
||||
|
||||
|
||||
typedef struct _boot0_file_head_t
|
||||
{
|
||||
boot_file_head_t boot_head;
|
||||
boot0_private_head_t prvt_head;
|
||||
}boot0_file_head_t;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // ifndef __boot0_h
|
||||
|
||||
/* end of boot0.h */
|
151
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/check.c
Normal file
151
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/check.c
Normal file
@ -0,0 +1,151 @@
|
||||
/*
|
||||
************************************************************************************************************************
|
||||
* eGON
|
||||
* the Embedded GO-ON Bootloader System
|
||||
*
|
||||
* Copyright(C), 2006-2008, SoftWinners Microelectronic Co., Ltd.
|
||||
* All Rights Reserved
|
||||
*
|
||||
* File Name : check.c
|
||||
*
|
||||
* Author : Gary.Wang
|
||||
*
|
||||
* Version : 1.1.0
|
||||
*
|
||||
* Date : 2007.10.12
|
||||
*
|
||||
* Description : This file provides a function to check Boot0 and Boot1.
|
||||
*
|
||||
* Others : None at present.
|
||||
*
|
||||
*
|
||||
* History :
|
||||
*
|
||||
* <Author> <time> <version> <description>
|
||||
*
|
||||
* Gary.Wang 2007.10.12 1.1.0 build the file
|
||||
*
|
||||
************************************************************************************************************************
|
||||
*/
|
||||
#include "check.h"
|
||||
#include "spare_head.h"
|
||||
|
||||
//#pragma arm section code="check_magic"
|
||||
/********************************************************************************
|
||||
*函数名称: check_magic
|
||||
*函数原型: __s32 check_magic( __u32 *mem_base, const char *magic )
|
||||
*函数功能: 使用“算术和”来校验内存中的一段数据
|
||||
*入口参数: mem_base Boot文件在内存中的起始地址
|
||||
* magic Boot的magic
|
||||
*返 回 值: CHECK_IS_CORRECT 校验正确
|
||||
* CHECK_IS_WRONG 校验错误
|
||||
*备 注:
|
||||
********************************************************************************/
|
||||
__s32 check_magic( __u32 *mem_base, const char *magic )
|
||||
{
|
||||
struct spare_boot_ctrl_head *bfh;
|
||||
unsigned char *p;
|
||||
|
||||
bfh = (struct spare_boot_ctrl_head *)mem_base;
|
||||
p = bfh->magic;
|
||||
if(strcmp((const char *)p, magic))
|
||||
{
|
||||
return CHECK_IS_WRONG;
|
||||
}
|
||||
return CHECK_IS_CORRECT;
|
||||
}
|
||||
|
||||
/********************************************************************************
|
||||
*函数名称: check_sum
|
||||
*函数原型: __s32 check_sum( __u32 *mem_base, __u32 size, const char *magic )
|
||||
*函数功能: 使用“算术和”来校验内存中的一段数据
|
||||
*入口参数: mem_base 待校验的数据在内存中的起始地址(必须是4字节对齐的)
|
||||
* size 待校验的数据的个数(以字节为单位,必须是4字节对齐的)
|
||||
*返 回 值: CHECK_IS_CORRECT 校验正确
|
||||
* CHECK_IS_WRONG 校验错误
|
||||
*备 注:
|
||||
********************************************************************************/
|
||||
__s32 check_sum( __u32 *mem_base, __u32 size )
|
||||
{
|
||||
__u32 *buf;
|
||||
__u32 count;
|
||||
__u32 src_sum;
|
||||
__u32 sum;
|
||||
struct spare_boot_ctrl_head *bfh;
|
||||
|
||||
bfh = (struct spare_boot_ctrl_head *)mem_base;
|
||||
/* 生成校验和 */
|
||||
src_sum = bfh->check_sum; // 从Boot_file_head中的“check_sum”字段取出校验和
|
||||
bfh->check_sum = STAMP_VALUE; // 将STAMP_VALUE写入Boot_file_head中的“check_sum”字段
|
||||
|
||||
count = size >> 2; // 以 字(4bytes)为单位计数
|
||||
sum = 0;
|
||||
buf = (__u32 *)mem_base;
|
||||
|
||||
do
|
||||
{
|
||||
sum += *buf++; // 依次累加,求得校验和
|
||||
sum += *buf++; // 依次累加,求得校验和
|
||||
sum += *buf++; // 依次累加,求得校验和
|
||||
sum += *buf++; // 依次累加,求得校验和
|
||||
}while( ( count -= 4 ) > (4-1) );
|
||||
|
||||
while( count-- > 0 )
|
||||
sum += *buf++;
|
||||
|
||||
bfh->check_sum = src_sum; // 恢复Boot_file_head中的“check_sum”字段的值
|
||||
if( sum == src_sum )
|
||||
return CHECK_IS_CORRECT; // 校验成功
|
||||
else
|
||||
return CHECK_IS_WRONG; // 校验失败
|
||||
}
|
||||
|
||||
/********************************************************************************
|
||||
*函数名称: check_file
|
||||
*函数原型: __s32 check_file( __u32 *mem_base, __u32 size, const char *magic )
|
||||
*函数功能: 使用“算术和”来校验内存中的一段数据
|
||||
*入口参数: mem_base 待校验的数据在内存中的起始地址(必须是4字节对齐的)
|
||||
* size 待校验的数据的个数(以字节为单位,必须是4字节对齐的)
|
||||
* magic magic number, 待校验文件的标识码
|
||||
*返 回 值: CHECK_IS_CORRECT 校验正确
|
||||
* CHECK_IS_WRONG 校验错误
|
||||
*备 注:
|
||||
********************************************************************************/
|
||||
__s32 check_file( __u32 *mem_base, __u32 size, const char *magic )
|
||||
{
|
||||
if( check_magic( mem_base, magic ) == CHECK_IS_CORRECT
|
||||
&&check_sum( mem_base, size ) == CHECK_IS_CORRECT )
|
||||
return CHECK_IS_CORRECT;
|
||||
else
|
||||
return CHECK_IS_WRONG;
|
||||
}
|
||||
|
||||
__s32 gen_check_sum( void *boot_buf )
|
||||
{
|
||||
struct spare_boot_head_t *head_p;
|
||||
__u32 length;
|
||||
__u32 *buf;
|
||||
__u32 loop;
|
||||
__u32 i;
|
||||
__u32 sum;
|
||||
|
||||
head_p = (struct spare_boot_head_t *)boot_buf;
|
||||
length = head_p->boot_head.length;
|
||||
|
||||
if( ( length & 0x3 ) != 0 ) // must 4-byte-aligned
|
||||
return -1;
|
||||
buf = (__u32 *)boot_buf;
|
||||
head_p->boot_head.check_sum = STAMP_VALUE; // fill stamp
|
||||
loop = length >> 2;
|
||||
/* 计算当前文件内容的“校验和”*/
|
||||
for( i = 0, sum = 0; i < loop; i++ )
|
||||
sum += buf[i];
|
||||
/* write back check sum */
|
||||
head_p->boot_head.check_sum = sum;
|
||||
|
||||
return 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
49
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/check.h
Normal file
49
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/check.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
******************************************************************************************************************
|
||||
* eGON
|
||||
* the Embedded GO-ON Bootloader System
|
||||
*
|
||||
* Copyright(C), 2006-2008, SoftWinners Microelectronic Co., Ltd.
|
||||
* All Rights Reserved
|
||||
*
|
||||
* File Name : check.h
|
||||
*
|
||||
* Author : Gary.Wang
|
||||
*
|
||||
* Version : 1.1.0
|
||||
*
|
||||
* Date : 2007.10.12
|
||||
*
|
||||
* Description £ºThis file provides a function to check Boot0 and Boot1.
|
||||
*
|
||||
* Others : None at present.
|
||||
*
|
||||
*
|
||||
* History :
|
||||
*
|
||||
* <Author> <time> <version> <description>
|
||||
*
|
||||
* Gary.Wang 2007.10.12 1.1.0 build the file
|
||||
*
|
||||
************************************************************************************************************************
|
||||
*/
|
||||
#ifndef __script_check_h
|
||||
#define __script_check_h
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#define CHECK_IS_WRONG 1
|
||||
#define CHECK_IS_CORRECT 0
|
||||
|
||||
|
||||
extern __s32 check_file ( __u32 *mem_base, __u32 size, const char *magic );
|
||||
extern __s32 gen_check_sum( void *boot_buf );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // end of #ifndef __check_h
|
||||
|
||||
/* end of check.h */
|
154
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/egon_def.h
Normal file
154
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/egon_def.h
Normal file
@ -0,0 +1,154 @@
|
||||
/*
|
||||
************************************************************************************************************************
|
||||
* eGON
|
||||
* the Embedded GO-ON Bootloader System
|
||||
*
|
||||
* Copyright(C), 2006-2008, SoftWinners Microelectronic Co., Ltd.
|
||||
* All Rights Reserved
|
||||
*
|
||||
* File Name : egon_def.h
|
||||
*
|
||||
* Author : Gary.Wang
|
||||
*
|
||||
* Version : 1.1.0
|
||||
*
|
||||
* Date : 2009.05.21
|
||||
*
|
||||
* Description :
|
||||
*
|
||||
* Others : None at present.
|
||||
*
|
||||
*
|
||||
* History :
|
||||
*
|
||||
* <Author> <time> <version> <description>
|
||||
*
|
||||
* Gary.Wang 2009.05.21 1.1.0 build the file
|
||||
*
|
||||
************************************************************************************************************************
|
||||
*/
|
||||
#ifndef __egon_def_h
|
||||
#define __egon_def_h
|
||||
|
||||
#include "egon_mem_distribute.h"
|
||||
|
||||
#define BOOT_PUB_HEAD_VERSION "1100" // X.X.XX
|
||||
#define EGON_VERSION "1100" // X.X.XX
|
||||
|
||||
#define SUNII_PLATFORM_VALUE "SUNII"
|
||||
#ifndef PLATFORM
|
||||
#define PLATFORM SUNII_PLATFORM_VALUE
|
||||
#endif
|
||||
|
||||
#define EGON2_DRAM_BASE 0x40000000
|
||||
#define EGON2_DRAM_SIZE 0x02000000
|
||||
#define EGON2_SRAM_BASE 0x0
|
||||
#define EGON2_SRAM_SIZE ( 32 * 1024 )
|
||||
#define EGON2_RESET_BASE 0xFFFF0000
|
||||
|
||||
|
||||
#define EGON2_MMU_BASE 0x20000
|
||||
#define EGON2_REGS_BASE 0x01c00000
|
||||
#define EGON2_REGS_SIZE 0x02000000
|
||||
|
||||
|
||||
#define NF_ALIGN_SIZE SZ_8K
|
||||
#define SF_ALIGN_SIZE 512 // change 256 to 512. by Gary, 2009-12-10 11:46:51
|
||||
#define IE_ALIGN_SIZE 512 // change 64 to 512. by Gary, 2009-12-10 11:46:51
|
||||
|
||||
|
||||
#define SPI_NOR_SCT_SIZE 512 // add for spi nor. by Gary,2009-12-8 11:47:17
|
||||
#define SPI_NOR_SCT_SIZE_WIDTH 9 // add for spi nor. by Gary,2009-12-8 11:47:17
|
||||
|
||||
#define BOOT_SECTOR_SIZE 512
|
||||
#define BOOT_SECTOR_SIZE_WIDTH 9
|
||||
|
||||
|
||||
#define MASK_TOTAL 0x80000000
|
||||
#define DEFAULT_VALUE 0x0
|
||||
#define STAMP_VALUE 0x5F0A6C39
|
||||
|
||||
|
||||
#define BOOT0_BASE ( EGON2_SRAM_BASE )
|
||||
#define BOOT1_BASE ( EGON2_DRAM_BASE + EGON2_BOOT1_OFFSET )
|
||||
#define FEL_BASE ( EGON2_RESET_BASE + 0x20 )
|
||||
#define SCRIPT_BASE ( BOOT1_BASE + 0x00B00000 )
|
||||
|
||||
|
||||
//通用的,和GPIO相关的数据结构
|
||||
typedef struct _normal_gpio_cfg
|
||||
{
|
||||
__u8 port; //端口号
|
||||
__u8 port_num; //端口内编号
|
||||
__s8 mul_sel; //功能编号
|
||||
__s8 pull; //电阻状态
|
||||
__s8 drv_level; //驱动驱动能力
|
||||
__s8 data; //输出电平
|
||||
__u8 reserved[2]; //保留位,保证对齐
|
||||
}
|
||||
normal_gpio_cfg;
|
||||
|
||||
/*
|
||||
typedef enum __DRAM_TYPE
|
||||
{
|
||||
DRAM_TYPE_DDR =1,
|
||||
DRAM_TYPE_DDR2 =2,
|
||||
DRAM_TYPE_DDR3 =3
|
||||
}__dram_type_e;
|
||||
*/
|
||||
|
||||
typedef struct _boot_dram_para_t
|
||||
{
|
||||
__u32 dram_baseaddr;
|
||||
__u32 dram_clk;
|
||||
__u32 dram_type;
|
||||
__u32 dram_rank_num;
|
||||
__u32 dram_chip_density;
|
||||
__u32 dram_io_width;
|
||||
__u32 dram_bus_width;
|
||||
__u32 dram_cas;
|
||||
__u32 dram_zq;
|
||||
__u32 dram_odt_en;
|
||||
__u32 dram_size;
|
||||
__u32 dram_tpr0;
|
||||
__u32 dram_tpr1;
|
||||
__u32 dram_tpr2;
|
||||
__u32 dram_tpr3;
|
||||
__u32 dram_tpr4;
|
||||
__u32 dram_tpr5;
|
||||
__u32 dram_emr1;
|
||||
__u32 dram_emr2;
|
||||
__u32 dram_emr3;
|
||||
}boot_dram_para_t;
|
||||
/******************************************************************************/
|
||||
/* file head of Boot */
|
||||
/******************************************************************************/
|
||||
typedef struct _Boot_file_head
|
||||
{
|
||||
__u32 jump_instruction; // one intruction jumping to real code
|
||||
__u8 magic[8]; // ="eGON.BT0" or "eGON.BT1", not C-style string.
|
||||
__u32 check_sum; // generated by PC
|
||||
__u32 length; // generated by PC
|
||||
__u32 pub_head_size; // the size of boot_file_head_t
|
||||
__u8 pub_head_vsn[4]; // the version of boot_file_head_t
|
||||
__u8 file_head_vsn[4]; // the version of boot0_file_head_t or boot1_file_head_t
|
||||
__u8 Boot_vsn[4]; // Boot version
|
||||
__u8 eGON_vsn[4]; // eGON version
|
||||
__u8 platform[8]; // platform information
|
||||
}boot_file_head_t;
|
||||
|
||||
|
||||
typedef struct _boot_para_info_t
|
||||
{
|
||||
__u8 blkmagic[16]; // "ePDK-Magic-Block", not C-style string.
|
||||
__u8 magic[8];
|
||||
__u8 eGON_vsn[4]; // eGON version
|
||||
__u8 Boot_vsn[4]; // Boot version
|
||||
__u32 reserved[20];
|
||||
}boot_para_info_t;
|
||||
|
||||
|
||||
|
||||
#endif // ifndef __egon_def_h
|
||||
|
||||
/* end of egon_def.h */
|
75
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/egon_i.h
Normal file
75
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/egon_i.h
Normal file
@ -0,0 +1,75 @@
|
||||
/*
|
||||
************************************************************************************************************************
|
||||
* eGON
|
||||
* the Embedded GO-ON Bootloader System
|
||||
*
|
||||
* Copyright(C), 2006-2008, SoftWinners Microelectronic Co., Ltd.
|
||||
* All Rights Reserved
|
||||
*
|
||||
* File Name : egon_i.h
|
||||
*
|
||||
* Author : Gary.Wang
|
||||
*
|
||||
* Version : 1.1.0
|
||||
*
|
||||
* Date : 2009.05.21
|
||||
*
|
||||
* Description :
|
||||
*
|
||||
* Others : None at present.
|
||||
*
|
||||
*
|
||||
* History :
|
||||
*
|
||||
* <Author> <time> <version> <description>
|
||||
*
|
||||
* Gary.Wang 2009.05.21 1.1.0 build the file
|
||||
*
|
||||
************************************************************************************************************************
|
||||
*/
|
||||
#ifndef __egon_i_h
|
||||
#define __egon_i_h
|
||||
|
||||
|
||||
#define EPDK_CHIP_BDD0 0
|
||||
#define EPDK_CHIP_AF0B 1
|
||||
#define EPDK_CHIP_AF0C 2
|
||||
#define EPDK_CHIP_AFA0 3
|
||||
#define EPDK_CHIP_AFAA 4
|
||||
|
||||
|
||||
#define BOOT0_IN_NF // BOOT0_IN_NF, BOOT0_IN_SF, BOOT0_IN_IE
|
||||
#define BOOT1_IN_NF // BOOT1_IN_NF, BOOT1_IN_SF, BOOT1_IN_IE
|
||||
#define KENEL_IN_NF // KENEL_IN_RAM, KENEL_IN_NF
|
||||
|
||||
|
||||
#if SYS_STORAGE_MEDIA_TYPE == SYS_STORAGE_MEDIA_NAND_FLASH
|
||||
#define BOOT0_ALIGN_SIZE NF_ALIGN_SIZE
|
||||
#elif SYS_STORAGE_MEDIA_TYPE == SYS_STORAGE_MEDIA_SPI_NOR_FLASH
|
||||
#define BOOT0_ALIGN_SIZE BOOT_SECTOR_SIZE
|
||||
#elif SYS_STORAGE_MEDIA_TYPE == SYS_STORAGE_MEDIA_SD_CARD
|
||||
#define BOOT0_ALIGN_SIZE BOOT_SECTOR_SIZE
|
||||
#else
|
||||
#error The storage media has not been defined.
|
||||
#endif
|
||||
|
||||
|
||||
#if SYS_STORAGE_MEDIA_TYPE == SYS_STORAGE_MEDIA_NAND_FLASH
|
||||
#define BOOT1_ALIGN_SIZE NF_ALIGN_SIZE
|
||||
#elif SYS_STORAGE_MEDIA_TYPE == SYS_STORAGE_MEDIA_SPI_NOR_FLASH
|
||||
#define BOOT1_ALIGN_SIZE BOOT_SECTOR_SIZE
|
||||
#elif SYS_STORAGE_MEDIA_TYPE == SYS_STORAGE_MEDIA_SD_CARD
|
||||
#define BOOT1_ALIGN_SIZE BOOT_SECTOR_SIZE
|
||||
#else
|
||||
#error The storage media has not been defined.
|
||||
#endif
|
||||
|
||||
|
||||
#define BOOT_PUB_HEAD_VERSION "1100" // X.X.XX
|
||||
#define EGON_VERSION "1100" // X.X.XX
|
||||
|
||||
|
||||
|
||||
#endif // ifndef __egon_i_h
|
||||
|
||||
/* end of egon_i.h */
|
@ -0,0 +1,39 @@
|
||||
/*
|
||||
************************************************************************************************************************
|
||||
* eGON
|
||||
* the Embedded GO-ON Bootloader System
|
||||
*
|
||||
* Copyright(C), 2006-2008, SoftWinners Microelectronic Co., Ltd.
|
||||
* All Rights Reserved
|
||||
*
|
||||
* File Name : egon_def.h
|
||||
*
|
||||
* Author : Gary.Wang
|
||||
*
|
||||
* Version : 1.1.0
|
||||
*
|
||||
* Date : 2009.05.21
|
||||
*
|
||||
* Description :
|
||||
*
|
||||
* Others : None at present.
|
||||
*
|
||||
*
|
||||
* History :
|
||||
*
|
||||
* <Author> <time> <version> <description>
|
||||
*
|
||||
* Gary.Wang 2009.05.21 1.1.0 build the file
|
||||
*
|
||||
************************************************************************************************************************
|
||||
*/
|
||||
#ifndef __egon_mem_distribute_h
|
||||
#define __egon_mem_distribute_h
|
||||
|
||||
|
||||
//#define EGON2_BOOT1_OFFSET (SZ_4M) //4M
|
||||
#define EGON2_BOOT1_OFFSET (0x02400000)
|
||||
|
||||
#endif // ifndef __egon_mem_distribute_h
|
||||
|
||||
/* end of egon_mem_distribute.h */
|
12
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/makefile
Normal file
12
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/makefile
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
objects = check.o script.o update_uboot.o
|
||||
|
||||
|
||||
edit:$(objects)
|
||||
gcc -o update_uboot $(objects) -static
|
||||
rm -rf $(objects)
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf update_uboot $(objects)
|
288
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/script.c
Normal file
288
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/script.c
Normal file
@ -0,0 +1,288 @@
|
||||
/*
|
||||
**********************************************************************************************************************
|
||||
* eGon
|
||||
* the Embedded System
|
||||
* script parser sub-system
|
||||
*
|
||||
* Copyright(C), 2006-2010, SoftWinners Microelectronic Co., Ltd.
|
||||
* All Rights Reserved
|
||||
*
|
||||
* File : script.c
|
||||
*
|
||||
* By : Jerry
|
||||
*
|
||||
* Version : V2.00
|
||||
*
|
||||
* Date :
|
||||
*
|
||||
* Descript:
|
||||
**********************************************************************************************************************
|
||||
*/
|
||||
#include "script.h"
|
||||
#include "string.h"
|
||||
|
||||
static char *script_mod_buf = NULL; //指向第一个主键
|
||||
static int script_main_key_count = 0; //保存主键的个数
|
||||
|
||||
|
||||
|
||||
static int _test_str_length(char *str)
|
||||
{
|
||||
int length = 0;
|
||||
|
||||
while(str[length++])
|
||||
{
|
||||
if(length > 32)
|
||||
{
|
||||
length = 32;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return length;
|
||||
}
|
||||
/*
|
||||
************************************************************************************************************
|
||||
*
|
||||
* script_parser_init
|
||||
*
|
||||
* 函数名称:
|
||||
*
|
||||
* 参数列表:script_buf: 脚本数据池
|
||||
*
|
||||
* 返回值 :
|
||||
*
|
||||
* 说明 :
|
||||
*
|
||||
*
|
||||
************************************************************************************************************
|
||||
*/
|
||||
int script_parser_init(char *script_buf)
|
||||
{
|
||||
script_head_t *script_head;
|
||||
|
||||
if(script_buf)
|
||||
{
|
||||
script_mod_buf = script_buf;
|
||||
script_head = (script_head_t *)script_mod_buf;
|
||||
|
||||
script_main_key_count = script_head->main_key_count;
|
||||
|
||||
return SCRIPT_PARSER_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
return SCRIPT_PARSER_EMPTY_BUFFER;
|
||||
}
|
||||
}
|
||||
/*
|
||||
************************************************************************************************************
|
||||
*
|
||||
* script_parser_exit
|
||||
*
|
||||
* 函数名称:
|
||||
*
|
||||
* 参数列表:NULL
|
||||
*
|
||||
* 返回值 :
|
||||
*
|
||||
* 说明 :
|
||||
*
|
||||
*
|
||||
************************************************************************************************************
|
||||
*/
|
||||
int script_parser_exit(void)
|
||||
{
|
||||
script_mod_buf = NULL;
|
||||
script_main_key_count = 0;
|
||||
|
||||
return SCRIPT_PARSER_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
************************************************************************************************************
|
||||
*
|
||||
* script_parser_fetch
|
||||
*
|
||||
* 函数名称:
|
||||
*
|
||||
* 参数列表:
|
||||
*
|
||||
* 返回值 :
|
||||
*
|
||||
* 说明 :根据传进的主键,子键,取得对应的数值
|
||||
*
|
||||
*
|
||||
************************************************************************************************************
|
||||
*/
|
||||
int script_parser_fetch(char *main_name, char *sub_name, int value[])
|
||||
{
|
||||
char main_char[32], sub_char[32];
|
||||
script_main_key_t *main_key;
|
||||
script_sub_key_t *sub_key;
|
||||
int i, j;
|
||||
int pattern, word_count;
|
||||
script_gpio_set_t *user_gpio_cfg;
|
||||
|
||||
//检查脚本buffer是否存在
|
||||
if(!script_mod_buf)
|
||||
{
|
||||
return SCRIPT_PARSER_EMPTY_BUFFER;
|
||||
}
|
||||
//检查主键名称和子键名称是否为空
|
||||
if((main_name == NULL) || (sub_name == NULL))
|
||||
{
|
||||
return SCRIPT_PARSER_KEYNAME_NULL;
|
||||
}
|
||||
//检查数据buffer是否为空
|
||||
if(value == NULL)
|
||||
{
|
||||
return SCRIPT_PARSER_DATA_VALUE_NULL;
|
||||
}
|
||||
//保存主键名称和子键名称,如果超过16字节则截取16字节
|
||||
memset(main_char, 0, sizeof(main_char));
|
||||
memset(sub_char, 0, sizeof(sub_char));
|
||||
if(_test_str_length(main_name) <= 32)
|
||||
{
|
||||
strcpy(main_char, main_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
strncpy(main_char, main_name, 31);
|
||||
}
|
||||
|
||||
if(_test_str_length(sub_name) <= 32)
|
||||
{
|
||||
strcpy(sub_char, sub_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
strncpy(sub_char, sub_name, 31);
|
||||
}
|
||||
|
||||
for(i=0;i<script_main_key_count;i++)
|
||||
{
|
||||
main_key = (script_main_key_t *)(script_mod_buf + (sizeof(script_head_t)) + i * sizeof(script_main_key_t));
|
||||
if(strcmp(main_key->main_name, main_char)) //如果主键不匹配,寻找下一个主键
|
||||
{
|
||||
continue;
|
||||
}
|
||||
//主键匹配,寻找子键名称匹配
|
||||
for(j=0;j<main_key->lenth;j++)
|
||||
{
|
||||
sub_key = (script_sub_key_t *)(script_mod_buf + (main_key->offset<<2) + (j * sizeof(script_sub_key_t)));
|
||||
if(strcmp(sub_key->sub_name, sub_char)) //如果主键不匹配,寻找下一个主键
|
||||
{
|
||||
continue;
|
||||
}
|
||||
pattern = (sub_key->pattern>>16) & 0xffff; //获取数据的类型
|
||||
word_count = (sub_key->pattern>> 0) & 0xffff; //获取所占用的word个数
|
||||
//取出数据
|
||||
switch(pattern)
|
||||
{
|
||||
case DATA_TYPE_SINGLE_WORD: //单word数据类型
|
||||
value[0] = *(int *)(script_mod_buf + (sub_key->offset<<2));
|
||||
break;
|
||||
|
||||
case DATA_TYPE_STRING: //字符串数据类型
|
||||
memcpy((char *)value, script_mod_buf + (sub_key->offset<<2), word_count << 2);
|
||||
break;
|
||||
|
||||
case DATA_TYPE_GPIO_WORD: //多word数据类型
|
||||
user_gpio_cfg = (script_gpio_set_t *)value;
|
||||
//发现是GPIO类型,检查是否足够存放用户数据
|
||||
strcpy( user_gpio_cfg->gpio_name, sub_char);
|
||||
memcpy(&user_gpio_cfg->port, script_mod_buf + (sub_key->offset<<2), sizeof(script_gpio_set_t) - 32);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return SCRIPT_PARSER_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return SCRIPT_PARSER_KEY_NOT_FIND;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
************************************************************************************************************
|
||||
*
|
||||
* script_parser_mainkey_get_gpio_cfg
|
||||
*
|
||||
* 函数名称:
|
||||
*
|
||||
* 参数列表:
|
||||
*
|
||||
* 返回值 :
|
||||
*
|
||||
* 说明 :根据传进的主键,取得主键下GPIO的配置信息
|
||||
*
|
||||
*
|
||||
************************************************************************************************************
|
||||
*/
|
||||
int script_parser_mainkey_get_gpio_cfg(char *main_name, void *gpio_cfg, int gpio_count)
|
||||
{
|
||||
char main_bkname[32];
|
||||
char *main_char;
|
||||
script_main_key_t *main_key = NULL;
|
||||
script_sub_key_t *sub_key = NULL;
|
||||
script_gpio_set_t *user_gpio_cfg = (script_gpio_set_t *)gpio_cfg;
|
||||
int i, j;
|
||||
int pattern, user_index;
|
||||
|
||||
//检查脚本buffer是否存在
|
||||
if(!script_mod_buf)
|
||||
{
|
||||
return SCRIPT_PARSER_EMPTY_BUFFER;
|
||||
}
|
||||
//检查主键名称和子键名称是否为空
|
||||
if(main_name == NULL)
|
||||
{
|
||||
return SCRIPT_PARSER_KEYNAME_NULL;
|
||||
}
|
||||
//首先清空用户buffer
|
||||
memset(user_gpio_cfg, 0, sizeof(script_gpio_set_t) * gpio_count);
|
||||
//保存主键名称和子键名称,如果超过31字节则截取31字节
|
||||
main_char = main_name;
|
||||
if(_test_str_length(main_name) > 31)
|
||||
{
|
||||
memset(main_bkname, 0, 32);
|
||||
strncpy(main_bkname, main_name, 31);
|
||||
main_char = main_bkname;
|
||||
}
|
||||
|
||||
for(i=0;i<script_main_key_count;i++)
|
||||
{
|
||||
main_key = (script_main_key_t *)(script_mod_buf + (sizeof(script_head_t)) + i * sizeof(script_main_key_t));
|
||||
if(strcmp(main_key->main_name, main_char)) //如果主键不匹配,寻找下一个主键
|
||||
{
|
||||
continue;
|
||||
}
|
||||
//主键匹配,寻找子键名称匹配
|
||||
user_index = 0;
|
||||
for(j=0;j<main_key->lenth;j++)
|
||||
{
|
||||
sub_key = (script_sub_key_t *)(script_mod_buf + (main_key->offset<<2) + (j * sizeof(script_sub_key_t)));
|
||||
pattern = (sub_key->pattern>>16) & 0xffff; //获取数据的类型
|
||||
//取出数据
|
||||
if(DATA_TYPE_GPIO_WORD == pattern)
|
||||
{
|
||||
strcpy( user_gpio_cfg[user_index].gpio_name, sub_key->sub_name);
|
||||
memcpy(&user_gpio_cfg[user_index].port, script_mod_buf + (sub_key->offset<<2), sizeof(script_gpio_set_t) - 32);
|
||||
user_index++;
|
||||
if(user_index >= gpio_count)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return SCRIPT_PARSER_OK;
|
||||
}
|
||||
|
||||
return SCRIPT_PARSER_KEY_NOT_FIND;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
82
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/script.h
Normal file
82
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/script.h
Normal file
@ -0,0 +1,82 @@
|
||||
/*
|
||||
**********************************************************************************************************************
|
||||
* eGon
|
||||
* the Embedded System
|
||||
* script parser sub-system
|
||||
*
|
||||
* Copyright(C), 2006-2010, SoftWinners Microelectronic Co., Ltd.
|
||||
* All Rights Reserved
|
||||
*
|
||||
* File : script.c
|
||||
*
|
||||
* By : Jerry
|
||||
*
|
||||
* Version : V2.00
|
||||
*
|
||||
* Date :
|
||||
*
|
||||
* Descript:
|
||||
**********************************************************************************************************************
|
||||
*/
|
||||
#ifndef _SCRIPT_H_
|
||||
#define _SCRIPT_H_
|
||||
|
||||
#define DATA_TYPE_SINGLE_WORD (1)
|
||||
#define DATA_TYPE_STRING (2)
|
||||
#define DATA_TYPE_MULTI_WORD (3)
|
||||
#define DATA_TYPE_GPIO_WORD (4)
|
||||
|
||||
#define SCRIPT_PARSER_OK (0)
|
||||
#define SCRIPT_PARSER_EMPTY_BUFFER (-1)
|
||||
#define SCRIPT_PARSER_KEYNAME_NULL (-2)
|
||||
#define SCRIPT_PARSER_DATA_VALUE_NULL (-3)
|
||||
#define SCRIPT_PARSER_KEY_NOT_FIND (-4)
|
||||
#define SCRIPT_PARSER_BUFFER_NOT_ENOUGH (-5)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int main_key_count;
|
||||
int version[3];
|
||||
}
|
||||
script_head_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char main_name[32];
|
||||
int lenth;
|
||||
int offset;
|
||||
}
|
||||
script_main_key_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char sub_name[32];
|
||||
int offset;
|
||||
int pattern;
|
||||
}
|
||||
script_sub_key_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char gpio_name[32];
|
||||
int port;
|
||||
int port_num;
|
||||
int mul_sel;
|
||||
int pull;
|
||||
int drv_level;
|
||||
int data;
|
||||
}
|
||||
script_gpio_set_t;
|
||||
|
||||
extern int script_parser_init(char *script_buf);
|
||||
extern int script_parser_exit(void);
|
||||
extern int script_parser_fetch(char *main_name, char *sub_name, int value[]);
|
||||
extern int script_parser_subkey_count(char *main_name);
|
||||
extern int script_parser_mainkey_count(void);
|
||||
extern int script_parser_mainkey_get_gpio_count(char *main_name);
|
||||
extern int script_parser_mainkey_get_gpio_cfg(char *main_name, void *gpio_cfg, int gpio_count);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
105
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/spare_head.h
Normal file
105
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/spare_head.h
Normal file
@ -0,0 +1,105 @@
|
||||
/*
|
||||
* (C) Copyright 2012
|
||||
* wangflord@allwinnertech.com
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program;
|
||||
*
|
||||
*/
|
||||
#ifndef __spare_head_h__
|
||||
#define __spare_head_h__
|
||||
|
||||
/* work mode */
|
||||
#define WORK_MODE_PRODUCT (1<<4)
|
||||
#define WORK_MODE_UPDATE (1<<5)
|
||||
|
||||
#define WORK_MODE_BOOT 0x00 //正常启动
|
||||
#define WORK_MODE_USB_PRODUCT 0x10 //用于USB量产
|
||||
#define WORK_MODE_CARD_PRODUCT 0x11 //用于卡量产
|
||||
#define WORK_MODE_USB_UPDATE 0x20 //用于USB升级
|
||||
#define WORK_MODE_OUTER_UPDATE 0x21 //用于外部盘升级
|
||||
|
||||
#define UBOOT_MAGIC "uboot"
|
||||
#define STAMP_VALUE 0x5F0A6C39
|
||||
#define ALIGN_SIZE 8 * 1024
|
||||
|
||||
typedef struct _normal_gpio_cfg
|
||||
{
|
||||
char port; //端口号
|
||||
char port_num; //端口内编号
|
||||
char mul_sel; //功能编号
|
||||
char pull; //电阻状态
|
||||
char drv_level; //驱动驱动能力
|
||||
char data; //输出电平
|
||||
char reserved[2]; //保留位,保证对齐
|
||||
}
|
||||
normal_gpio_cfg;
|
||||
|
||||
//SD卡相关数据结构
|
||||
typedef struct sdcard_spare_info_t
|
||||
{
|
||||
int card_no[4]; //当前启动的卡控制器编号
|
||||
int speed_mode[4]; //卡的速度模式,0:低速,其它:高速
|
||||
int line_sel[4]; //卡的线制,0: 1线,其它,4线
|
||||
int line_count[4]; //卡使用线的个数
|
||||
}
|
||||
sdcard_spare_info;
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* the control information stored in file head */
|
||||
/******************************************************************************/
|
||||
struct spare_boot_ctrl_head
|
||||
{
|
||||
unsigned int jump_instruction; // one intruction jumping to real code
|
||||
unsigned char magic[8]; // ="u-boot"
|
||||
unsigned int check_sum; // generated by PC
|
||||
unsigned int align_size; // align size in byte
|
||||
unsigned int length; // the size of all file
|
||||
unsigned int uboot_length; // the size of uboot
|
||||
unsigned char version[8]; // uboot version
|
||||
unsigned char platform[8]; // platform information
|
||||
int reserved[1]; //stamp space, 16bytes align
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
/* the data stored in file head */
|
||||
/******************************************************************************/
|
||||
struct spare_boot_data_head
|
||||
{
|
||||
unsigned int dram_para[32];
|
||||
int run_clock; // Mhz
|
||||
int run_core_vol; // mV
|
||||
int uart_port; // UART控制器编号
|
||||
normal_gpio_cfg uart_gpio[2]; // UART控制器(调试打印口)GPIO信息
|
||||
int twi_port; // TWI控制器编号
|
||||
normal_gpio_cfg twi_gpio[2]; // TWI控制器GPIO信息,用于控制TWI
|
||||
int work_mode; // 工作模式
|
||||
int storage_type; // 存储介质类型 0:nand 1:sdcard 2: spinor
|
||||
normal_gpio_cfg nand_gpio[32]; // nand GPIO信息
|
||||
char nand_spare_data[256]; // nand 额外信息
|
||||
normal_gpio_cfg sdcard_gpio[32]; // sdcard GPIO信息
|
||||
char sdcard_spare_data[256]; // sdcard 额外信息
|
||||
int reserved[6]; // 保留数据位, 16bytes align
|
||||
};
|
||||
|
||||
struct spare_boot_head_t
|
||||
{
|
||||
struct spare_boot_ctrl_head boot_head;
|
||||
struct spare_boot_data_head boot_data;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
186
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/types.h
Normal file
186
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/types.h
Normal file
@ -0,0 +1,186 @@
|
||||
/*
|
||||
**********************************************************************************************************************
|
||||
* eGon
|
||||
* the Embedded GO-ON Bootloader System
|
||||
* eGON arm boot sub-system
|
||||
*
|
||||
* Copyright(C), 2006-2010, SoftWinners Microelectronic Co., Ltd.
|
||||
* All Rights Reserved
|
||||
*
|
||||
* File : types.h
|
||||
*
|
||||
* By : Jerry
|
||||
*
|
||||
* Version : V2.00
|
||||
*
|
||||
* Date :
|
||||
*
|
||||
* Descript:
|
||||
**********************************************************************************************************************
|
||||
*/
|
||||
#ifndef __TYPES_H_
|
||||
#define __TYPES_H_ 1
|
||||
|
||||
|
||||
//#define NULL 0 /* Ö¸Õë¿Õ */
|
||||
|
||||
/*
|
||||
**********************************************************************************************************************
|
||||
* DATA TYPES
|
||||
**********************************************************************************************************************
|
||||
*/
|
||||
//**************************************************
|
||||
//normal typedef
|
||||
/*
|
||||
typedef unsigned __int64 __u64;
|
||||
typedef unsigned __int64 u64;
|
||||
|
||||
typedef signed __int64 __s64;
|
||||
typedef signed __int64 s64;
|
||||
*/
|
||||
typedef unsigned int __u32;
|
||||
typedef unsigned int u32;
|
||||
|
||||
typedef signed int __s32;
|
||||
typedef signed int s32;
|
||||
|
||||
typedef unsigned short __u16;
|
||||
typedef unsigned short u16;
|
||||
|
||||
typedef signed short __s16;
|
||||
typedef signed short s16;
|
||||
|
||||
typedef unsigned char __u8;
|
||||
typedef unsigned char u8;
|
||||
|
||||
typedef signed char __s8;
|
||||
typedef signed char s8;
|
||||
|
||||
|
||||
typedef signed char __bool;
|
||||
typedef signed char __Bool;
|
||||
|
||||
typedef unsigned int __stk; /* Each stack entry is 32-bit wide */
|
||||
typedef unsigned int __cpu_sr; /* Define size of CPU status register (PSR = 32 bits) */
|
||||
|
||||
|
||||
typedef float __fp32; /* Single precision floating point */
|
||||
typedef double __fp64; /* Double precision floating point */
|
||||
|
||||
typedef unsigned int __hdle;
|
||||
|
||||
//typedef unsigned int __size;
|
||||
//typedef unsigned int __size_t;
|
||||
|
||||
typedef unsigned int __sector_t;
|
||||
|
||||
typedef unsigned char u_char;
|
||||
typedef unsigned short u_short;
|
||||
typedef unsigned int u_int;
|
||||
typedef unsigned long u_long;
|
||||
|
||||
/* sysv */
|
||||
typedef unsigned char unchar;
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned int uint;
|
||||
typedef unsigned long ulong;
|
||||
|
||||
typedef __u8 uint8_t;
|
||||
typedef __u16 uint16_t;
|
||||
typedef __u32 uint32_t;
|
||||
|
||||
#define eGON2_OK (0)
|
||||
#define eGON2_FAIL (-1)
|
||||
|
||||
#undef _set_bit
|
||||
#define _set_bit( value, bit ) ( (x) |= ( 1U << (y) ) )
|
||||
|
||||
#undef set_bit
|
||||
#define set_bit( value, bit ) ( (x) |= ( 1U << (y) ) )
|
||||
|
||||
#undef _clear_bit
|
||||
#define _clear_bit( value, bit ) ( (x) &= ~( 1U << (y) ) )
|
||||
|
||||
#undef clear_bit
|
||||
#define clear_bit( value, bit ) ( (x) &= ~( 1U << (y) ) )
|
||||
|
||||
#undef _set_bit
|
||||
#define _set_bit( value, bit ) ( (value) |= ( 1U << (bit) ) )
|
||||
|
||||
#undef set_bit
|
||||
#define set_bit( value, bit ) ( (value) |= ( 1U << (bit) ) )
|
||||
|
||||
#undef _clear_bit
|
||||
#define _clear_bit( value, bit ) ( (value) &= ~( 1U << (bit) ) )
|
||||
|
||||
#undef clear_bit
|
||||
#define clear_bit( value, bit ) ( (value) &= ~( 1U << (bit) ) )
|
||||
|
||||
#undef _reverse_bit
|
||||
#define _reverse_bit( value, bit ) ( (value) ^= ( 1U << (bit) ) )
|
||||
|
||||
#undef reverse_bit
|
||||
#define reverse_bit( value, bit ) ( (value) ^= ( 1U << (bit) ) )
|
||||
|
||||
#undef _test_bit
|
||||
#define _test_bit( value, bit ) ( (value) & ( 1U << (bit) ) )
|
||||
|
||||
#undef test_bit
|
||||
#define test_bit( value, bit ) ( (value) & ( 1U << (bit) ) )
|
||||
|
||||
|
||||
#undef _min
|
||||
#define _min( x, y ) ( (x) < (y) ? (x) : (y) )
|
||||
|
||||
#undef min
|
||||
#define min( x, y ) ( (x) < (y) ? (x) : (y) )
|
||||
|
||||
#undef _max
|
||||
#define _max( x, y ) ( (x) > (y) ? (x) : (y) )
|
||||
|
||||
#undef max
|
||||
#define max( x, y ) ( (x) > (y) ? (x) : (y) )
|
||||
|
||||
/* È¡¾ø¶ÔÖµ */
|
||||
#undef _absolute
|
||||
#define _absolute(p) ((p) > 0 ? (p) : -(p))
|
||||
|
||||
#undef absolute
|
||||
#define absolute(p) ((p) > 0 ? (p) : -(p))
|
||||
|
||||
|
||||
#ifndef SZ_1K
|
||||
#define SZ_512 0x00000200U
|
||||
#define SZ_1K 0x00000400U
|
||||
#define SZ_2K 0x00000800U
|
||||
#define SZ_4K 0x00001000U
|
||||
#define SZ_8K 0x00002000U
|
||||
#define SZ_16K 0x00004000U
|
||||
#define SZ_32K 0x00008000U
|
||||
#define SZ_64K 0x00010000U
|
||||
#define SZ_128K 0x00020000U
|
||||
#define SZ_256K 0x00040000U
|
||||
#define SZ_512K 0x00080000U
|
||||
#define SZ_1M 0x00100000U
|
||||
#define SZ_2M 0x00200000U
|
||||
#define SZ_4M 0x00400000U
|
||||
#define SZ_8M 0x00800000U
|
||||
#define SZ_16M 0x01000000U
|
||||
#define SZ_32M 0x02000000U
|
||||
#define SZ_64M 0x04000000U
|
||||
#define SZ_128M 0x08000000U
|
||||
#define SZ_256M 0x10000000U
|
||||
#define SZ_512M 0x20000000U
|
||||
#define SZ_1G 0x40000000U
|
||||
#define SZ_2G 0x80000000U
|
||||
#define SZ_4G 0x0100000000ULL
|
||||
#define SZ_8G 0x0200000000ULL
|
||||
#define SZ_16G 0x0400000000ULL
|
||||
#define SZ_32G 0x0800000000ULL
|
||||
#define SZ_64G 0x1000000000ULL
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*#ifndef __TYPES_H_*/
|
||||
|
||||
|
794
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/update_uboot.c
Normal file
794
SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/update_uboot.c
Normal file
@ -0,0 +1,794 @@
|
||||
// update_uboot.cpp : Defines the entry point for the console application.
|
||||
//
|
||||
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include "types.h"
|
||||
#include "spare_head.h"
|
||||
#include "check.h"
|
||||
#include "script.h"
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define MAX_PATH (260)
|
||||
|
||||
|
||||
int script_length;
|
||||
int align_size;
|
||||
|
||||
void *script_file_decode(char *script_name);
|
||||
int merge_uboot(char *source_uboot_name, char *script_name);
|
||||
|
||||
int update_for_uboot(char *uboot_name);
|
||||
//------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// 函数说明
|
||||
//
|
||||
//
|
||||
// 参数说明
|
||||
//
|
||||
//
|
||||
// 返回值
|
||||
//
|
||||
//
|
||||
// 其他
|
||||
// 无
|
||||
//
|
||||
//------------------------------------------------------------------------------------------------------------
|
||||
int IsFullName(const char *FilePath)
|
||||
{
|
||||
if (isalpha(FilePath[0]) && ':' == FilePath[1])
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// 函数说明
|
||||
//
|
||||
//
|
||||
// 参数说明
|
||||
//
|
||||
//
|
||||
// 返回值
|
||||
//
|
||||
//
|
||||
// 其他
|
||||
// 无
|
||||
//
|
||||
//------------------------------------------------------------------------------------------------------------
|
||||
void GetFullPath(char *dName, const char *sName)
|
||||
{
|
||||
char Buffer[MAX_PATH];
|
||||
|
||||
if(IsFullName(sName))
|
||||
{
|
||||
strcpy(dName, sName);
|
||||
return ;
|
||||
}
|
||||
|
||||
/* Get the current working directory: */
|
||||
if(getcwd(Buffer, MAX_PATH ) == NULL)
|
||||
{
|
||||
perror( "getcwd error" );
|
||||
return ;
|
||||
}
|
||||
sprintf(dName, "%s/%s", Buffer, sName);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// 函数说明
|
||||
//
|
||||
//
|
||||
// 参数说明
|
||||
//
|
||||
//
|
||||
// 返回值
|
||||
//
|
||||
//
|
||||
// 其他
|
||||
// 无
|
||||
//
|
||||
//------------------------------------------------------------------------------------------------------------
|
||||
void Usage(void)
|
||||
{
|
||||
printf("\n");
|
||||
printf("Usage:\n");
|
||||
printf("update.exe script file path para file path\n\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
char str1[] = "D:\\winners\\eBase\\eGON\\EGON2_TRUNK\\boot_23\\workspace\\eGon\\boot1.bin";
|
||||
char str2[] = "D:\\winners\\eBase\\eGON\\EGON2_TRUNK\\boot_23\\workspace\\wboot\\bootfs\\script.bin";
|
||||
char source_uboot_name[MAX_PATH];
|
||||
char script_file_name[MAX_PATH];
|
||||
FILE *src_file = NULL;
|
||||
// FILE *script_file;
|
||||
// int source_length;
|
||||
// int script_length;
|
||||
// int total_length;
|
||||
// char *pbuf_source, *pbuf_script;
|
||||
char *script_buf = NULL;
|
||||
|
||||
#if 1
|
||||
if(argc == 3)
|
||||
{
|
||||
if((argv[1] == NULL) || (argv[2] == NULL))
|
||||
{
|
||||
printf("update error: one of the input file names is empty\n");
|
||||
|
||||
return __LINE__;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Usage();
|
||||
|
||||
return __LINE__;
|
||||
}
|
||||
GetFullPath(source_uboot_name, argv[1]);
|
||||
GetFullPath(script_file_name, argv[2]);
|
||||
#else
|
||||
strcpy(source_boot1_name, str1);
|
||||
strcpy(script_file_name, str2);
|
||||
#endif
|
||||
|
||||
printf("\n");
|
||||
printf("uboot file Path=%s\n", source_uboot_name);
|
||||
printf("script file Path=%s\n", script_file_name);
|
||||
printf("\n");
|
||||
//初始化配置脚本
|
||||
script_buf = (char *)script_file_decode(script_file_name);
|
||||
if(!script_buf)
|
||||
{
|
||||
printf("update uboot error: unable to get script data\n");
|
||||
|
||||
goto _err_out;
|
||||
}
|
||||
script_parser_init(script_buf);
|
||||
//读取原始uboot
|
||||
if(update_for_uboot(source_uboot_name))
|
||||
{
|
||||
printf("update uboot error: update error\n");
|
||||
|
||||
goto _err_out;
|
||||
}
|
||||
if(align_uboot(source_uboot_name))
|
||||
{
|
||||
printf("update uboot error: align error\n");
|
||||
}
|
||||
if(merge_uboot(source_uboot_name, script_file_name))
|
||||
{
|
||||
printf("update uboot error: merge error\n");
|
||||
|
||||
goto _err_out;
|
||||
}
|
||||
_err_out:
|
||||
if(script_buf)
|
||||
{
|
||||
free(script_buf);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int update_sdcard_info(void *gpio_info, void *card_info_buf)
|
||||
{
|
||||
int i, value[8];
|
||||
int card_no;
|
||||
script_gpio_set_t gpio_set;
|
||||
normal_gpio_cfg *storage_gpio;
|
||||
sdcard_spare_info *card_info;
|
||||
|
||||
card_info = (sdcard_spare_info *)card_info_buf;
|
||||
card_info->card_no[0] = -1;
|
||||
card_info->card_no[1] = -1;
|
||||
//填写SDCARD参数
|
||||
for(i=0;i<2;i++)
|
||||
{
|
||||
char card_str[32];
|
||||
|
||||
card_no = i * 2;
|
||||
memset(card_str, 0, 32);
|
||||
strcpy(card_str, "card_boot0_para");
|
||||
card_str[9] = '0' + card_no;
|
||||
storage_gpio = (normal_gpio_cfg *)gpio_info + i * 8;
|
||||
|
||||
if(!script_parser_fetch(card_str, "card_ctrl", value))
|
||||
{
|
||||
card_info->card_no[i] = value[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
card_info->card_no[i] = -1;
|
||||
continue;
|
||||
}
|
||||
if(!script_parser_fetch(card_str, "card_high_speed", value))
|
||||
{
|
||||
card_info->speed_mode[i] = value[0];
|
||||
}
|
||||
if(!script_parser_fetch(card_str, "card_line", value))
|
||||
{
|
||||
card_info->line_sel[i] = value[0];
|
||||
}
|
||||
//获取CLK
|
||||
memset(&gpio_set, 0, sizeof(script_gpio_set_t));
|
||||
if(!script_parser_fetch(card_str, "SDC_CLK", (int *)&gpio_set))
|
||||
{
|
||||
storage_gpio[0].port = gpio_set.port;
|
||||
storage_gpio[0].port_num = gpio_set.port_num;
|
||||
storage_gpio[0].mul_sel = gpio_set.mul_sel;
|
||||
storage_gpio[0].pull = gpio_set.pull;
|
||||
storage_gpio[0].drv_level = gpio_set.drv_level;
|
||||
storage_gpio[0].data = gpio_set.data;
|
||||
}
|
||||
else if(!script_parser_fetch(card_str, "sdc_clk", (int *)&gpio_set))
|
||||
{
|
||||
storage_gpio[0].port = gpio_set.port;
|
||||
storage_gpio[0].port_num = gpio_set.port_num;
|
||||
storage_gpio[0].mul_sel = gpio_set.mul_sel;
|
||||
storage_gpio[0].pull = gpio_set.pull;
|
||||
storage_gpio[0].drv_level = gpio_set.drv_level;
|
||||
storage_gpio[0].data = gpio_set.data;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("update error: unable to find SDC%d CLOCK PIN\n", i);
|
||||
|
||||
return -1;
|
||||
}
|
||||
//获取CMD
|
||||
memset(&gpio_set, 0, sizeof(script_gpio_set_t));
|
||||
if(!script_parser_fetch(card_str, "SDC_CMD", (int *)&gpio_set))
|
||||
{
|
||||
storage_gpio[1].port = gpio_set.port;
|
||||
storage_gpio[1].port_num = gpio_set.port_num;
|
||||
storage_gpio[1].mul_sel = gpio_set.mul_sel;
|
||||
storage_gpio[1].pull = gpio_set.pull;
|
||||
storage_gpio[1].drv_level = gpio_set.drv_level;
|
||||
storage_gpio[1].data = gpio_set.data;
|
||||
}
|
||||
else if(!script_parser_fetch(card_str, "sdc_cmd", (int *)&gpio_set))
|
||||
{
|
||||
storage_gpio[1].port = gpio_set.port;
|
||||
storage_gpio[1].port_num = gpio_set.port_num;
|
||||
storage_gpio[1].mul_sel = gpio_set.mul_sel;
|
||||
storage_gpio[1].pull = gpio_set.pull;
|
||||
storage_gpio[1].drv_level = gpio_set.drv_level;
|
||||
storage_gpio[1].data = gpio_set.data;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("update error: unable to find SDC%d CLOCK CMD\n", i);
|
||||
|
||||
return -1;
|
||||
}
|
||||
//获取DATA0
|
||||
memset(&gpio_set, 0, sizeof(script_gpio_set_t));
|
||||
if(!script_parser_fetch(card_str, "SDC_D0", (int *)&gpio_set))
|
||||
{
|
||||
storage_gpio[2].port = gpio_set.port;
|
||||
storage_gpio[2].port_num = gpio_set.port_num;
|
||||
storage_gpio[2].mul_sel = gpio_set.mul_sel;
|
||||
storage_gpio[2].pull = gpio_set.pull;
|
||||
storage_gpio[2].drv_level = gpio_set.drv_level;
|
||||
storage_gpio[2].data = gpio_set.data;
|
||||
}
|
||||
if(!script_parser_fetch(card_str, "sdc_d0", (int *)&gpio_set))
|
||||
{
|
||||
storage_gpio[2].port = gpio_set.port;
|
||||
storage_gpio[2].port_num = gpio_set.port_num;
|
||||
storage_gpio[2].mul_sel = gpio_set.mul_sel;
|
||||
storage_gpio[2].pull = gpio_set.pull;
|
||||
storage_gpio[2].drv_level = gpio_set.drv_level;
|
||||
storage_gpio[2].data = gpio_set.data;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("update error: unable to find SDC%d CLOCK DATA0\n", i);
|
||||
|
||||
return -1;
|
||||
}
|
||||
card_info->line_count[i] = 3;
|
||||
if(1 != card_info->line_sel[i])
|
||||
{
|
||||
card_info->line_count[i] = 6;
|
||||
//获取DATA1
|
||||
memset(&gpio_set, 0, sizeof(script_gpio_set_t));
|
||||
if(!script_parser_fetch(card_str, "SDC_D1", (int *)&gpio_set))
|
||||
{
|
||||
storage_gpio[3].port = gpio_set.port;
|
||||
storage_gpio[3].port_num = gpio_set.port_num;
|
||||
storage_gpio[3].mul_sel = gpio_set.mul_sel;
|
||||
storage_gpio[3].pull = gpio_set.pull;
|
||||
storage_gpio[3].drv_level = gpio_set.drv_level;
|
||||
storage_gpio[3].data = gpio_set.data;
|
||||
}
|
||||
else if(!script_parser_fetch(card_str, "sdc_d1", (int *)&gpio_set))
|
||||
{
|
||||
storage_gpio[3].port = gpio_set.port;
|
||||
storage_gpio[3].port_num = gpio_set.port_num;
|
||||
storage_gpio[3].mul_sel = gpio_set.mul_sel;
|
||||
storage_gpio[3].pull = gpio_set.pull;
|
||||
storage_gpio[3].drv_level = gpio_set.drv_level;
|
||||
storage_gpio[3].data = gpio_set.data;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("update error: unable to find SDC%d CLOCK DATA1\n", i);
|
||||
|
||||
return -1;
|
||||
}
|
||||
//获取DATA2
|
||||
memset(&gpio_set, 0, sizeof(script_gpio_set_t));
|
||||
if(!script_parser_fetch(card_str, "SDC_D2", (int *)&gpio_set))
|
||||
{
|
||||
storage_gpio[4].port = gpio_set.port;
|
||||
storage_gpio[4].port_num = gpio_set.port_num;
|
||||
storage_gpio[4].mul_sel = gpio_set.mul_sel;
|
||||
storage_gpio[4].pull = gpio_set.pull;
|
||||
storage_gpio[4].drv_level = gpio_set.drv_level;
|
||||
storage_gpio[4].data = gpio_set.data;
|
||||
}
|
||||
else if(!script_parser_fetch(card_str, "sdc_d2", (int *)&gpio_set))
|
||||
{
|
||||
storage_gpio[4].port = gpio_set.port;
|
||||
storage_gpio[4].port_num = gpio_set.port_num;
|
||||
storage_gpio[4].mul_sel = gpio_set.mul_sel;
|
||||
storage_gpio[4].pull = gpio_set.pull;
|
||||
storage_gpio[4].drv_level = gpio_set.drv_level;
|
||||
storage_gpio[4].data = gpio_set.data;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("update error: unable to find SDC%d CLOCK DATA2\n", i);
|
||||
|
||||
return -1;
|
||||
}
|
||||
//获取DATA3
|
||||
memset(&gpio_set, 0, sizeof(script_gpio_set_t));
|
||||
if(!script_parser_fetch(card_str, "SDC_D3", (int *)&gpio_set))
|
||||
{
|
||||
storage_gpio[5].port = gpio_set.port;
|
||||
storage_gpio[5].port_num = gpio_set.port_num;
|
||||
storage_gpio[5].mul_sel = gpio_set.mul_sel;
|
||||
storage_gpio[5].pull = gpio_set.pull;
|
||||
storage_gpio[5].drv_level = gpio_set.drv_level;
|
||||
storage_gpio[5].data = gpio_set.data;
|
||||
}
|
||||
else if(!script_parser_fetch(card_str, "sdc_d3", (int *)&gpio_set))
|
||||
{
|
||||
storage_gpio[5].port = gpio_set.port;
|
||||
storage_gpio[5].port_num = gpio_set.port_num;
|
||||
storage_gpio[5].mul_sel = gpio_set.mul_sel;
|
||||
storage_gpio[5].pull = gpio_set.pull;
|
||||
storage_gpio[5].drv_level = gpio_set.drv_level;
|
||||
storage_gpio[5].data = gpio_set.data;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("update error: unable to find SDC%d CLOCK DATA3\n", i);
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
card_info ++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int update_nand_info(void *gpio_info)
|
||||
{
|
||||
script_gpio_set_t gpio_set[32];
|
||||
normal_gpio_cfg *gpio;
|
||||
int i;
|
||||
|
||||
gpio = (normal_gpio_cfg *)gpio_info;
|
||||
if(!script_parser_mainkey_get_gpio_cfg("nand_para", gpio_set, 32))
|
||||
{
|
||||
for(i=0;i<32;i++)
|
||||
{
|
||||
if(!gpio_set[i].port)
|
||||
{
|
||||
break;
|
||||
}
|
||||
gpio[i].port = gpio_set[i].port;
|
||||
gpio[i].port_num = gpio_set[i].port_num;
|
||||
gpio[i].mul_sel = gpio_set[i].mul_sel;
|
||||
gpio[i].pull = gpio_set[i].pull;
|
||||
gpio[i].drv_level = gpio_set[i].drv_level;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int update_for_uboot(char *uboot_name)
|
||||
{
|
||||
FILE *uboot_file = NULL;
|
||||
struct spare_boot_head_t *uboot_head;
|
||||
char *uboot_buf = NULL;
|
||||
int length = 0;
|
||||
int i;
|
||||
int ret = -1;
|
||||
int value[8];
|
||||
script_gpio_set_t gpio_set[32];
|
||||
|
||||
uboot_file = fopen(uboot_name, "rb+");
|
||||
if(uboot_file == NULL)
|
||||
{
|
||||
printf("update uboot error : unable to open uboot file\n");
|
||||
goto _err_uboot_out;
|
||||
}
|
||||
fseek(uboot_file, 0, SEEK_END);
|
||||
length = ftell(uboot_file);
|
||||
fseek(uboot_file, 0, SEEK_SET);
|
||||
if(!length)
|
||||
{
|
||||
printf("update uboot error : uboot length is zero\n");
|
||||
goto _err_uboot_out;
|
||||
}
|
||||
uboot_buf = (char *)malloc(length);
|
||||
if(!uboot_buf)
|
||||
{
|
||||
printf("update uboot error : fail to malloc memory for uboot\n");
|
||||
goto _err_uboot_out;
|
||||
}
|
||||
fread(uboot_buf, length, 1, uboot_file);
|
||||
rewind(uboot_file);
|
||||
uboot_head = (struct spare_boot_head_t *)uboot_buf;
|
||||
//检查uboot的数据结构是否完整
|
||||
align_size = uboot_head->boot_head.align_size;
|
||||
//增加判断:是否是原始uboot
|
||||
if((uboot_head->boot_head.length == uboot_head->boot_head.uboot_length))
|
||||
{
|
||||
//uboot长度和原始整体长度一致,表示是原始uboot
|
||||
uboot_head->boot_head.length = length;
|
||||
uboot_head->boot_head.uboot_length = length;
|
||||
}
|
||||
//否则,不需要修改文件长度
|
||||
//printf("size=%d, magic=%s\n", uboot_head->boot_head.length, UBOOT_MAGIC);
|
||||
//ret = check_file( (unsigned int *)uboot_buf, uboot_head->boot_head.length, UBOOT_MAGIC );
|
||||
ret = check_magic( (unsigned int *)uboot_buf, UBOOT_MAGIC );
|
||||
if( ret != CHECK_IS_CORRECT )
|
||||
{
|
||||
printf("update uboot error : uboot pre checksum error\n");
|
||||
goto _err_uboot_out;
|
||||
}
|
||||
//取出数据进行修正,UART参数
|
||||
if(!script_parser_fetch("uart_para", "uart_debug_port", value))
|
||||
{
|
||||
uboot_head->boot_data.uart_port = value[0];
|
||||
}
|
||||
if(!script_parser_mainkey_get_gpio_cfg("uart_para", gpio_set, 32))
|
||||
{
|
||||
for(i=0;i<2;i++)
|
||||
{
|
||||
if(!gpio_set[i].port)
|
||||
{
|
||||
break;
|
||||
}
|
||||
uboot_head->boot_data.uart_gpio[i].port = gpio_set[i].port;
|
||||
uboot_head->boot_data.uart_gpio[i].port_num = gpio_set[i].port_num;
|
||||
uboot_head->boot_data.uart_gpio[i].mul_sel = gpio_set[i].mul_sel;
|
||||
uboot_head->boot_data.uart_gpio[i].pull = gpio_set[i].pull;
|
||||
uboot_head->boot_data.uart_gpio[i].drv_level = gpio_set[i].drv_level;
|
||||
uboot_head->boot_data.uart_gpio[i].data = gpio_set[i].data;
|
||||
}
|
||||
}
|
||||
//取出数据进行修正,TWI参数
|
||||
if(!script_parser_fetch("twi_para", "twi_port", value))
|
||||
{
|
||||
uboot_head->boot_data.twi_port = value[0];
|
||||
}
|
||||
if(!script_parser_mainkey_get_gpio_cfg("twi_para", gpio_set, 32))
|
||||
{
|
||||
for(i=0;i<2;i++)
|
||||
{
|
||||
if(!gpio_set[i].port)
|
||||
{
|
||||
break;
|
||||
}
|
||||
uboot_head->boot_data.twi_gpio[i].port = gpio_set[i].port;
|
||||
uboot_head->boot_data.twi_gpio[i].port_num = gpio_set[i].port_num;
|
||||
uboot_head->boot_data.twi_gpio[i].mul_sel = gpio_set[i].mul_sel;
|
||||
uboot_head->boot_data.twi_gpio[i].pull = gpio_set[i].pull;
|
||||
uboot_head->boot_data.twi_gpio[i].drv_level = gpio_set[i].drv_level;
|
||||
uboot_head->boot_data.twi_gpio[i].data = gpio_set[i].data;
|
||||
}
|
||||
}
|
||||
//根据数据进行修正,修正target参数
|
||||
if(!script_parser_fetch("target", "boot_clock", value))
|
||||
{
|
||||
uboot_head->boot_data.run_clock = value[0];
|
||||
}
|
||||
if(!script_parser_fetch("target", "dcdc3_vol", value))
|
||||
{
|
||||
uboot_head->boot_data.run_core_vol = value[0];
|
||||
}
|
||||
//修正存储设备信息
|
||||
if(update_sdcard_info((void *)uboot_head->boot_data.sdcard_gpio, (void *)uboot_head->boot_data.sdcard_spare_data))
|
||||
{
|
||||
goto _err_uboot_out;
|
||||
}
|
||||
update_nand_info((void *)uboot_head->boot_data.nand_gpio);
|
||||
//数据修正完毕
|
||||
//重新计算校验和
|
||||
gen_check_sum( (void *)uboot_buf );
|
||||
|
||||
//再检查一次
|
||||
//printf("size=%d, magic=%s\n", uboot_head->boot_head.length, UBOOT_MAGIC);
|
||||
ret = check_file( (unsigned int *)uboot_buf, uboot_head->boot_head.length, UBOOT_MAGIC );
|
||||
if( ret != CHECK_IS_CORRECT )
|
||||
{
|
||||
printf("update uboot error : uboot after checksum error\n");
|
||||
goto _err_uboot_out;
|
||||
}
|
||||
fwrite(uboot_buf, length, 1, uboot_file);
|
||||
|
||||
_err_uboot_out:
|
||||
if(uboot_buf)
|
||||
{
|
||||
free(uboot_buf);
|
||||
}
|
||||
if(uboot_file)
|
||||
{
|
||||
fclose(uboot_file);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void *script_file_decode(char *script_file_name)
|
||||
{
|
||||
FILE *script_file;
|
||||
void *script_buf = NULL;
|
||||
//读取原始脚本
|
||||
script_file = fopen(script_file_name, "rb");
|
||||
if(!script_file)
|
||||
{
|
||||
printf("update error:unable to open script file\n");
|
||||
return NULL;
|
||||
}
|
||||
//获取原始脚本长度
|
||||
fseek(script_file, 0, SEEK_END);
|
||||
script_length = ftell(script_file);
|
||||
if(!script_length)
|
||||
{
|
||||
fclose(script_file);
|
||||
printf("the length of script is zero\n");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
//读取原始脚本
|
||||
script_buf = (char *)malloc(script_length);
|
||||
if(!script_buf)
|
||||
{
|
||||
fclose(script_file);
|
||||
printf("unable malloc memory for script\n");
|
||||
|
||||
return NULL;;
|
||||
}
|
||||
fseek(script_file, 0, SEEK_SET);
|
||||
fread(script_buf, script_length, 1, script_file);
|
||||
fclose(script_file);
|
||||
|
||||
return script_buf;
|
||||
}
|
||||
|
||||
|
||||
int reconstruct_uboot(char *buf, int length, char *script_buf, int script_length)
|
||||
{
|
||||
struct spare_boot_ctrl_head *head;
|
||||
int total_length;
|
||||
int script_align;
|
||||
char *tmp_start;
|
||||
|
||||
head = (struct spare_boot_ctrl_head *)buf;
|
||||
|
||||
script_align = script_length;
|
||||
if(script_length & (align_size - 1))
|
||||
{
|
||||
script_align = (script_length + align_size) & (~(align_size - 1));
|
||||
}
|
||||
total_length = script_align + length;
|
||||
head->uboot_length = length;
|
||||
head->length = total_length;
|
||||
tmp_start = buf + length;
|
||||
|
||||
memset(tmp_start, 0xff, script_align);
|
||||
memcpy(tmp_start, script_buf, script_length);
|
||||
if(gen_check_sum(buf))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
//printf("checksum=%x\n", head->check_sum);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int merge_uboot(char *source_uboot_name, char *script_file_name)
|
||||
{
|
||||
FILE *src_file = NULL;
|
||||
FILE *script_file;
|
||||
int source_length, script_length;
|
||||
int total_length;
|
||||
char *pbuf_source, *pbuf_script;
|
||||
char buffer[512];
|
||||
struct spare_boot_ctrl_head *head;
|
||||
int ret = -1;
|
||||
//读取原始boot1
|
||||
src_file = fopen(source_uboot_name, "rb+");
|
||||
if(src_file == NULL)
|
||||
{
|
||||
printf("update uboot error:unable to open uboot file\n");
|
||||
goto _err_merge_uboot_out;
|
||||
}
|
||||
//获取原始uboot长度
|
||||
fseek(src_file, 0, SEEK_SET);
|
||||
fread(buffer, 512, 1, src_file);
|
||||
head = (struct spare_boot_ctrl_head *)buffer;
|
||||
|
||||
source_length = head->uboot_length;
|
||||
align_size = head->align_size;
|
||||
|
||||
//printf("source_length = %d\n", source_length);
|
||||
//printf("align length = %d\n", align_size);
|
||||
fseek(src_file, 0, SEEK_SET);
|
||||
if(!source_length)
|
||||
{
|
||||
printf("update error:the length of boot1 is zero\n");
|
||||
goto _err_merge_uboot_out;
|
||||
}
|
||||
//读取原始脚本
|
||||
script_file = fopen(script_file_name, "rb");
|
||||
if(!script_file)
|
||||
{
|
||||
printf("update uboot error:unable to open script file\n");
|
||||
goto _err_merge_uboot_out;
|
||||
}
|
||||
//获取原始脚本长度
|
||||
fseek(script_file, 0, SEEK_END);
|
||||
script_length = ftell(script_file);
|
||||
if(!script_length)
|
||||
{
|
||||
printf("the length of script is zero\n");
|
||||
goto _err_merge_uboot_out;
|
||||
}
|
||||
//读取原始脚本
|
||||
pbuf_script = (char *)malloc(script_length);
|
||||
if(!pbuf_script)
|
||||
{
|
||||
printf("unable malloc memory for script\n");
|
||||
|
||||
goto _err_merge_uboot_out;
|
||||
}
|
||||
fseek(script_file, 0, SEEK_SET);
|
||||
fread(pbuf_script, script_length, 1, script_file);
|
||||
fclose(script_file);
|
||||
script_file = NULL;
|
||||
//获取原始uboot内存
|
||||
total_length = source_length + script_length;
|
||||
if(total_length & (align_size - 1))
|
||||
{
|
||||
total_length = (total_length + align_size) & (~(align_size - 1));
|
||||
}
|
||||
|
||||
pbuf_source = (char *)malloc(total_length);
|
||||
if(!pbuf_source)
|
||||
{
|
||||
goto _err_merge_uboot_out;
|
||||
}
|
||||
//读取boot1数据
|
||||
fread(pbuf_source, source_length, 1, src_file);
|
||||
fseek(src_file, 0, SEEK_SET);
|
||||
//处理数据
|
||||
reconstruct_uboot(pbuf_source, source_length, pbuf_script, script_length);
|
||||
//回写文件
|
||||
fwrite(pbuf_source, total_length, 1, src_file);
|
||||
//关闭文件
|
||||
fclose(src_file);
|
||||
src_file = NULL;
|
||||
ret = 0;
|
||||
_err_merge_uboot_out:
|
||||
if(src_file)
|
||||
{
|
||||
fclose(src_file);
|
||||
|
||||
src_file = NULL;
|
||||
}
|
||||
if(script_file)
|
||||
{
|
||||
fclose(script_file);
|
||||
|
||||
script_file = NULL;
|
||||
}
|
||||
if(pbuf_source)
|
||||
{
|
||||
free(pbuf_source);
|
||||
|
||||
pbuf_source = NULL;
|
||||
}
|
||||
if(pbuf_script)
|
||||
{
|
||||
free(pbuf_script);
|
||||
|
||||
pbuf_script = NULL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int align_uboot(char *source_uboot_name)
|
||||
{
|
||||
FILE *uboot_file = NULL;
|
||||
int source_length;
|
||||
int total_length;
|
||||
int align_size;
|
||||
char *uboot_buf;
|
||||
char buffer[512];
|
||||
struct spare_boot_ctrl_head *head;
|
||||
int ret = -1;
|
||||
|
||||
//读取原始uboot
|
||||
uboot_file = fopen(source_uboot_name, "rb+");
|
||||
if(uboot_file == NULL)
|
||||
{
|
||||
printf("update uboot error : unable to open uboot file\n");
|
||||
goto _err_align_uboot_out;
|
||||
}
|
||||
fread(buffer, 512, 1, uboot_file);
|
||||
rewind(uboot_file);
|
||||
|
||||
head = (struct spare_boot_ctrl_head *)buffer;
|
||||
source_length = head->uboot_length;
|
||||
align_size = head->align_size;
|
||||
if(source_length & (align_size - 1))
|
||||
{
|
||||
total_length = (source_length + align_size) & (~(align_size - 1));
|
||||
}
|
||||
//printf("source length = %d\n", source_length);
|
||||
//printf("total length = %d\n", total_length);
|
||||
uboot_buf = (char *)malloc(total_length);
|
||||
if(!uboot_buf)
|
||||
{
|
||||
printf("update uboot error : fail to malloc memory for uboot\n");
|
||||
goto _err_align_uboot_out;
|
||||
}
|
||||
memset(uboot_buf, 0xff, total_length);
|
||||
|
||||
fread(uboot_buf, source_length, 1, uboot_file);
|
||||
rewind(uboot_file);
|
||||
head = (struct spare_boot_ctrl_head *)uboot_buf;
|
||||
head->uboot_length = total_length;
|
||||
head->length = total_length;
|
||||
gen_check_sum( (void *)uboot_buf );
|
||||
|
||||
fwrite(uboot_buf, total_length, 1, uboot_file);
|
||||
|
||||
ret = 0;
|
||||
_err_align_uboot_out:
|
||||
if(uboot_buf)
|
||||
{
|
||||
free(uboot_buf);
|
||||
}
|
||||
if(uboot_file)
|
||||
{
|
||||
fclose(uboot_file);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
objects = update_fdt.o
|
||||
|
||||
|
||||
edit:$(objects)
|
||||
gcc -o update_uboot_fdt $(objects) -static
|
||||
rm -rf $(objects)
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf update_fdt $(objects)
|
@ -0,0 +1,66 @@
|
||||
|
||||
#ifndef __spare_head_h__
|
||||
#define __spare_head_h__
|
||||
|
||||
|
||||
#define UBOOT_MAGIC "uboot"
|
||||
#define MAGIC_SIZE 8
|
||||
|
||||
typedef struct _normal_gpio_cfg
|
||||
{
|
||||
char port; //<2F>˿ں<CBBF>
|
||||
char port_num; //<2F>˿<EFBFBD><CBBF>ڱ<EFBFBD><DAB1>
|
||||
char mul_sel; //<2F><><EFBFBD>ܱ<EFBFBD><DCB1>
|
||||
char pull; //<2F><><EFBFBD><EFBFBD>״̬
|
||||
char drv_level; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
char data; //<2F><><EFBFBD><EFBFBD><EFBFBD>ƽ
|
||||
char reserved[2]; //<2F><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>
|
||||
}
|
||||
normal_gpio_cfg;
|
||||
|
||||
/******************************************************************************/
|
||||
/* the control information stored in file head */
|
||||
/******************************************************************************/
|
||||
struct spare_boot_ctrl_head
|
||||
{
|
||||
unsigned int jump_instruction; // one intruction jumping to real code
|
||||
unsigned char magic[MAGIC_SIZE]; // ="u-boot"
|
||||
unsigned int check_sum; // generated by PC
|
||||
unsigned int align_size; // align size in byte
|
||||
unsigned int length; // the size of all file
|
||||
unsigned int uboot_length; // the size of uboot
|
||||
unsigned char version[8]; // uboot version
|
||||
unsigned char platform[8]; // platform information
|
||||
int reserved[1]; //stamp space, 16bytes align
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
/* the data stored in file head */
|
||||
/******************************************************************************/
|
||||
struct spare_boot_data_head
|
||||
{
|
||||
unsigned int dram_para[32];
|
||||
int run_clock; // Mhz
|
||||
int run_core_vol; // mV
|
||||
int uart_port; // UART<52><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
normal_gpio_cfg uart_gpio[2]; // UART<52><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD>Դ<EFBFBD>ӡ<EFBFBD><D3A1>)GPIO<49><4F>Ϣ
|
||||
int twi_port; // TWI<57><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
normal_gpio_cfg twi_gpio[2]; // TWI<57><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>GPIO<49><4F>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD>TWI
|
||||
int work_mode; // <20><><EFBFBD><EFBFBD>ģʽ
|
||||
int storage_type; // <20>洢<EFBFBD><E6B4A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0<><30>nand 1<><31>sdcard 2: spinor
|
||||
normal_gpio_cfg nand_gpio[32]; // nand GPIO<49><4F>Ϣ
|
||||
char nand_spare_data[256]; // nand <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
normal_gpio_cfg sdcard_gpio[32]; // sdcard GPIO<49><4F>Ϣ
|
||||
char sdcard_spare_data[256]; // sdcard <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
int secureos_exist;
|
||||
int dtb_offset;
|
||||
int reserved[4]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ, 256bytes align
|
||||
|
||||
};
|
||||
|
||||
struct spare_boot_head_t
|
||||
{
|
||||
struct spare_boot_ctrl_head boot_head;
|
||||
struct spare_boot_data_head boot_data;
|
||||
};
|
||||
#endif
|
@ -0,0 +1,215 @@
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include "uboot_head.h"
|
||||
|
||||
|
||||
typedef unsigned int u32;
|
||||
|
||||
|
||||
void Usage(void)
|
||||
{
|
||||
printf("\n");
|
||||
printf("Usage:\n");
|
||||
printf("update_fdt.exe u-boot.bin xxx.dtb output_file.bin\n\n");
|
||||
}
|
||||
|
||||
u32 randto1k(u32 num)
|
||||
{
|
||||
if(num % 1024)
|
||||
{
|
||||
printf("update_fdt: num %d randto1k\n", num);
|
||||
return ((num+1023)/1024 * 1024);
|
||||
}
|
||||
else
|
||||
{
|
||||
return num;
|
||||
}
|
||||
}
|
||||
|
||||
int IsFullName(const char *FilePath)
|
||||
{
|
||||
if (isalpha(FilePath[0]) && ':' == FilePath[1])
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void GetFullPath(char *dName, const char *sName)
|
||||
{
|
||||
char Buffer[256];
|
||||
|
||||
if(IsFullName(sName))
|
||||
{
|
||||
strcpy(dName, sName);
|
||||
return ;
|
||||
}
|
||||
|
||||
/* Get the current working directory: */
|
||||
if(getcwd(Buffer, 256 ) == NULL)
|
||||
{
|
||||
perror( "getcwd error" );
|
||||
return ;
|
||||
}
|
||||
sprintf(dName, "%s/%s", Buffer, sName);
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
char file_name1[256];
|
||||
char file_name2[256];
|
||||
char file_name3[256];
|
||||
FILE *file1 = NULL;
|
||||
FILE *file2 = NULL;
|
||||
FILE *file3 = NULL;
|
||||
unsigned int file1_len, file2_len,file1_len_align,file2_len_align;
|
||||
unsigned char *file1_buffer = NULL;
|
||||
unsigned char *file2_buffer = NULL;
|
||||
unsigned char *file_dst_buffer = NULL;
|
||||
//struct andr_img_hdr * img_hdr = NULL;
|
||||
struct spare_boot_head_t * img_hdr = NULL;
|
||||
|
||||
if(argc != 4 )
|
||||
{
|
||||
Usage();
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("update_fdt: %s will merage %s, generate %s\n", argv[1], argv[2], argv[3]);
|
||||
memset(file_name1, 0, sizeof(file_name1));
|
||||
memset(file_name2, 0, sizeof(file_name2));
|
||||
memset(file_name3, 0, sizeof(file_name3));
|
||||
|
||||
|
||||
/*strcpy(file_name1, "boot.img");
|
||||
strcpy(file_name2, "sun50iw1p1.dtb");
|
||||
strcpy(file_name3, "test.img");*/
|
||||
GetFullPath(file_name1, argv[1]);
|
||||
GetFullPath(file_name2, argv[2]);
|
||||
GetFullPath(file_name3, argv[3]);
|
||||
|
||||
//printf("%s will concatenate %s, generate %s", file_name1, file_name2, file_name3);
|
||||
|
||||
|
||||
//<2F><><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><F2B2BBBF><EFBFBD>ʧ<EFBFBD><CAA7>
|
||||
file1 = fopen(file_name1, "rb");
|
||||
if(!file1)
|
||||
{
|
||||
printf("unable to open file %s\n", file_name1);
|
||||
|
||||
goto _err_out;
|
||||
}
|
||||
|
||||
|
||||
//<2F><><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><F2B2BBBF><EFBFBD>ʧ<EFBFBD><CAA7>
|
||||
file2 = fopen(file_name2, "rb");
|
||||
if(!file2)
|
||||
{
|
||||
printf("unable to open file %s\n", file_name2);
|
||||
|
||||
goto _err_out;
|
||||
}
|
||||
|
||||
//file1
|
||||
fseek(file1, 0, SEEK_END);
|
||||
file1_len = ftell(file1);
|
||||
fseek(file1, 0, SEEK_SET);
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD>
|
||||
file1_buffer = (char *)malloc(file1_len+1);
|
||||
if(file1_buffer == NULL)
|
||||
{
|
||||
printf("unable to malloc memory for udpate_fdt \n");
|
||||
goto _err_out;
|
||||
}
|
||||
memset(file1_buffer,0,file1_len+1);
|
||||
fread(file1_buffer, 1, file1_len, file1);
|
||||
fclose(file1); file1 = NULL;
|
||||
|
||||
//img_hdr = (struct andr_img_hdr *)file1_buffer;
|
||||
img_hdr = (struct spare_boot_head_t *)file1_buffer;
|
||||
if (memcmp(img_hdr->boot_head.magic, UBOOT_MAGIC, 5)) {
|
||||
puts("update_fdt: bad boot image magic, maybe not a uboot?\n");
|
||||
goto _err_out;
|
||||
}
|
||||
|
||||
//file2
|
||||
fseek(file2, 0, SEEK_END);
|
||||
file2_len = ftell(file2);
|
||||
fseek(file2, 0, SEEK_SET);
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD>
|
||||
file2_buffer = (char *)malloc(file2_len+1);
|
||||
if(file2_buffer == NULL)
|
||||
{
|
||||
printf("unable to malloc memory for udpate_fdt \n");
|
||||
goto _err_out;
|
||||
}
|
||||
memset(file2_buffer,0,file2_len+1);
|
||||
fread(file2_buffer, 1, file2_len, file2);
|
||||
fclose(file2); file2=NULL;
|
||||
|
||||
printf("---0x%x, 0x%x\n",file2_buffer[0],file2_buffer[1]);
|
||||
if(!(file2_buffer[0] == 0xD0 && file2_buffer[1] == 0x0D))
|
||||
{
|
||||
puts("update_fdt: bad dtb magic, maybe not a dtb file?\n");
|
||||
goto _err_out;
|
||||
}
|
||||
|
||||
|
||||
file1_len_align = randto1k(file1_len);
|
||||
file2_len_align = randto1k(file2_len);
|
||||
printf("file1_len = %x, file2_len = %x\n", file1_len_align, file2_len_align);
|
||||
|
||||
//update head
|
||||
if(img_hdr->boot_data.dtb_offset != 0)
|
||||
{
|
||||
//update_uboot will check ,so clear it
|
||||
img_hdr->boot_head.length = 0;
|
||||
img_hdr->boot_head.uboot_length = 0;
|
||||
//update uboot len
|
||||
file1_len = file1_len_align = img_hdr->boot_data.dtb_offset;
|
||||
}
|
||||
else
|
||||
{
|
||||
img_hdr->boot_data.dtb_offset = file1_len_align;
|
||||
}
|
||||
//img_hdr->boot_data.dtb_size = file2_len_align;
|
||||
printf("dtb offset %x,size %x \n", img_hdr->boot_data.dtb_offset,file2_len_align);
|
||||
|
||||
|
||||
file_dst_buffer = (char *)malloc(file1_len_align+file2_len_align);
|
||||
if(file_dst_buffer == NULL)
|
||||
{
|
||||
printf("unable to malloc memory for udpate_fdt \n");
|
||||
goto _err_out;
|
||||
}
|
||||
memset(file_dst_buffer,0, file1_len_align+file2_len_align);
|
||||
memcpy(file_dst_buffer, file1_buffer, file1_len);
|
||||
memcpy(file_dst_buffer+file1_len_align, file2_buffer, file2_len);
|
||||
|
||||
//<2F><><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><F2B2BBBF><EFBFBD>ʧ<EFBFBD><CAA7>
|
||||
file3 = fopen(file_name3, "wb");
|
||||
if(!file3)
|
||||
{
|
||||
printf("unable to open file %s\n", file_name3);
|
||||
goto _err_out;
|
||||
}
|
||||
fwrite(file_dst_buffer, file1_len_align+file2_len_align, 1, file3);
|
||||
fclose(file3); file3 = NULL;
|
||||
|
||||
printf("update_fdt:genrate %s ok\n",file_name3);
|
||||
free(file_dst_buffer);
|
||||
free(file1_buffer);
|
||||
free(file2_buffer);
|
||||
return 0;
|
||||
|
||||
_err_out:
|
||||
if(file_dst_buffer != NULL) free(file_dst_buffer);
|
||||
if(file1_buffer != NULL) free(file1_buffer);
|
||||
if(file2_buffer != NULL) free(file2_buffer);
|
||||
|
||||
return -1;
|
||||
}
|
340
SOFTWARE/A64-TERES/teres1-ledctrl/COPYING
Normal file
340
SOFTWARE/A64-TERES/teres1-ledctrl/COPYING
Normal file
@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
9
SOFTWARE/A64-TERES/teres1-ledctrl/Makefile
Normal file
9
SOFTWARE/A64-TERES/teres1-ledctrl/Makefile
Normal file
@ -0,0 +1,9 @@
|
||||
all:
|
||||
$(CC) teres1-ledctrl.c -o teres1-ledctrl
|
||||
|
||||
clean:
|
||||
$(RM) teres1-ledctrl
|
||||
|
||||
install: all
|
||||
if ( test ! -d $(DESTDIR)/usr/bin ) ; then mkdir -p $(DESTDIR)/usr/bin ; fi
|
||||
install -m0755 teres1-ledctrl $(DESTDIR)/usr/bin
|
5
SOFTWARE/A64-TERES/teres1-ledctrl/debian/changelog
Normal file
5
SOFTWARE/A64-TERES/teres1-ledctrl/debian/changelog
Normal file
@ -0,0 +1,5 @@
|
||||
teres1-ledctrl (0.1-1) unstable; urgency=medium
|
||||
|
||||
* Initial release
|
||||
|
||||
-- Stefan Saraev <stefan@saraev.ca> Sat, 06 May 2017 17:07:38 +0300
|
1
SOFTWARE/A64-TERES/teres1-ledctrl/debian/compat
Normal file
1
SOFTWARE/A64-TERES/teres1-ledctrl/debian/compat
Normal file
@ -0,0 +1 @@
|
||||
9
|
12
SOFTWARE/A64-TERES/teres1-ledctrl/debian/control
Normal file
12
SOFTWARE/A64-TERES/teres1-ledctrl/debian/control
Normal file
@ -0,0 +1,12 @@
|
||||
Source: teres1-ledctrl
|
||||
Section: unknown
|
||||
Priority: optional
|
||||
Maintainer: Stefan Saraev <stefan@saraev.ca>
|
||||
Build-Depends: debhelper (>= 8), dh-systemd
|
||||
Standards-Version: 3.9.8
|
||||
|
||||
Package: teres1-ledctrl
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: teres1-ledctrl
|
||||
quick and dirty capsl/numl led trigger
|
5
SOFTWARE/A64-TERES/teres1-ledctrl/debian/rules
Executable file
5
SOFTWARE/A64-TERES/teres1-ledctrl/debian/rules
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@ --with=systemd
|
||||
|
1
SOFTWARE/A64-TERES/teres1-ledctrl/debian/source/format
Normal file
1
SOFTWARE/A64-TERES/teres1-ledctrl/debian/source/format
Normal file
@ -0,0 +1 @@
|
||||
3.0 (git)
|
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=teres1-ledctrl
|
||||
After=basic.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/teres1-ledctrl /dev/input/by-path/platform-1c1b000.ehci1-controller-usb-0:1.4:1.0-event-kbd
|
||||
TimeoutStopSec=1
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
StartLimitInterval=0
|
||||
|
||||
[Install]
|
||||
WantedBy=basic.target
|
102
SOFTWARE/A64-TERES/teres1-ledctrl/teres1-ledctrl.c
Normal file
102
SOFTWARE/A64-TERES/teres1-ledctrl/teres1-ledctrl.c
Normal file
@ -0,0 +1,102 @@
|
||||
/* teres1-ledctrl.c - quick and dirty capsl/numl led trigger
|
||||
|
||||
Copyright (C) 2017 OLIMEX LTD.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, version 2 of the License.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <linux/input.h>
|
||||
|
||||
#define LED_CAPS 71
|
||||
#define LED_NUM 68
|
||||
|
||||
void export_gpio(int gpio)
|
||||
{
|
||||
int fd;
|
||||
char buf[255];
|
||||
|
||||
fd = open("/sys/class/gpio/export", O_WRONLY);
|
||||
sprintf(buf, "%d", gpio);
|
||||
write(fd, buf, strlen(buf));
|
||||
close(fd);
|
||||
|
||||
sprintf(buf, "/sys/class/gpio/gpio%d/direction", gpio);
|
||||
fd = open(buf, O_WRONLY);
|
||||
write(fd, "out", 3);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
void set_gpio(int gpio, int value)
|
||||
{
|
||||
char buf[255];
|
||||
sprintf(buf, "/sys/class/gpio/gpio%d/value", gpio);
|
||||
int fd = open(buf, O_WRONLY);
|
||||
sprintf(buf, "%d", value);
|
||||
write(fd, buf, 1);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
void usage(void)
|
||||
{
|
||||
extern char *program_invocation_short_name;
|
||||
printf("USAGE:\n");
|
||||
printf(" %s /dev/input/eventX\n", program_invocation_short_name);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
const char *device = NULL;
|
||||
int fd;
|
||||
struct input_event ie;
|
||||
|
||||
if (!argv[1])
|
||||
{
|
||||
usage();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
device = argv[1];
|
||||
|
||||
if((fd = open(device, O_RDONLY)) == -1)
|
||||
{
|
||||
perror("Could not open input device");
|
||||
exit(255);
|
||||
}
|
||||
|
||||
export_gpio(LED_NUM);
|
||||
export_gpio(LED_CAPS);
|
||||
|
||||
|
||||
while(read(fd, &ie, sizeof(struct input_event)))
|
||||
{
|
||||
switch (ie.type)
|
||||
{
|
||||
case 17: // EV_LED
|
||||
switch (ie.code) {
|
||||
case 0: // LED_NUML
|
||||
printf("type %d\tcode %d\tvalue %d\n", ie.type, ie.code, ie.value);
|
||||
set_gpio(LED_NUM, ie.value);
|
||||
break;
|
||||
case 1: // LED_CAPSL
|
||||
printf("type %d\tcode %d\tvalue %d\n", ie.type, ie.code, ie.value);
|
||||
set_gpio(LED_CAPS, ie.value);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user