Skip to content

Commit 318fc7c

Browse files
authored
Merge pull request #78 from nanoframework/release-v1.0.10
Release v1.0.10
2 parents 21b5fc0 + 3434cda commit 318fc7c

17 files changed

+478
-67
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,6 @@ paket-files/
250250
# JetBrains Rider
251251
.idea/
252252
*.sln.iml
253+
254+
#SoundCloud
255+
*.sonarqube/

CHANGELOG.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,103 @@
11
# Change Log
22

3+
## [v1.0.8](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/tree/v1.0.8) (2019-02-04)
4+
[Full Changelog](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/compare/v1.0.10-preview.21...HEAD)
5+
6+
**Documentation and other chores:**
7+
8+
- Update NuGet references [\#74](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/pull/74)
9+
- Remove dependency from Windows.Devices.Gpio [\#73](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/pull/73)
10+
11+
## [v1.0.10-preview.21](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/tree/v1.0.10-preview.21) (2019-07-18)
12+
[Full Changelog](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/compare/v1.0.10-preview.18...v1.0.10-preview.21)
13+
14+
**Documentation and other chores:**
15+
16+
- Update 2 NuGet dependencies [\#72](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/pull/72)
17+
- Update readme.txt [\#71](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/pull/71)
18+
19+
## [v1.0.10-preview.18](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/tree/v1.0.10-preview.18) (2019-07-02)
20+
[Full Changelog](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/compare/v1.0.10-preview.16...v1.0.10-preview.18)
21+
22+
**Implemented enhancements:**
23+
24+
- Update pin mapping and fixes [\#70](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/pull/70)
25+
26+
## [v1.0.10-preview.16](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/tree/v1.0.10-preview.16) (2019-06-23)
27+
[Full Changelog](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/compare/v1.0.10-preview.9...v1.0.10-preview.16)
28+
29+
**Documentation and other chores:**
30+
31+
- Update 3 NuGet dependencies [\#69](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/pull/69)
32+
- Work on native assembly declaration [\#67](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/pull/67) [[Breaking-Change](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/labels/Breaking-Change)]
33+
34+
## [v1.0.10-preview.9](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/tree/v1.0.10-preview.9) (2019-06-20)
35+
[Full Changelog](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/compare/v1.0.10-preview.6...v1.0.10-preview.9)
36+
37+
**Documentation and other chores:**
38+
39+
- Update 3 NuGet dependencies [\#66](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/pull/66)
40+
41+
## [v1.0.10-preview.6](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/tree/v1.0.10-preview.6) (2019-06-12)
42+
[Full Changelog](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/compare/v1.0.10-preview.2...v1.0.10-preview.6)
43+
44+
**Documentation and other chores:**
45+
46+
- Update 3 NuGet dependencies [\#65](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/pull/65)
47+
48+
## [v1.0.10-preview.2](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/tree/v1.0.10-preview.2) (2019-06-12)
49+
[Full Changelog](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/compare/v1.0.9-preview-003...v1.0.10-preview.2)
50+
51+
**Documentation and other chores:**
52+
53+
- Update 3 NuGet dependencies [\#64](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/pull/64)
54+
55+
## [v1.0.9-preview-003](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/tree/v1.0.9-preview-003) (2019-04-24)
56+
[Full Changelog](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/compare/v1.0.9-preview-001...v1.0.9-preview-003)
57+
58+
**Documentation and other chores:**
59+
60+
- Update 2 NuGet dependencies [\#61](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/pull/61)
61+
62+
## [v1.0.9-preview-001](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/tree/v1.0.9-preview-001) (2019-04-23)
63+
[Full Changelog](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/compare/v1.0.6-preview-022...v1.0.9-preview-001)
64+
65+
## [v1.0.6-preview-022](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/tree/v1.0.6-preview-022) (2019-04-23)
66+
[Full Changelog](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/compare/v1.0.6-preview-017...v1.0.6-preview-022)
67+
68+
**Documentation and other chores:**
69+
70+
- Update 3 NuGet dependencies [\#60](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/pull/60)
71+
72+
## [v1.0.6-preview-017](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/tree/v1.0.6-preview-017) (2019-04-07)
73+
[Full Changelog](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/compare/v1.0.6-preview-015...v1.0.6-preview-017)
74+
75+
**Documentation and other chores:**
76+
77+
- Update 2 NuGet dependencies [\#59](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/pull/59)
78+
79+
## [v1.0.6-preview-015](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/tree/v1.0.6-preview-015) (2019-04-03)
80+
[Full Changelog](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/compare/v1.0.6-preview-013...v1.0.6-preview-015)
81+
82+
**Documentation and other chores:**
83+
84+
- Update 2 NuGet dependencies [\#58](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/pull/58)
85+
86+
## [v1.0.6-preview-013](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/tree/v1.0.6-preview-013) (2019-03-11)
87+
[Full Changelog](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/compare/v1.0.6-preview-009...v1.0.6-preview-013)
88+
89+
**Documentation and other chores:**
90+
91+
- Update 2 NuGet dependencies [\#57](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/pull/57)
92+
- Update 2 NuGet dependencies [\#56](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/pull/56)
93+
94+
## [v1.0.6-preview-009](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/tree/v1.0.6-preview-009) (2019-03-10)
95+
[Full Changelog](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/compare/v1.0.8...v1.0.6-preview-009)
96+
97+
**Documentation and other chores:**
98+
99+
- Update 2 NuGet dependencies [\#55](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/pull/55)
100+
3101
## [v1.0.8](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/tree/v1.0.8) (2019-02-04)
4102
[Full Changelog](https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32/compare/v1.0.7...v1.0.8)
5103

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,33 @@
1-
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/nanoframework/Home/blob/master/LICENSE) [![NuGet](https://img.shields.io/nuget/dt/nanoFramework.Hardware.Esp32.svg)]() [![#yourfirstpr](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](https://github.com/nanoframework/Home/blob/master/CONTRIBUTING.md) [![Discord](https://img.shields.io/discord/478725473862549535.svg)](https://discord.gg/gCyBu8T)
2-
1+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=nanoframework_lib-nanoFramework.Hardware.Esp32&metric=alert_status)](https://sonarcloud.io/dashboard?id=nanoframework_lib-nanoFramework.Hardware.Esp32) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=nanoframework_lib-nanoFramework.Hardware.Esp32&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=nanoframework_lib-nanoFramework.Hardware.Esp32) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/nanoframework/Home/blob/master/LICENSE) [![NuGet](https://img.shields.io/nuget/dt/nanoFramework.Hardware.Esp32.svg?label=NuGet&style=flat&logo=nuget)]() [![#yourfirstpr](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](https://github.com/nanoframework/Home/blob/master/CONTRIBUTING.md) [![Discord](https://img.shields.io/discord/478725473862549535.svg?logo=discord&logoColor=white&label=Discord&color=7289DA)](https://discord.gg/gCyBu8T)
32

43
![nanoFramework logo](https://github.com/nanoframework/Home/blob/master/resources/logo/nanoFramework-repo-logo.png)
54

65
-----
76

87
### Welcome to the **nanoFramework** nanoFramework.Hardware.Esp32 Library repository!
98

10-
119
## Build status
1210

1311
| Component | Build Status | NuGet Package |
1412
|:-|---|---|
15-
| nanoFramework.Hardware.Esp32 | [![Build Status](https://dev.azure.com/nanoframework/nanoFramework.Hardware.Esp32/_apis/build/status/nanoframework.lib-nanoFramework.Hardware.Esp32?branchName=master)](https://dev.azure.com/nanoframework/nanoFramework.Hardware.Esp32/_build/latest?definitionId=11?branchName=master) | [![NuGet](https://img.shields.io/nuget/v/nanoFramework.Hardware.Esp32.svg)](https://www.nuget.org/packages/nanoFramework.Hardware.Esp32/) |
16-
| nanoFramework.Hardware.Esp32 (preview) | [![Build Status](https://dev.azure.com/nanoframework/nanoFramework.Hardware.Esp32/_apis/build/status/nanoframework.lib-nanoFramework.Hardware.Esp32?branchName=develop)](https://dev.azure.com/nanoframework/nanoFramework.Hardware.Esp32/_build/latest?definitionId=11?branchName=develop) | [![MyGet Pre Release](https://img.shields.io/myget/nanoframework-dev/vpre/nanoFramework.Hardware.Esp32.svg)](https://www.myget.org/feed/nanoframework-dev/package/nuget/nanoFramework.Hardware.Esp32) |
13+
| nanoFramework.Hardware.Esp32 | [![Build Status](https://dev.azure.com/nanoframework/nanoFramework.Hardware.Esp32/_apis/build/status/nanoframework.lib-nanoFramework.Hardware.Esp32?branchName=master)](https://dev.azure.com/nanoframework/nanoFramework.Hardware.Esp32/_build/latest?definitionId=11?branchName=master) | [![NuGet](https://img.shields.io/nuget/v/nanoFramework.Hardware.Esp32.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.Hardware.Esp32/) |
14+
| nanoFramework.Hardware.Esp32 (preview) | [![Build Status](https://dev.azure.com/nanoframework/nanoFramework.Hardware.Esp32/_apis/build/status/nanoframework.lib-nanoFramework.Hardware.Esp32?branchName=develop)](https://dev.azure.com/nanoframework/nanoFramework.Hardware.Esp32/_build/latest?definitionId=11?branchName=develop) | [![](https://badgen.net/badge/NuGet/preview/D7B023?icon=https://simpleicons.now.sh/azuredevops/fff)](https://dev.azure.com/nanoframework/feed/_packaging?_a=package&feed=sandbox&package=nanoFramework.Hardware.Esp32&protocolType=NuGet&view=overview) |
1715

1816
## Feedback and documentation
1917

2018
For documentation, providing feedback, issues and finding out how to contribute please refer to the [Home repo](https://github.com/nanoframework/Home).
2119

2220
Join our Discord community [here](https://discord.gg/gCyBu8T).
2321

24-
2522
## Credits
2623

2724
The list of contributors to this project can be found at [CONTRIBUTORS](https://github.com/nanoframework/Home/blob/master/CONTRIBUTORS.md).
2825

29-
3026
## License
3127

3228
The **nanoFramework** Class Libraries are licensed under the [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0).
3329

34-
3530
## Code of Conduct
31+
3632
This project has adopted the code of conduct defined by the [Contributor Covenant](http://contributor-covenant.org/)
3733
to clarify expected behavior in our community.

azure-pipelines.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ trigger:
33
include:
44
- master
55
- develop
6-
- release/*
6+
- release-/*
77
- refs/tags/*
88
paths:
99
exclude:
@@ -46,10 +46,9 @@ steps:
4646

4747
# step from template @ nf-tools repo
4848
# all build, update and publish steps
49-
- template: azure-pipelines-templates/class-lib-build.yml@templates
49+
- template: azure-pipelines-templates/class-lib-build.yml@templates
5050
parameters:
51-
sourceFileName: 'nanoFramework_hardware_esp32_native.cpp'
52-
classLibName: 'nanoFramework.Hardware.Esp32'
51+
sonarCloudProject: 'nanoframework_lib-nanoFramework.Hardware.Esp32'
5352

5453
# step from template @ nf-tools repo
5554
# report error

source/NuGet.Config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<configuration>
33
<packageSources>
44
<add key="NuGet" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
5-
<add key="MyGet nanoFramework dev" value="https://www.myget.org/F/nanoframework-dev/api/v3/index.json" protocolVersion="3" />
5+
<add key="Azure Artifacts nanoFramework dev" value="https://pkgs.dev.azure.com/nanoframework/feed/_packaging/sandbox/nuget/v3/index.json" protocolVersion="3" />
66
</packageSources>
77
</configuration>

source/nanoFramework.Hardware.Esp32.DELIVERABLES.nuspec

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,16 @@
1010
<releaseNotes>
1111
</releaseNotes>
1212
<developmentDependency>false</developmentDependency>
13-
<projectUrl>https://github.com/nanoframework</projectUrl>
13+
<projectUrl>https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32</projectUrl>
1414
<iconUrl>https://secure.gravatar.com/avatar/97d0e092247f0716db6d4b47b7d1d1ad</iconUrl>
1515
<copyright>Copyright (c) 2018 The nanoFramework project contributors</copyright>
1616
<description>** DON'T REFERENCE THIS PACKAGE ** Not meant for development. This package includes the deliverable artifacts of the nanoFramework.Hardware.Esp32 assembly for nanoFramework. These are for testing purposes and for updating the native code base of the library.</description>
1717
<summary>nanoFramework.Hardware.Esp32.DELIVERABLES is not meant for development.</summary>
1818
<tags>
1919
</tags>
2020
<dependencies>
21-
<dependency id="nanoFramework.CoreLibrary" version="[1.1.1]" />
22-
<dependency id="nanoFramework.Runtime.Events" version="[1.0.4]" />
23-
<dependency id="nanoFramework.Windows.Devices.Gpio" version="[1.0.5]" />
21+
<dependency id="nanoFramework.CoreLibrary" version="1.2.6" />
22+
<dependency id="nanoFramework.Runtime.Events" version="1.1.1" />
2423
</dependencies>
2524
</metadata>
2625
<files>

source/nanoFramework.Hardware.Esp32.nuspec

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,21 @@
77
<authors>nanoFramework project contributors</authors>
88
<owners>nanoFramework project contributors</owners>
99
<requireLicenseAcceptance>false</requireLicenseAcceptance>
10+
<license type="expression">Apache-2.0</license>
1011
<releaseNotes>
1112
</releaseNotes>
1213
<developmentDependency>false</developmentDependency>
13-
<projectUrl>https://github.com/nanoframework</projectUrl>
14+
<projectUrl>https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32</projectUrl>
1415
<iconUrl>https://secure.gravatar.com/avatar/97d0e092247f0716db6d4b47b7d1d1ad</iconUrl>
16+
<repository type="git" url="https://github.com/nanoframework/lib-nanoFramework.Hardware.Esp32" commit="$commit$" />
1517
<copyright>Copyright (c) 2018 The nanoFramework project contributors</copyright>
16-
<description>This package includes the nanoFramework.Hardware.Esp32 assembly for nanoFramework C# projects. The nanoFramework.Hardware.Esp32 assembly contains functions specific to the ESP32 device.</description>
18+
<description>This package includes the nanoFramework.Hardware.Esp32 assembly for nanoFramework C# projects. The nanoFramework.Hardware.Esp32 assembly contains functions specific to the ESP32 device.
19+
This package requires a target with nanoFramework.Hardware.Esp32 v$nativeVersion$.</description>
1720
<summary>nanoFramework.Hardware.Esp32 assembly for nanoFramework C# projects</summary>
1821
<tags>nanoFramework C# csharp netmf netnf esp32</tags>
1922
<dependencies>
20-
<dependency id="nanoFramework.CoreLibrary" version="[1.1.1]" />
21-
<dependency id="nanoFramework.Runtime.Events" version="[1.0.4]" />
22-
<dependency id="nanoFramework.Windows.Devices.Gpio" version="[1.0.5]" />
23+
<dependency id="nanoFramework.CoreLibrary" version="1.2.6" />
24+
<dependency id="nanoFramework.Runtime.Events" version="1.1.1" />
2325
</dependencies>
2426
</metadata>
2527
<files>
@@ -28,5 +30,7 @@
2830
<file src="nanoFramework.Hardware.Esp32\bin\Release\nanoFramework.Hardware.Esp32.pdbx" target="lib\nanoFramework.Hardware.Esp32.pdbx" />
2931
<file src="nanoFramework.Hardware.Esp32\bin\Release\nanoFramework.Hardware.Esp32.pe" target="lib\nanoFramework.Hardware.Esp32.pe" />
3032
<file src="nanoFramework.Hardware.Esp32\bin\Release\nanoFramework.Hardware.Esp32.xml" target="lib\nanoFramework.Hardware.Esp32.xml" />
33+
<!-- readme -->
34+
<file src="readme.txt" target="readme.txt" />
3135
</files>
3236
</package>

source/nanoFramework.Hardware.Esp32/Configuration.cs

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55

66
using System;
7-
using Windows.Devices.Gpio;
7+
using System.Runtime.CompilerServices;
88

99
namespace nanoFramework.Hardware.Esp32
1010
{
@@ -14,19 +14,36 @@ namespace nanoFramework.Hardware.Esp32
1414
public class Configuration
1515
{
1616
/// <summary>
17-
/// Set the default function for a GPIO pin
17+
/// Set the default function for a GPIO pin.
1818
/// </summary>
1919
/// <remarks>
2020
/// Allows gpio pins to be assigned a device function.
2121
/// For example setting the I2C1 data pin to use GPIO pin 17.
2222
/// </remarks>
23-
/// <param name="pin"></param>
24-
/// <param name="value"></param>
23+
/// <param name="pin">The pin number to set against function.</param>
24+
/// <param name="value">The device function to be assigned the pin.</param>
2525
public static void SetPinFunction(int pin, DeviceFunction value)
2626
{
27-
GpioPin gpioPin = GpioController.GetDefault().OpenPin(pin);
28-
gpioPin.SetAlternateFunction((int)value);
29-
gpioPin.Dispose();
27+
NativeSetPinFunction(pin, (int)value);
3028
}
29+
30+
/// <summary>
31+
/// Returns the current pin number used by a device function.
32+
/// </summary>
33+
/// <param name="function"></param>
34+
/// <returns>The pin number used by device function. If value is -1 then pins is not assigned.</returns>
35+
public static int GetFunctionPin(DeviceFunction function)
36+
{
37+
38+
return NativeGetPinFunction((int)function); ;
39+
}
40+
41+
#region Native Calls
42+
[MethodImpl(MethodImplOptions.InternalCall)]
43+
private extern static void NativeSetPinFunction(int pin, int function);
44+
45+
[MethodImpl(MethodImplOptions.InternalCall)]
46+
private extern static int NativeGetPinFunction(int function);
47+
#endregion
3148
}
3249
}

0 commit comments

Comments
 (0)