pyalamake 2.3.1__tar.gz → 2.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyalamake-2.3.1/src/pyalamake.egg-info → pyalamake-2.3.2}/PKG-INFO +1 -1
- {pyalamake-2.3.1 → pyalamake-2.3.2}/pyproject.toml +1 -1
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/constants_version.py +1 -1
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/target_arduino.py +91 -8
- {pyalamake-2.3.1 → pyalamake-2.3.2/src/pyalamake.egg-info}/PKG-INFO +1 -1
- {pyalamake-2.3.1 → pyalamake-2.3.2}/LICENSE.txt +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/MANIFEST.in +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/README.md +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/setup.cfg +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/__init__.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/arduino_shared.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/boards.json +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/compile_cmd_json.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/gbl.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/list_param.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/makefile_variables.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/osal.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/package_cpip.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/package_opengl.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/path_handle.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/pyalamake.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/svc.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/target_arduino_core.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/target_base.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/target_base_min.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/target_c.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/target_c_cpp_base.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/target_c_cpp_lib_base.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/target_c_lib.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/target_cpp.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/target_cpp_lib.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/target_gtest.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/target_manual.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake/target_swig.py +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake.egg-info/SOURCES.txt +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake.egg-info/dependency_links.txt +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake.egg-info/requires.txt +0 -0
- {pyalamake-2.3.1 → pyalamake-2.3.2}/src/pyalamake.egg-info/top_level.txt +0 -0
|
@@ -78,16 +78,99 @@ class TargetArduino(TargetBase):
|
|
|
78
78
|
# @param lib the library to add
|
|
79
79
|
# @return None
|
|
80
80
|
def add_library(self, lib):
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
81
|
+
# TODO use these:
|
|
82
|
+
# libraries: arduino-cli lib list "Adafruit Motor Shield V2 Library" --format json
|
|
83
|
+
# packages : arduino-cli lib list "Wire" -b arduino:avr:uno --format json
|
|
84
|
+
# dependcies: arduino-cli lib deps "Adafruit Motor Shield V2 Library"
|
|
85
|
+
|
|
86
|
+
valid_libs = {
|
|
87
|
+
'Servo': self._add_lib_servo,
|
|
88
|
+
'AdafruitMotorShieldV2': self._add_lib_motorshield_v2,
|
|
89
|
+
'AdafruitBusIO': self._add_lib_busio,
|
|
90
|
+
# packages
|
|
91
|
+
'Wire': self._add_pkg_wire,
|
|
92
|
+
'SPI': self._add_pkg_spi,
|
|
93
|
+
}
|
|
94
|
+
if lib not in valid_libs:
|
|
89
95
|
svc.abort(f'{self.target} target_arduino: unknown arduino library: {lib}')
|
|
90
96
|
|
|
97
|
+
svc.log.line(f'adding arduino library: {lib}')
|
|
98
|
+
valid_libs[lib](lib)
|
|
99
|
+
|
|
100
|
+
self.add_compile_options('-DARDUINO_ARCH_AVR') # pylint: disable=E1101
|
|
101
|
+
|
|
102
|
+
# --------------------
|
|
103
|
+
## add Servo files
|
|
104
|
+
# @param lib the library to add
|
|
105
|
+
# @return None
|
|
106
|
+
def _add_lib_servo(self, lib):
|
|
107
|
+
path = PathHandle(f'{self._shared.library_root}/Servo/src')
|
|
108
|
+
self._check_library_installed(path, lib)
|
|
109
|
+
self.add_sources(f'{path.fixed}/avr/Servo.cpp') # pylint: disable=E1101
|
|
110
|
+
self.add_include_directories(path.fixed) # pylint: disable=E1101
|
|
111
|
+
|
|
112
|
+
# --------------------
|
|
113
|
+
## add Adafruit Motor Shield V2 files
|
|
114
|
+
# @param lib the library to add
|
|
115
|
+
# @return None
|
|
116
|
+
def _add_lib_motorshield_v2(self, lib):
|
|
117
|
+
path = PathHandle(f'{self._shared.library_root}/Adafruit_Motor_Shield_V2_Library')
|
|
118
|
+
self._check_library_installed(path, lib)
|
|
119
|
+
self.add_sources(
|
|
120
|
+
[
|
|
121
|
+
f'{path.fixed}/Adafruit_MotorShield.cpp',
|
|
122
|
+
f'{path.fixed}/utility/Adafruit_MS_PWMServoDriver.cpp',
|
|
123
|
+
]
|
|
124
|
+
) # pylint: disable=E1101
|
|
125
|
+
self.add_include_directories(
|
|
126
|
+
[
|
|
127
|
+
path.fixed,
|
|
128
|
+
f'{path.fixed}/utility',
|
|
129
|
+
]
|
|
130
|
+
) # pylint: disable=E1101
|
|
131
|
+
|
|
132
|
+
# --------------------
|
|
133
|
+
## add Adafruit Bus IO files
|
|
134
|
+
# @param lib the library to add
|
|
135
|
+
# @return None
|
|
136
|
+
def _add_lib_busio(self, lib):
|
|
137
|
+
path = PathHandle(f'{self._shared.library_root}/Adafruit_BusIO')
|
|
138
|
+
self._check_library_installed(path, lib)
|
|
139
|
+
self.add_sources(
|
|
140
|
+
[
|
|
141
|
+
f'{path.fixed}/Adafruit_BusIO_Register.cpp',
|
|
142
|
+
f'{path.fixed}/Adafruit_GenericDevice.cpp',
|
|
143
|
+
f'{path.fixed}/Adafruit_I2CDevice.cpp',
|
|
144
|
+
f'{path.fixed}/Adafruit_SPIDevice.cpp',
|
|
145
|
+
]
|
|
146
|
+
) # pylint: disable=E1101
|
|
147
|
+
self.add_include_directories(path.fixed) # pylint: disable=E1101
|
|
148
|
+
|
|
149
|
+
# --------------------
|
|
150
|
+
## add Wire package files
|
|
151
|
+
# @param _lib unused
|
|
152
|
+
# @return None
|
|
153
|
+
def _add_pkg_wire(self, _lib):
|
|
154
|
+
path = PathHandle(f'{svc.osal.arduino_root_dir()}/packages/arduino/hardware/avr/1.8.7/libraries/Wire/src')
|
|
155
|
+
# built-in package, no installation
|
|
156
|
+
self.add_sources(
|
|
157
|
+
[
|
|
158
|
+
f'{path.fixed}/Wire.cpp',
|
|
159
|
+
f'{path.fixed}/utility/twi.c',
|
|
160
|
+
]
|
|
161
|
+
)
|
|
162
|
+
self.add_include_directories([path.fixed, f'{path.fixed}/utility']) # pylint: disable=E1101
|
|
163
|
+
|
|
164
|
+
# --------------------
|
|
165
|
+
## add SPI package files
|
|
166
|
+
# @param _lib unused
|
|
167
|
+
# @return None
|
|
168
|
+
def _add_pkg_spi(self, _lib):
|
|
169
|
+
path = PathHandle(f'{svc.osal.arduino_root_dir()}/packages/arduino/hardware/avr/1.8.7/libraries/SPI/src')
|
|
170
|
+
# built-in package, no installation
|
|
171
|
+
self.add_sources(f'{path.fixed}/SPI.cpp')
|
|
172
|
+
self.add_include_directories(path.fixed) # pylint: disable=E1101
|
|
173
|
+
|
|
91
174
|
# --------------------
|
|
92
175
|
## check if an arduino library is installed
|
|
93
176
|
#
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|