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
2 changes: 1 addition & 1 deletion LICENSE
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Andreas Merkle
Copyright (c) 2023 - 2025 Andreas Merkle

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
53 changes: 31 additions & 22 deletions README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,59 +8,68 @@ Projects have sometimes the need to run on different platforms. For example a ro

This library provides for this use case some Arduino interfaces, but not all yet. If something is missing, feel free to contribute, which make our all lifes easier. :-)

## Table of content
## Table of content <!-- omit in toc -->

* [Architecture](#architecture)
* [The Principle](#the-principle)
* [Detail](#detail)
* [How to integrate the library?](#how-to-integrate-the-library)
* [Example](#example)
* [Used Libraries](#used-libraries)
* [Issues, Ideas And Bugs](#issues-ideas-and-bugs)
* [License](#license)
* [Contribution](#contribution)
- [Architecture](#architecture)
- [The Principle](#the-principle)
- [Detail](#detail)
- [How to integrate the library?](#how-to-integrate-the-library)
- [Example](#example)
- [Used Libraries](#used-libraries)
- [Issues, Ideas And Bugs](#issues-ideas-and-bugs)
- [License](#license)
- [Contribution](#contribution)

# Architecture
## Architecture

## The Principle
### The Principle

![Principle](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com//BlueAndi/ArduinoNative/master/doc/uml/Principle.plantuml)

## Detail
### Detail

![ArduinoNative](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/BlueAndi/ArduinoNative/master/doc/uml/ArduinoNative.plantuml)

![DynamicFlow](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/BlueAndi/ArduinoNative/master/doc/uml/DynamicFlow.plantuml)

# How to integrate the library?
## How to integrate the library?

1. Add it to the _platformio.ini_ in your environment to the _lib\_deps_ section:
```

```text
lib_deps =
BlueAndi/ArduinoNative @ ~0.1.0
BlueAndi/ArduinoNative @ ~0.2.2
```

2. Add this build flags to your _platformio.ini_ in your environment:
```

```text
build_flags =
-D _USE_MATH_DEFINES
```

3. Call the ```Arduino::setup()``` once and the ```Arduino::loop()``` in a infinite loop in your main entry point function.

## Example
### Example

See [minimal example](./examples/example/).

# Used Libraries
## Used Libraries

| Library | Description | License |
| ------------------------------------------------------------------ | ---------------------------------------------------------------- | ---------- |
| - | - | - |

# Issues, Ideas And Bugs
## Issues, Ideas And Bugs

If you have further ideas or you found some bugs, great! Create a [issue](https://github.com/BlueAndi/ArduinoNative/issues) or if you are able and willing to fix it by yourself, clone the repository and create a pull request.

# License
## License

The whole source code is published under the [MIT license](http://choosealicense.com/licenses/mit/).
Consider the different licenses of the used third party libraries too!

# Contribution
## Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any
additional terms or conditions.
2 changes: 1 addition & 1 deletion doc/doxygen/Doxyfile
Original file line numberDiff line numberDiff line change
Expand Up@@ -48,7 +48,7 @@ PROJECT_NAME = "ArduinoNative"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = v0.1.0
PROJECT_NUMBER = v0.2.2

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion examples/example/LICENSE
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 - 2024 Andreas Merkle
Copyright (c) 2023 - 2025 Andreas Merkle

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion examples/example/lib/MainNative/src/main.cpp
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
/* MIT License
*
* Copyright (c) 2023 - 2024 Andreas Merkle <web@blue-andi.de>
* Copyright (c) 2023 - 2025 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
Expand Down
2 changes: 1 addition & 1 deletion examples/example/platformio.ini
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,4 +19,4 @@ build_flags =
-D _USE_MATH_DEFINES
lib_deps =
MainNative
BlueAndi/ArduinoNative @ ~0.1.1
BlueAndi/ArduinoNative @ ~0.2.2
2 changes: 1 addition & 1 deletion examples/example/src/main.cpp
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
/* MIT License
*
* Copyright (c) 2023 - 2024 Andreas Merkle <web@blue-andi.de>
* Copyright (c) 2023 - 2025 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
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
{
"name": "ArduinoNative",
"version": "0.2.1",
"version": "0.2.2",
"description": "Arduino for the native environment. It doesn't support every interface, just some of them!",
"authors": [{
"name": "Andreas Merkle",
Expand Down
2 changes: 1 addition & 1 deletion src/Arduino.cpp
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
/* MIT License
*
* Copyright (c) 2023 - 2024 Andreas Merkle <web@blue-andi.de>
* Copyright (c) 2023 - 2025 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
Expand Down
2 changes: 1 addition & 1 deletion src/Arduino.h
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
/* MIT License
*
* Copyright (c) 2023 - 2024 Andreas Merkle <web@blue-andi.de>
* Copyright (c) 2023 - 2025 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
Expand Down
2 changes: 1 addition & 1 deletion src/Print.h
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
/* MIT License
*
* Copyright (c) 2023 - 2024 Andreas Merkle <web@blue-andi.de>
* Copyright (c) 2023 - 2025 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
Expand Down
2 changes: 1 addition & 1 deletion src/Serial.cpp
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
/* MIT License
*
* Copyright (c) 2023 - 2024 Andreas Merkle <web@blue-andi.de>
* Copyright (c) 2023 - 2025 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
Expand Down
2 changes: 1 addition & 1 deletion src/Serial.h
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
/* MIT License
*
* Copyright (c) 2023 - 2024 Andreas Merkle <web@blue-andi.de>
* Copyright (c) 2023 - 2025 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
Expand Down
2 changes: 1 addition & 1 deletion src/Stream.h
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
/* MIT License
*
* Copyright (c) 2023 - 2024 Andreas Merkle <web@blue-andi.de>
* Copyright (c) 2023 - 2025 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
Expand Down
2 changes: 1 addition & 1 deletion src/Terminal.cpp
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
/* MIT License
*
* Copyright (c) 2023 - 2024 Andreas Merkle <web@blue-andi.de>
* Copyright (c) 2023 - 2025 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
Expand Down
2 changes: 1 addition & 1 deletion src/Terminal.h
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
/* MIT License
*
* Copyright (c) 2023 - 2024 Andreas Merkle <web@blue-andi.de>
* Copyright (c) 2023 - 2025 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
Expand Down
6 changes: 3 additions & 3 deletions src/WString.h
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
/* MIT License
*
* Copyright (c) 2023 - 2024 Andreas Merkle <web@blue-andi.de>
* Copyright (c) 2023 - 2025 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
Expand DownExpand Up@@ -96,7 +96,7 @@ class String
*
* @param[in] other String to copy
*/
String(const char* other) : m_stdStr(other)
String(const char* other) : m_stdStr((nullptr == other) ? "" : other)
{
}

Expand All@@ -115,7 +115,7 @@ class String
* @param[in] other String to copy
* @param[in] length Number of characters to copy
*/
String(const char* other, unsigned int length) : m_stdStr(other, length)
String(const char* other, unsigned int length) : m_stdStr((nullptr == other) ? "" : std::string(other, length))
{
}

Expand Down
2 changes: 1 addition & 1 deletion test/test_Wstring/test_WString.cpp
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
/* MIT License
*
* Copyright (c) 2023 - 2024 Andreas Merkle <web@blue-andi.de>
* Copyright (c) 2023 - 2025 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
Expand Down