You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Zero, or 1 bit only allowed to be set for programming width
35
+
uintcountOfBitsSet=0;
36
+
while(blockRegionBitsSet>0)
37
+
{
38
+
countOfBitsSet+=blockRegionBitsSet&1;
39
+
blockRegionBitsSet>>=1;
40
+
}
41
+
if(countOfBitsSet>1)
33
42
{
34
-
// programming width is 64bits => 8 bytes
35
-
programmingAlignment=8;
43
+
thrownewNotSupportedException("Multiple selections for Flash Program Width found, only one supported per block");
36
44
}
37
45
46
+
switch(blockRegionFlashProgrammingWidth)
47
+
{
48
+
caseBlockRegionAttribute_ProgramWidthIs8bits:
49
+
// when not specified, default to minimum flash word size
50
+
programmingAlignment=0;
51
+
break;
52
+
53
+
caseBlockRegionAttribute_ProgramWidthIs64bits:
54
+
programmingAlignment=64/8;
55
+
break;
56
+
57
+
caseBlockRegionAttribute_ProgramWidthIs128bits:
58
+
programmingAlignment=128/8;
59
+
break;
60
+
61
+
caseBlockRegionAttribute_ProgramWidthIs256bits:
62
+
programmingAlignment=256/8;
63
+
break;
64
+
65
+
default:
66
+
thrownewNotSupportedException($"The specified Flash Program Width '{blockRegionFlashProgrammingWidth}' is not supported. Please check the native implementation and/or that you have the .NET nanoFramework Visual Studio extension update.");
67
+
}
68
+
69
+
Console.WriteLine($"The value is {programmingAlignment}");
0 commit comments