Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions src/Firmware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@ public string Apply(string value)
var startIndex = 0;
while (startIndex < value.Length && (char.IsUpper(value[startIndex]) || !char.IsLetter(value[startIndex])))
{
if (startIndex > 1 && (startIndex + 1) < value.Length &&
char.IsLetter(value[startIndex + 1]) && char.IsLower(value[startIndex + 1]))
break;
startIndex++;
}

Expand Down
22 changes: 13 additions & 9 deletions tests/ExpectedOutput/device.app_ios_and_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,18 @@ typedef struct
/************************************************************************/
/* Registers' bits */
/************************************************************************/
#define B_DIO0 (1<<0) //
#define B_DIO1 (1<<1) //
#define B_DIO2 (1<<2) //
#define B_DIO3 (1<<10) //
#define MSK_PWM_PORT_SEL 0x0F //
#define GM_PWM_PORT_PWM0 0x01 //
#define GM_PWM_PORT_PWM1 0x02 //
#define GM_PWM_PORT_PWM2 0x04 //
#define GM_PWM_PORT_PWM3 0x0A //
#define B_DIO0 (1<<0) //
#define B_DIO1 (1<<1) //
#define B_DIO2 (1<<2) //
#define B_DIO3 (1<<3) //
#define B_DI_PORT0 (1<<8) //
#define B_TEST_DI_PORT1 (1<<9) //
#define B_SUPPLY_PORT0 (1<<10) //
#define B_PORT_DIO1 (1<<11) //
#define MSK_PWM_PORT_SEL 0x0F //
#define GM_PWM_PORT_PWM0 0x01 //
#define GM_PWM_PORT_PWM1 0x02 //
#define GM_PWM_PORT_PWM2 0x04 //
#define GM_PWM_PORT_PWM3 0x0A //

#endif /* _APP_REGS_H_ */
6 changes: 5 additions & 1 deletion tests/ExpectedOutput/device.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3293,7 +3293,11 @@ public enum PortDigitalIOS : ushort
DIO0 = 0x1,
DIO1 = 0x2,
DIO2 = 0x4,
DIO3 = 0x400
DIO3 = 0x8,
DIPort0 = 0x100,
TestDIPort1 = 0x200,
SupplyPort0 = 0x400,
PortDIO1 = 0x800
}

/// <summary>
Expand Down
6 changes: 5 additions & 1 deletion tests/Metadata/device.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ bitMasks:
DIO0: 0x1
DIO1: 0x2
DIO2: 0x4
DIO3: 0x400
DIO3: 0x8
DIPort0: 0x100
TestDIPort1: 0x200
SupplyPort0: 0x400
PortDIO1: 0x800
groupMasks:
PwmPort:
values:
Expand Down
Loading