Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions config/hardwareversion.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
; *************************************************************************************************
; Target Hardware Version configurations
; * V1: ESP32 with 4MB flash. External USB Host controller.
; * V2: ESP32-S3 with 16MB flash. Integrated USB Host controller. Buttons and LEDs A, B and C.
; *************************************************************************************************

; *****************************************************************************
; Target environment for ZumoComSystem.
; *****************************************************************************
[version:V1]
extends = mode:selected_esp32
platform = espressif32 @ ~6.11.0
board = esp32doit-devkit-v1
board_build.filesystem = littlefs
framework = arduino
build_flags =
${mode:selected_esp32.build_flags}
-Wl,-Map,firmware.map
-D CONFIG_FILE_PATH="\"/config/config.json\""
lib_deps =
HALInterfaces
HALTargetV1
HALTargetCommon
https://github.com/NewTec-GmbH/USB_Host_Shield_2.0.git#3_Endpoints_ACM
knolleary/PubSubClient @ ~2.8
SPI
FS
LittleFS
lib_ignore =
ArduinoNative
HALSim
HALTargetV2
HALTest
MainNative
MainTestNative
UDPNative
WiFiNative
WifiClientNative
extra_scripts =
monitor_speed = 115200
monitor_filters = esp32_exception_decoder

; *****************************************************************************
; Target environment for ZumoComSystemV2.
; *****************************************************************************
[version:V2]
extends = mode:selected_esp32
platform = espressif32 @ ~6.11.0
board = esp32-s3-devkitc-1
board_build.filesystem = littlefs
framework = arduino
build_flags =
${mode:selected_esp32.build_flags}
-Wl,-Map,firmware.map
-D CONFIG_FILE_PATH="\"/config/config.json\""
lib_deps =
HALInterfaces
HALTargetV2
HALTargetCommon
knolleary/PubSubClient @ ~2.8
SPI
FS
LittleFS
lib_ignore =
ArduinoNative
HALSim
HALTargetV1
HALTest
MainNative
MainTestNative
UDPNative
WiFiNative
WifiClientNative
extra_scripts =
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
1 change: 1 addition & 0 deletions doc/doxygen/ConvoyFollowerTargetDoxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,7 @@ INPUT = mainpage.dox \
../../src \
../../lib/HALTargetCommon \
../../lib/HALTargetV1 \
../../lib/HALTargetV2 \
../../lib/HALInterfaces \
../../lib/APPConvoyFollower \
../../lib/Service \
Expand Down
1 change: 1 addition & 0 deletions doc/doxygen/ConvoyLeaderTargetDoxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,7 @@ INPUT = mainpage.dox \
../../lib/HALInterfaces \
../../lib/HALTargetCommon \
../../lib/HALTargetV1 \
../../lib/HALTargetV2 \
../../lib/PlatoonService \
../../lib/Service \
../../lib/Utilities
Expand Down
1 change: 1 addition & 0 deletions doc/doxygen/LineFollowerTargetDoxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,7 @@ INPUT = mainpage.dox \
../../src \
../../lib/HALTargetCommon \
../../lib/HALTargetV1 \
../../lib/HALTargetV2 \
../../lib/HALInterfaces \
../../lib/APPLineFollower \
../../lib/Service \
Expand Down
1 change: 1 addition & 0 deletions doc/doxygen/RemoteControlTargetDoxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,7 @@ INPUT = mainpage.dox \
../../src \
../../lib/HALTargetCommon \
../../lib/HALTargetV1 \
../../lib/HALTargetV2 \
../../lib/HALInterfaces \
../../lib/APPRemoteControl \
../../lib/Service \
Expand Down
1 change: 1 addition & 0 deletions doc/doxygen/SensorFusionTargetDoxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,7 @@ INPUT = mainpage.dox \
../../src \
../../lib/HALTargetCommon \
../../lib/HALTargetV1 \
../../lib/HALTargetV2 \
../../lib/HALInterfaces \
../../lib/APPSensorFusion \
../../lib/Service \
Expand Down
1 change: 1 addition & 0 deletions doc/doxygen/TurtleTargetDoxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,7 @@ INPUT = mainpage.dox \
../../lib/HALInterfaces \
../../lib/HALTargetCommon \
../../lib/HALTargetV1 \
../../lib/HALTargetV2 \
../../lib/Service \
../../lib/Utilities

