nanoFramework.Iot.Device.Aw9523x
1.0.8
Prefix Reserved
dotnet add package nanoFramework.Iot.Device.Aw9523x --version 1.0.8
NuGet\Install-Package nanoFramework.Iot.Device.Aw9523x -Version 1.0.8
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nanoFramework.Iot.Device.Aw9523x" Version="1.0.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nanoFramework.Iot.Device.Aw9523x" Version="1.0.8" />
<PackageReference Include="nanoFramework.Iot.Device.Aw9523x" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add nanoFramework.Iot.Device.Aw9523x --version 1.0.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: nanoFramework.Iot.Device.Aw9523x, 1.0.8"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package nanoFramework.Iot.Device.Aw9523x@1.0.8
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=nanoFramework.Iot.Device.Aw9523x&version=1.0.8
#tool nuget:?package=nanoFramework.Iot.Device.Aw9523x&version=1.0.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AW9523X - I2C GPIO and LED controller
AW9523X is a generic 16-channel I2C GPIO expander and LED controller. This binding intentionally exposes generic register and port operations so it can be used on any AW9523X-based board.
Documentation
- AW9523X datasheet
- M5Stack CoreS3 reference implementation (Power class)
Usage
using System.Device.I2c;
using Iot.Device.Aw9523x;
I2cDevice i2c = I2cDevice.Create(new I2cConnectionSettings(1, Aw9523x.DefaultI2cAddress));
Aw9523x aw9523 = new Aw9523x(i2c);
byte chipId = aw9523.ChipId;
Generic port access
// Configure all pins on port 0 as outputs
aw9523.WriteDirectionPort(Port.Port0, 0x00);
// Set bit 1 on output port 0
aw9523.SetOutputBits(Port.Port0, OutputMask.PortBit1);
// Read current input state on port 1
byte inputs = aw9523.ReadInputPort(Port.Port1);
CoreS3 usage pattern
On CoreS3, board-level functions are wired through AW9523X output bits. You can apply the same policy used by M5Unified in the application/sample layer:
const OutputMask coreS3BusEn = OutputMask.PortBit1;
const OutputMask coreS3UsbOtgEn = OutputMask.PortBit5;
const OutputMask coreS3BoostEn = OutputMask.PortBit7;
// Enable internal bus power
aw9523.SetOutputBits(Port.Port0, coreS3BusEn);
aw9523.SetOutputBits(Port.Port1, coreS3BoostEn);
// Enable USB OTG output
aw9523.SetOutputBits(Port.Port0, coreS3UsbOtgEn);
aw9523.SetOutputBits(Port.Port1, coreS3BoostEn);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- nanoFramework.CoreLibrary (>= 1.17.12)
- nanoFramework.System.Device.I2c (>= 1.1.29)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.