| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -40,7 +40,7 @@ jobs: | |||
| 40 | 40 | # - digistump:avr:digispark-tiny # ATtiny85 board @16.5 MHz | |
| 41 | 41 | - digistump:avr:digispark-tiny16 # ATtiny85 board @16 MHz | |
| 42 | 42 | - digistump:avr:digispark-pro | |
| 43 | - # - digistump:avr:MHETtiny88 # Chinese MH-Tiny ATTiny88 | ||
| 43 | + - digistump:avr:MHETtiny88 # Chinese MH-Tiny ATTiny88 | ||
| 44 | 44 | ||
| 45 | 45 | # Specify parameters for each board. | |
| 46 | 46 | # With examples-exclude you may exclude specific examples for a board. Use a comma separated list. | |
@@ -49,6 +49,9 @@ jobs: | |||
| 49 | 49 | - arduino-boards-fqbn: digistump:avr:digispark-tiny16 # ATtiny85 board @16 MHz | |
| 50 | 50 | examples-exclude: Blink | |
| 51 | 51 | ||
| 52 | + - arduino-boards-fqbn: digistump:avr:MHETtiny88 # ATtiny85 board @16 MHz | ||
| 53 | + examples-exclude: WiiClassicJoystick,BasicUsage,DigisparkOLED,SoftRcPulseInDebug,SoftRcPulseInOutDemo,SoftRcPulseInDemo,SoftRcPulseInOutDemo,TinySoftPwmDemo,DigiUSB2LCD,DigisparkUSBDemo,ArduinoNunchukDemo,DigisparkJoystickDemo,Tiny85_Temp,SoftSerialExample,TwoPortReceive,SoftPwm13Pins | ||
| 54 | + | ||
| 52 | 55 | # Do not cancel all jobs / architectures if one job fails | |
| 53 | 56 | fail-fast: false | |
| 54 | 57 | steps: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -85,6 +85,7 @@ The Arduino ESP8266 core available with https://arduino.esp8266.com/stable/packa | |||
| 85 | 85 | ||
| 86 | 86 | ### Version 1.7.0 | |
| 87 | 87 | - Support of the cheap Chinese MH-ET LIVE Tiny88(16.0MHz) board. | |
| 88 | + - Corrected wrong mouse buttons PR#2. | ||
| 88 | 89 | ||
| 89 | 90 | ### Version 1.6.8 | |
| 90 | 91 | - The original Digistump version with `lto` and changed `upload.maximum_size` for [micronucleus bootloader 2.5](https://github.com/ArminJo/micronucleus-firmware). | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -164,7 +164,7 @@ MHETtiny88.name=MH-ET LIVE Tiny88 (16 MHz) | |||
| 164 | 164 | MHETtiny88.build.mcu=attiny88 | |
| 165 | 165 | MHETtiny88.build.f_cpu=16000000L | |
| 166 | 166 | MHETtiny88.build.board=AVR_DIGISPARKPRO | |
| 167 | - MHETtiny88.build.core=tiny | ||
| 167 | + MHETtiny88.build.core=tiny88 | ||
| 168 | 168 | MHETtiny88.build.variant=tiny88 | |
| 169 | 169 | ||
| 170 | 170 | MHETtiny88.upload.using=micronucleusprog | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,277 @@ | |||
| 1 | + /* | ||
| 2 | + Arduino.h - Main include file for the Arduino SDK | ||
| 3 | + Copyright (c) 2005-2013 Arduino Team. All right reserved. | ||
| 4 | + | ||
| 5 | + This library is free software; you can redistribute it and/or | ||
| 6 | + modify it under the terms of the GNU Lesser General Public | ||
| 7 | + License as published by the Free Software Foundation; either | ||
| 8 | + version 2.1 of the License, or (at your option) any later version. | ||
| 9 | + | ||
| 10 | + This library is distributed in the hope that it will be useful, | ||
| 11 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | + Lesser General Public License for more details. | ||
| 14 | + | ||
| 15 | + You should have received a copy of the GNU Lesser General Public | ||
| 16 | + License along with this library; if not, write to the Free Software | ||
| 17 | + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 18 | + */ | ||
| 19 | + | ||
| 20 | + #ifndef Arduino_h | ||
| 21 | + #define Arduino_h | ||
| 22 | + | ||
| 23 | + #include <stdlib.h> | ||
| 24 | + #include <stdbool.h> | ||
| 25 | + #include <string.h> | ||
| 26 | + #include <math.h> | ||
| 27 | + | ||
| 28 | + #include <avr/pgmspace.h> | ||
| 29 | + #include <avr/io.h> | ||
| 30 | + #include <avr/interrupt.h> | ||
| 31 | + | ||
| 32 | + #include "binary.h" | ||
| 33 | + | ||
| 34 | + #ifdef __cplusplus | ||
| 35 | + extern "C"{ | ||
| 36 | + #endif | ||
| 37 | + | ||
| 38 | + void yield(void); | ||
| 39 | + | ||
| 40 | + #define ATTINY_CORE 1// | ||
| 41 | + | ||
| 42 | + #define HIGH 0x1 | ||
| 43 | + #define LOW 0x0 | ||
| 44 | + | ||
| 45 | + #define INPUT 0x0 | ||
| 46 | + #define OUTPUT 0x1 | ||
| 47 | + #define INPUT_PULLUP 0x2 | ||
| 48 | + | ||
| 49 | + #define true 0x1// | ||
| 50 | + #define false 0x0// | ||
| 51 | + | ||
| 52 | + #define PI 3.1415926535897932384626433832795 | ||
| 53 | + #define HALF_PI 1.5707963267948966192313216916398 | ||
| 54 | + #define TWO_PI 6.283185307179586476925286766559 | ||
| 55 | + #define DEG_TO_RAD 0.017453292519943295769236907684886 | ||
| 56 | + #define RAD_TO_DEG 57.295779513082320876798154814105 | ||
| 57 | + #define EULER 2.718281828459045235360287471352 | ||
| 58 | + | ||
| 59 | + #define SERIAL 0x0 | ||
| 60 | + #define DISPLAY 0x1 | ||
| 61 | + | ||
| 62 | + #define LSBFIRST 0 | ||
| 63 | + #define MSBFIRST 1 | ||
| 64 | + | ||
| 65 | + #define CHANGE 1 | ||
| 66 | + #define FALLING 2 | ||
| 67 | + #define RISING 3 | ||
| 68 | + | ||
| 69 | + #if defined(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) | ||
| 70 | + #define DEFAULT 0 | ||
| 71 | + #define EXTERNAL 1 | ||
| 72 | + #define INTERNAL1V1 2 | ||
| 73 | + #define INTERNAL INTERNAL1V1 | ||
| 74 | + #elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) | ||
| 75 | + #define DEFAULT 0 | ||
| 76 | + #define EXTERNAL 4 | ||
| 77 | + #define INTERNAL1V1 8 | ||
| 78 | + #define INTERNAL INTERNAL1V1 | ||
| 79 | + #define INTERNAL2V56 9 | ||
| 80 | + #define INTERNAL2V56_EXTCAP 13 | ||
| 81 | + #elif defined(__AVR_ATtiny88__) | ||
| 82 | + #define DEFAULT 4 | ||
| 83 | + #define EXTERNAL 4 | ||
| 84 | + #define INTERNAL1V1 0 | ||
| 85 | + #define INTERNAL INTERNAL1V1 | ||
| 86 | + #else | ||
| 87 | + #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega644__) || defined(__AVR_ATmega644A__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) | ||
| 88 | + #define INTERNAL1V1 2 | ||
| 89 | + #define INTERNAL2V56 3 | ||
| 90 | + #else | ||
| 91 | + #define INTERNAL 3 | ||
| 92 | + #endif | ||
| 93 | + #define DEFAULT 1 | ||
| 94 | + #define EXTERNAL 0 | ||
| 95 | + #endif | ||
| 96 | + | ||
| 97 | + // undefine stdlib's abs if encountered | ||
| 98 | + #ifdef abs | ||
| 99 | + #undef abs | ||
| 100 | + #endif | ||
| 101 | + | ||
| 102 | + #define min(a,b) ((a)<(b)?(a):(b)) | ||
| 103 | + #define max(a,b) ((a)>(b)?(a):(b)) | ||
| 104 | + #define abs(x) ((x)>0?(x):-(x)) | ||
| 105 | + #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) | ||
| 106 | + #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) | ||
| 107 | + #define radians(deg) ((deg)*DEG_TO_RAD) | ||
| 108 | + #define degrees(rad) ((rad)*RAD_TO_DEG) | ||
| 109 | + #define sq(x) ((x)*(x)) | ||
| 110 | + | ||
| 111 | + #define interrupts() sei() | ||
| 112 | + #define noInterrupts() cli() | ||
| 113 | + | ||
| 114 | + #define clockCyclesPerMicrosecond() ( F_CPU / 1000000L ) | ||
| 115 | + #define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (F_CPU / 1000L) ) | ||
| 116 | + #define microsecondsToClockCycles(a) ( ((a) * (F_CPU / 1000L)) / 1000L ) | ||
| 117 | + | ||
| 118 | + #define lowByte(w) ((uint8_t) ((w) & 0xff)) | ||
| 119 | + #define highByte(w) ((uint8_t) ((w) >> 8)) | ||
| 120 | + | ||
| 121 | + #define bitRead(value, bit) (((value) >> (bit)) & 0x01) | ||
| 122 | + #define bitSet(value, bit) ((value) |= (1UL << (bit))) | ||
| 123 | + #define bitClear(value, bit) ((value) &= ~(1UL << (bit))) | ||
| 124 | + #define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit)) | ||
| 125 | + | ||
| 126 | + // avr-libc defines _NOP() since 1.6.2 | ||
| 127 | + #ifndef _NOP | ||
| 128 | + #define _NOP() do { __asm__ volatile ("nop"); } while (0) | ||
| 129 | + #endif | ||
| 130 | + | ||
| 131 | + typedef unsigned int word; | ||
| 132 | + | ||
| 133 | + #define bit(b) (1UL << (b)) | ||
| 134 | + | ||
| 135 | + typedef bool boolean; | ||
| 136 | + typedef uint8_t byte; | ||
| 137 | + | ||
| 138 | + void init(void); | ||
| 139 | + void initVariant(void); | ||
| 140 | + void initToneTimer(void); | ||
| 141 | + | ||
| 142 | + int atexit(void (*func)()) __attribute__((weak)); | ||
| 143 | + | ||
| 144 | + void pinMode(uint8_t, uint8_t); | ||
| 145 | + void digitalWrite(uint8_t, uint8_t); | ||
| 146 | + int digitalRead(uint8_t); | ||
| 147 | + int analogRead(uint8_t); | ||
| 148 | + void analogReference(uint8_t mode); | ||
| 149 | + void analogWrite(uint8_t, int); | ||
| 150 | + | ||
| 151 | + unsigned long millis(void); | ||
| 152 | + unsigned long micros(void); | ||
| 153 | + void delay(unsigned long); | ||
| 154 | + void delayMicroseconds(unsigned int us); | ||
| 155 | + unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout); | ||
| 156 | + unsigned long pulseInLong(uint8_t pin, uint8_t state, unsigned long timeout); | ||
| 157 | + | ||
| 158 | + void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val); | ||
| 159 | + uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder); | ||
| 160 | + | ||
| 161 | + void attachInterrupt(uint8_t, void (*)(void), int mode); | ||
| 162 | + void detachInterrupt(uint8_t); | ||
| 163 | + | ||
| 164 | + void setup(void); | ||
| 165 | + void loop(void); | ||
| 166 | + | ||
| 167 | + // Get the bit location within the hardware port of the given virtual pin. | ||
| 168 | + // This comes from the pins_*.c file for the active board configuration. | ||
| 169 | + | ||
| 170 | + #define analogInPinToBit(P) (P) | ||
| 171 | + | ||
| 172 | + // On the ATmega1280, the addresses of some of the port registers are | ||
| 173 | + // greater than 255, so we can't store them in uint8_t's. | ||
| 174 | + extern const uint16_t PROGMEM port_to_mode_PGM[]; | ||
| 175 | + extern const uint16_t PROGMEM port_to_input_PGM[]; | ||
| 176 | + extern const uint16_t PROGMEM port_to_output_PGM[]; | ||
| 177 | + | ||
| 178 | + extern const uint8_t PROGMEM digital_pin_to_port_PGM[]; | ||
| 179 | + // extern const uint8_t PROGMEM digital_pin_to_bit_PGM[]; | ||
| 180 | + extern const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[]; | ||
| 181 | + extern const uint8_t PROGMEM digital_pin_to_timer_PGM[]; | ||
| 182 | + | ||
| 183 | + // Get the bit location within the hardware port of the given virtual pin. | ||
| 184 | + // This comes from the pins_*.c file for the active board configuration. | ||
| 185 | + // | ||
| 186 | + // These perform slightly better as macros compared to inline functions | ||
| 187 | + // | ||
| 188 | + #define digitalPinToPort(P) ( pgm_read_byte( digital_pin_to_port_PGM + (P) ) ) | ||
| 189 | + #define digitalPinToBitMask(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM + (P) ) ) | ||
| 190 | + #define digitalPinToTimer(P) ( pgm_read_byte( digital_pin_to_timer_PGM + (P) ) ) | ||
| 191 | + #define analogInPinToBit(P) (P) | ||
| 192 | + #define portOutputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_output_PGM + (P))) ) | ||
| 193 | + #define portInputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_input_PGM + (P))) ) | ||
| 194 | + #define portModeRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_mode_PGM + (P))) ) | ||
| 195 | + | ||
| 196 | + #define NOT_A_PIN 0 | ||
| 197 | + #define NOT_A_PORT 0 | ||
| 198 | + | ||
| 199 | + #define NOT_AN_INTERRUPT -1 | ||
| 200 | + | ||
| 201 | + #ifdef ARDUINO_MAIN | ||
| 202 | + #define PA 1 | ||
| 203 | + #define PB 2 | ||
| 204 | + #define PC 3 | ||
| 205 | + #define PD 4 | ||
| 206 | + #define PE 5 | ||
| 207 | + #define PF 6 | ||
| 208 | + #define PG 7 | ||
| 209 | + #define PH 8 | ||
| 210 | + #define PJ 10 | ||
| 211 | + #define PK 11 | ||
| 212 | + #define PL 12 | ||
| 213 | + #endif | ||
| 214 | + | ||
| 215 | + #define NOT_ON_TIMER 0 | ||
| 216 | + #define TIMER0A 1 | ||
| 217 | + #define TIMER0B 2 | ||
| 218 | + #define TIMER1A 3 | ||
| 219 | + #define TIMER1B 4 | ||
| 220 | + #define TIMER1C 5 | ||
| 221 | + | ||
| 222 | + #ifdef defined(__AVR_ATtiny167__) | ||
| 223 | + #define TIMER1D 6 | ||
| 224 | + | ||
| 225 | + #else | ||
| 226 | + #define TIMER2 6 | ||
| 227 | + #define TIMER2A 7 | ||
| 228 | + #define TIMER2B 8 | ||
| 229 | + | ||
| 230 | + #define TIMER3A 9 | ||
| 231 | + #define TIMER3B 10 | ||
| 232 | + #define TIMER3C 11 | ||
| 233 | + #define TIMER4A 12 | ||
| 234 | + #define TIMER4B 13 | ||
| 235 | + #define TIMER4C 14 | ||
| 236 | + #define TIMER4D 15 | ||
| 237 | + #define TIMER5A 16 | ||
| 238 | + #define TIMER5B 17 | ||
| 239 | + #define TIMER5C 18 | ||
| 240 | + | ||
| 241 | + #endif | ||
| 242 | + | ||
| 243 | + #ifdef __cplusplus | ||
| 244 | + } // extern "C" | ||
| 245 | + #endif | ||
| 246 | + | ||
| 247 | + #ifdef __cplusplus | ||
| 248 | + #include "WCharacter.h" | ||
| 249 | + #include "WString.h" | ||
| 250 | + #include "HardwareSerial.h" | ||
| 251 | + #include "SoftwareSerial.h" | ||
| 252 | + #if defined(HAVE_HWSERIAL0) && defined(HAVE_CDCSERIAL) | ||
| 253 | + #error "Targets with both UART0 and CDC serial not supported" | ||
| 254 | + #endif | ||
| 255 | + | ||
| 256 | + uint16_t makeWord(uint16_t w); | ||
| 257 | + uint16_t makeWord(byte h, byte l); | ||
| 258 | + | ||
| 259 | + #define word(...) makeWord(__VA_ARGS__) | ||
| 260 | + | ||
| 261 | + unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L); | ||
| 262 | + unsigned long pulseInLong(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L); | ||
| 263 | + | ||
| 264 | + void tone(uint8_t _pin, unsigned int frequency, unsigned long duration = 0); | ||
| 265 | + void noTone(uint8_t _pin); | ||
| 266 | + | ||
| 267 | + // WMath prototypes | ||
| 268 | + long random(long); | ||
| 269 | + long random(long, long); | ||
| 270 | + void randomSeed(unsigned long); | ||
| 271 | + long map(long, long, long, long, long); | ||
| 272 | + | ||
| 273 | + #endif | ||
| 274 | + | ||
| 275 | + #include "pins_arduino.h" | ||
| 276 | + | ||
| 277 | + #endif | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments