-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplatformio.ini
85 lines (74 loc) · 2.09 KB
/
platformio.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[platformio]
; I2C
default_envs=release
; default_envs=debug
; default_envs=release_digispark
[env]
platform = atmelavr
framework = arduino
build_flags =
-D DISABLEMILLIS=1
-D TINYPWM_ANALOG_CONVERSIONS=32
lib_deps =
https://github.com/SpenceKonde/ATTinyCore
https://github.com/sascha432/libcrc16.git
[env:default]
platform = atmelavr
board = ATtiny85
build_flags =
${env.build_flags}
-D TINYPWM_VALUES_FREQUENCY=20000 ; automatically calculate prescaler and overflow
; -D TINYPWM_CLOCK_PRESCALER=TinyPwm::ClockPrescaler::PCK_4
; -D TINYPWM_OVERFLOW=0 ; F_CPU / PCK_64 * (199 + 1) = 20000Hz
-D TINYPWM_VALUES=0
upload_protocol = stk500v1
upload_flags =
-Pcom5
-b19200
monitor_speed = 9600
monitor_port = COM3
[env:release]
extends = env:default
build_flags =
${env:default.build_flags}
[env:debug]
; using PB3/PB4 for serial debugging
extends = env:default
build_unflag =
-D DISABLEMILLIS=1
build_flags =
${env:default.build_flags}
-D DEBUG=1
-D TINYPWM_PINS=PB0,PB1,PB2
-D TINYPWM_PIN_MODES=INPUT,ANALOG_INPUT,ANALOG_INPUT
-D TINYPWM_VALUES=0,0,0
-D TINYPWM_ANALOG_CONVERSIONS=1,1,1
-D DEBUG_SERIAL_TX_PIN=PB3
-D DEBUG_SERIAL_RX_PIN=PB4
# testing digispark bootloader
[env:digispark]
extends = env:default
monitor_speed = 115200
board = digispark-tiny
# test for digispark @ 3.3V
[env:release_digispark]
platform = atmelavr
board = digispark-tiny
board_build.mcu = attiny85
board_build.f_cpu = 8000000L
build_flags =
-D DISABLEMILLIS=1
-D TINYPWM_ANALOG_CONVERSIONS=32
-D TINYPWM_PINS=PB1,PB3,PB4
-D TINYPWM_PIN_MODES=OUTPUT,ANALOG_INPUT,ANALOG_INPUT
-D TINYPWM_VALUES_FREQUENCY=25000
-D TINYPWM_ANALOG_REFERENCE=TinyPwm::AnalogReference::INTERNAL_1V1