Expand Down
14 changes: 12 additions & 2 deletions doc/doxygen/mainpage.dox
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,18 @@ The HAL interface abstraction, which every kind of HAL needs to provide.
@{
@}

@defgroup HALTarget Hardware abstraction on the Zumo32U4
Abstracts the the physical hardware of the Zumo32U4.
@defgroup HALTargetCommon Hardware abstraction of the common components of the ZumoComSystem.
Abstracts the physical hardware of the common components of the ZumoComSystem.
@{
@}

@defgroup HALTargetV1 Hardware abstraction of the ZumoComSystemV1
Abstracts the physical hardware of the ZumoComSystemV1.
@{
@}

@defgroup HALTargetV2 Hardware abstraction of the ZumoComSystemV2
Abstracts the physical hardware of the ZumoComSystemV2.
@{
@}

Expand Down
17 changes: 17 additions & 0 deletions lib/HALTargetV2/library.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "HALTargetV2",
"version": "0.1.0",
"description": "Hardware abstraction layer for the ZumoComSystemV2.",
"authors": [{
"name": "Andreas Merkle",
"email": "web@blue-andi.de",
"url": "https://github.com/BlueAndi",
"maintainer": true
}],
"license": "MIT",
"dependencies": [{
"name": "Os"
}],
"frameworks": "arduino",
"platforms": "*"
}
104 changes: 104 additions & 0 deletions lib/HALTargetV2/src/Pin.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/* MIT License
*
* Copyright (c) 2023 - 2026 Andreas Merkle <web@blue-andi.de>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

/*******************************************************************************
DESCRIPTION
*******************************************************************************/
/**
* @file
* @brief Pin definition for the target board.
* @author Gabryel Reyes <gabryelrdiaz@gmail.com>
*
* @addtogroup HALTargetV2
*
* @{
*/
#ifndef PIN_H
#define PIN_H

/******************************************************************************
* Compile Switches
*****************************************************************************/

/******************************************************************************
* Includes
*****************************************************************************/

#include <stdint.h>
#include <Io.hpp>

/******************************************************************************
* Macros
*****************************************************************************/

/******************************************************************************
* Types and Classes
*****************************************************************************/

/** Pin number of all used pins. */
namespace Pin
{
/** Pin for push button for system reset/AP mode start (ACTIVE LOW) */
constexpr uint8_t PIN_WIFI_AND_RESET_KEY = 48U;

/** Pin for resetting the attached Zumo robot (ACTIVE LOW) */
constexpr uint8_t PIN_DEVICE_RESET = 5U;

/** Pin for info LED RGB channel RED (ACTIVE LOW) */
constexpr uint8_t INFO_LED_R = 38U;

/** Pin for info LED RGB channel GREEN (ACTIVE LOW) */
constexpr uint8_t INFO_LED_G = 1U;

/** Pin for info LED RGB channel BLUE (ACTIVE LOW) */
constexpr uint8_t INFO_LED_B = 2U;

/** Pin for analog measurement of battery voltage */
constexpr uint8_t PIN_BATT_MEASUREMENT = 10U;

/** Pin for push button A */
constexpr uint8_t PIN_BUTTON_A = 7U;

/** Pin for push button B */
constexpr uint8_t PIN_BUTTON_B = 15U;

/** Pin for push button C */
constexpr uint8_t PIN_BUTTON_C = 17U;

/** Pin for LED A */
constexpr uint8_t PIN_LED_A = 6U;

/** Pin for LED B */
constexpr uint8_t PIN_LED_B = 16U;

/** Pin for LED C */
constexpr uint8_t PIN_LED_C = 18U;

}; /* namespace Pin */

/******************************************************************************
* Functions
*****************************************************************************/

#endif /* PIN_H */
/** @} */
Loading