From: AceVest Date: Fri, 27 Jul 2018 05:35:22 +0000 (+0800) Subject: ... X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=70568ab1ebb07bdeb3d06933b0af1bddbed05413;p=acecode.git ... --- diff --git a/.gitignore b/.gitignore index 157739f..dafd856 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ ish *.diff *.d dvwa +build diff --git a/arduino/hardware/README.md b/arduino/hardware/README.md index 8a7f25d..b7e01ad 100644 --- a/arduino/hardware/README.md +++ b/arduino/hardware/README.md @@ -1 +1,3 @@ https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification +https://www.microchip.com/webdoc/AVRLibcReferenceManual/indexpage.html + diff --git a/arduino/hardware/ace/avr/cores/avr/PluggableUSB.h b/arduino/hardware/ace/avr/cores/avr/PluggableUSB.h deleted file mode 100644 index 507f0df..0000000 --- a/arduino/hardware/ace/avr/cores/avr/PluggableUSB.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - PluggableUSB.h - Copyright (c) 2015 Arduino LLC - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef PUSB_h -#define PUSB_h - -#include "USBAPI.h" -#include - -#if defined(USBCON) - -class PluggableUSBModule { -public: - PluggableUSBModule(uint8_t numEps, uint8_t numIfs, uint8_t *epType) : - numEndpoints(numEps), numInterfaces(numIfs), endpointType(epType) - { } - -protected: - virtual bool setup(USBSetup& setup) = 0; - virtual int getInterface(uint8_t* interfaceCount) = 0; - virtual int getDescriptor(USBSetup& setup) = 0; - virtual uint8_t getShortName(char *name) { name[0] = 'A'+pluggedInterface; return 1; } - - uint8_t pluggedInterface; - uint8_t pluggedEndpoint; - - const uint8_t numEndpoints; - const uint8_t numInterfaces; - const uint8_t *endpointType; - - PluggableUSBModule *next = NULL; - - friend class PluggableUSB_; -}; - -class PluggableUSB_ { -public: - PluggableUSB_(); - bool plug(PluggableUSBModule *node); - int getInterface(uint8_t* interfaceCount); - int getDescriptor(USBSetup& setup); - bool setup(USBSetup& setup); - void getShortName(char *iSerialNum); - -private: - uint8_t lastIf; - uint8_t lastEp; - PluggableUSBModule* rootNode; -}; - -// Replacement for global singleton. -// This function prevents static-initialization-order-fiasco -// https://isocpp.org/wiki/faq/ctors#static-init-order-on-first-use -PluggableUSB_& PluggableUSB(); - -#endif - -#endif diff --git a/arduino/hardware/ace/avr/cores/avr/kernel.cpp b/arduino/hardware/ace/avr/cores/avr/kernel.cpp index 0874436..eaa37d8 100644 --- a/arduino/hardware/ace/avr/cores/avr/kernel.cpp +++ b/arduino/hardware/ace/avr/cores/avr/kernel.cpp @@ -148,7 +148,6 @@ void yield(void) extern "C" void TIMER1_COMPA_vect() __attribute__ ((signal,used, externally_visible)); void TIMER1_COMPA_vect() { - SAVE_CONTEXT; ticks++; for(uint8_t i=0; i +#include "rtos_config.h" +#include "debug.h" + +int main(int argc, char *argv[]){ + printf("rtos: version %u.%u\n", RTOS_VERSION_MAJOR, RTOS_VERSION_MINOR); + debug(); + asm_debug(); + return 0; +} diff --git a/rtos/rtos_config.h.in b/rtos/rtos_config.h.in new file mode 100644 index 0000000..4187a01 --- /dev/null +++ b/rtos/rtos_config.h.in @@ -0,0 +1,4 @@ +#pragma once + +#define RTOS_VERSION_MAJOR @RTOS_VERSION_MAJOR@ +#define RTOS_VERSION_MINOR @RTOS_VERSION_MINOR@