Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sd card pins to device configuration #191

Merged
merged 3 commits into from
Dec 2, 2024
Merged
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
82 changes: 82 additions & 0 deletions nanoFramework.Hardware.Esp32/DeviceTypePins.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ public enum DeviceTypes
/// I2S Device type
/// </summary>
I2S = 6 * ValueTypes.DeviceType,

/// <summary>
/// SDMMC SD card pins
/// </summary>
SDMMC = 8 * ValueTypes.DeviceType
};

/// <summary>
Expand Down Expand Up @@ -156,6 +161,23 @@ public enum DeviceFunction
/// </summary>
COM3_CTS = DeviceTypes.SERIAL + (3 * ValueTypes.DeviceIndex) + 3,

/// <summary>
/// Device function TX data for COM4
/// </summary>
COM4_TX = DeviceTypes.SERIAL + (4 * ValueTypes.DeviceIndex) + 0,
/// <summary>
/// Device function RX data for COM4
/// </summary>
COM4_RX = DeviceTypes.SERIAL + (4 * ValueTypes.DeviceIndex) + 1,
/// <summary>
/// Device function Request to Send(RTS) for COM4
/// </summary>
COM4_RTS = DeviceTypes.SERIAL + (4 * ValueTypes.DeviceIndex) + 2,
/// <summary>
/// Device function Clear to Send(CTS) for COM4
/// </summary>
COM4_CTS = DeviceTypes.SERIAL + (4 * ValueTypes.DeviceIndex) + 3,

/// <summary>
/// Device function PWM1
/// </summary>
Expand Down Expand Up @@ -366,5 +388,65 @@ public enum DeviceFunction
/// Used for input data typically from a microphone.
/// </summary>
I2S2_MDATA_IN = DeviceTypes.I2S + (2 * ValueTypes.DeviceIndex) + 4,

/// <summary>
/// SDMMC clock pin.
/// </summary>
SDMMC1_CLOCK = DeviceTypes.SDMMC + (1 * ValueTypes.DeviceIndex) + 0,

/// <summary>
/// SDMMC1 command pin
/// </summary>
SDMMC1_COMMAND = DeviceTypes.SDMMC + (1 * ValueTypes.DeviceIndex) + 1,

/// <summary>
/// SDMMC1 data pin D0
/// </summary>
SDMMC1_D0 = DeviceTypes.SDMMC + (1 * ValueTypes.DeviceIndex) + 2,

/// <summary>
/// SDMMC1 data pin D1
/// </summary>
SDMMC1_D1 = DeviceTypes.SDMMC + (1 * ValueTypes.DeviceIndex) + 3,

/// <summary>
/// SDMMC1 data pin D2
/// </summary>
SDMMC1_D2 = DeviceTypes.SDMMC + (1 * ValueTypes.DeviceIndex) + 4,

/// <summary>
/// SDMMC1 data pin D3
/// </summary>
SDMMC1_D3 = DeviceTypes.SDMMC + (1 * ValueTypes.DeviceIndex) + 5,

/// <summary>
/// SDMMC2 clock pin.
/// </summary>
SDMMC2_CLOCK = DeviceTypes.SDMMC + (2 * ValueTypes.DeviceIndex) + 0,

/// <summary>
/// SDMMC2 command pin
/// </summary>
SDMMC2_COMMAND = DeviceTypes.SDMMC + (2 * ValueTypes.DeviceIndex) + 1,

/// <summary>
/// SDMMC2 data pin D0
/// </summary>
SDMMC2_D0 = DeviceTypes.SDMMC + (2 * ValueTypes.DeviceIndex) + 2,

/// <summary>
/// SDMMC2 data pin D1
/// </summary>
SDMMC2_D1 = DeviceTypes.SDMMC + (2 * ValueTypes.DeviceIndex) + 3,

/// <summary>
/// SDMMC2 data pin D2
/// </summary>
SDMMC2_D2 = DeviceTypes.SDMMC + (2 * ValueTypes.DeviceIndex) + 4,

/// <summary>
/// SDMMC2 data pin D3
/// </summary>
SDMMC2_D3 = DeviceTypes.SDMMC + (2 * ValueTypes.DeviceIndex) + 5
};
}