Skip to content

Commit 69c36ae

Browse files
authored
Adding I2S support for Configuration (#145)
1 parent 30050e1 commit 69c36ae

File tree

2 files changed

+63
-2
lines changed

2 files changed

+63
-2
lines changed

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ pool:
2020
vmImage: 'windows-2019'
2121

2222
variables:
23-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
24-
solution: '**/*.sln'
23+
DOTNET_NOLOGO: true
24+
solution: 'nanoFramework.Hardware.Esp32.sln'
2525
buildPlatform: 'Any CPU'
2626
buildConfiguration: 'Release'
2727
nugetPackageName: 'nanoFramework.Hardware.Esp32'

nanoFramework.Hardware.Esp32/DeviceTypePins.cs

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,36 @@ public enum DeviceTypes
2323
/// GPIO Device type
2424
/// </summary>
2525
GPIO = 0 * ValueTypes.DeviceType,
26+
2627
/// <summary>
2728
/// SPI Device type
2829
/// </summary>
2930
SPI = 1 * ValueTypes.DeviceType,
31+
3032
/// <summary>
3133
/// I2C Device type
3234
/// </summary>
3335
I2C = 2 * ValueTypes.DeviceType,
36+
3437
/// <summary>
3538
/// SERIAL Device type
3639
/// </summary>
3740
SERIAL = 3 * ValueTypes.DeviceType,
41+
3842
/// <summary>
3943
/// PWM Device type
4044
/// </summary>
4145
PWM = 4 * ValueTypes.DeviceType,
46+
4247
/// <summary>
4348
/// ADC Device type
4449
/// </summary>
4550
ADC = 5 * ValueTypes.DeviceType,
51+
52+
/// <summary>
53+
/// I2S Device type
54+
/// </summary>
55+
I2S = 6 * ValueTypes.DeviceType,
4656
};
4757

4858
/// <summary>
@@ -305,5 +315,56 @@ public enum DeviceFunction
305315
/// </summary>
306316
ADC1_CH19 = DeviceTypes.ADC + (1 * ValueTypes.DeviceIndex) + 19,
307317

318+
/// <summary>
319+
/// I2S1 function Master Clock.
320+
/// Used only in master mode.
321+
/// </summary>
322+
I2S1_MCK = DeviceTypes.I2S + (1 * ValueTypes.DeviceIndex) + 0,
323+
/// <summary>
324+
/// I2S1 function Bit Clock.
325+
/// Used for general purpose read and write on the I2S bus.
326+
/// </summary>
327+
I2S1_BCK = DeviceTypes.I2S + (1 * ValueTypes.DeviceIndex) + 1,
328+
/// <summary>
329+
/// I2S1 function WS.
330+
/// Used if your have stereo.
331+
/// </summary>
332+
I2S1_WS = DeviceTypes.I2S + (1 * ValueTypes.DeviceIndex) + 2,
333+
/// <summary>
334+
/// I2S1 function DATA_OUT.
335+
/// Used for output data typically on a speaker.
336+
/// </summary>
337+
I2S1_DATA_OUT = DeviceTypes.I2S + (1 * ValueTypes.DeviceIndex) + 3,
338+
/// <summary>
339+
/// I2S1 function MDATA_IN.
340+
/// Used for input data typically from a microphone.
341+
/// </summary>
342+
I2S1_MDATA_IN = DeviceTypes.I2S + (1 * ValueTypes.DeviceIndex) + 4,
343+
344+
/// <summary>
345+
/// I2S2 function Master Clock.
346+
/// Used only in master mode.
347+
/// </summary>
348+
I2S2_MCK = DeviceTypes.I2S + (2 * ValueTypes.DeviceIndex) + 0,
349+
/// <summary>
350+
/// I2S2 function Bit Clock.
351+
/// Used for general purpose read and write on the I2S bus.
352+
/// </summary>
353+
I2S2_BCK = DeviceTypes.I2S + (2 * ValueTypes.DeviceIndex) + 1,
354+
/// <summary>
355+
/// I2S2 function WS.
356+
/// Used if your have stereo.
357+
/// </summary>
358+
I2S2_WS = DeviceTypes.I2S + (2 * ValueTypes.DeviceIndex) + 2,
359+
/// <summary>
360+
/// I2S2 function DATA_OUT.
361+
/// Used for output data typically on a speaker.
362+
/// </summary>
363+
I2S2_DATA_OUT = DeviceTypes.I2S + (2 * ValueTypes.DeviceIndex) + 3,
364+
/// <summary>
365+
/// I2S2 function MDATA_IN.
366+
/// Used for input data typically from a microphone.
367+
/// </summary>
368+
I2S2_MDATA_IN = DeviceTypes.I2S + (2 * ValueTypes.DeviceIndex) + 4,
308369
};
309370
}

0 commit comments

Comments
 (0)