Skip to content

Commit 3a5f110

Browse files
committed
Applying Google C++ Style Guide
1 parent 9daff99 commit 3a5f110

File tree

114 files changed

+2946
-4502
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+2946
-4502
lines changed

gd32_dmx_usb_pro/.settings/language.settings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
55
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
66
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
7-
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="([^/\\\\]*)((g?cc)|([gc]\+\+)|(clang))" prefer-non-shared="true"/>
8-
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1420124536012079195" id="org.eclipse.embedcdt.managedbuild.cross.arm.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Arm Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
7+
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
8+
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1982985380677206927" id="org.eclipse.embedcdt.managedbuild.cross.arm.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Arm Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
99
<language-scope id="org.eclipse.cdt.core.gcc"/>
1010
<language-scope id="org.eclipse.cdt.core.g++"/>
1111
</provider>

gd32_dmx_usb_pro/firmware/main.cpp

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,64 +26,60 @@
2626
#include <cstdio>
2727
#include <cstdint>
2828

29+
#include "hal.h"
2930
#include "gd32/hal_watchdog.h"
3031
#include "hal_boardinfo.h"
31-
#include "network.h"
32-
#include "display.h"
33-
32+
#include "noemac/network.h"
3433
#include "widget.h"
3534
#include "widgetparams.h"
3635
#include "rdmdeviceparams.h"
37-
3836
#include "configstore.h"
39-
4037
#include "software_version.h"
4138

4239
#ifndef ALIGNED
4340
#define ALIGNED __attribute__((aligned(4)))
4441
#endif
4542

46-
static constexpr char widget_mode_names[4][12] ALIGNED = {"DMX_RDM", "DMX", "RDM", "RDM_SNIFFER"};
47-
static constexpr TRDMDeviceInfoData deviceLabel ALIGNED = {const_cast<char*>("GD32F103RC DMX USB Pro"), 22};
43+
static constexpr char kWidgetModeNames[4][12] ALIGNED = {"DMX_RDM", "DMX", "RDM", "RDM_SNIFFER"};
44+
static constexpr TRDMDeviceInfoData kDeviceLabel ALIGNED = {const_cast<char*>("GD32F103RC DMX USB Pro"), 22};
4845

4946
int main()
5047
{
5148
hal::Init();
52-
Display display; // Not supported, yet.
53-
ConfigStore configStore;
49+
ConfigStore config_store;
5450
Network nw;
5551

5652
Widget widget;
5753
widget.SetPortDirection(0, dmx::PortDirection::kInput, false);
5854

59-
WidgetParams widgetParams;
55+
WidgetParams widget_params;
6056

61-
widgetParams.Load();
62-
widgetParams.Set();
57+
widget_params.Load();
58+
widget_params.Set();
6359

64-
widget.SetLabel(&deviceLabel);
60+
widget.SetLabel(&kDeviceLabel);
6561

66-
RDMDeviceParams rdmDeviceParams;
62+
RDMDeviceParams rdm_device_params;
6763

68-
rdmDeviceParams.Load();
69-
rdmDeviceParams.Set(&widget);
64+
rdm_device_params.Load();
65+
rdm_device_params.Set(&widget);
7066

7167
widget.Init();
7268

73-
const auto* pRdmDeviceUid = widget.GetUID();
74-
TRDMDeviceInfoData tRdmDeviceLabel;
75-
widget.GetLabel(&tRdmDeviceLabel);
76-
const auto widgetMode = widgetParams.GetMode();
69+
const auto* rdm_device_uid = widget.GetUID();
70+
TRDMDeviceInfoData rdm_device_label;
71+
widget.GetLabel(&rdm_device_label);
72+
const auto kWidgetMode = widget_params.GetMode();
7773

78-
uint8_t nHwTextLength;
79-
printf("[V%s] %s Compiled on %s at %s\n", SOFTWARE_VERSION, hal::BoardName(nHwTextLength), __DATE__, __TIME__);
80-
printf("RDM Controller with USB [Compatible with Enttec USB Pro protocol], Widget mode : %d (%s)\n", widgetMode, widget_mode_names[static_cast<uint32_t>(widgetMode)]);
81-
printf("Device UUID : %.2x%.2x:%.2x%.2x%.2x%.2x, ", pRdmDeviceUid[0], pRdmDeviceUid[1], pRdmDeviceUid[2], pRdmDeviceUid[3], pRdmDeviceUid[4], pRdmDeviceUid[5]);
82-
printf("Label : %.*s\n", static_cast<int>(tRdmDeviceLabel.length), reinterpret_cast<const char*>(tRdmDeviceLabel.data));
74+
uint8_t hw_text_length;
75+
printf("[V%s] %s Compiled on %s at %s\n", SOFTWARE_VERSION, hal::BoardName(hw_text_length), __DATE__, __TIME__);
76+
printf("RDM Controller with USB [Compatible with Enttec USB Pro protocol], Widget mode : %d (%s)\n", kWidgetMode, kWidgetModeNames[static_cast<uint32_t>(kWidgetMode)]);
77+
printf("Device UUID : %.2x%.2x:%.2x%.2x%.2x%.2x, ", rdm_device_uid[0], rdm_device_uid[1], rdm_device_uid[2], rdm_device_uid[3], rdm_device_uid[4], rdm_device_uid[5]);
78+
printf("Label : %.*s\n", static_cast<int>(rdm_device_label.length), reinterpret_cast<const char*>(rdm_device_label.data));
8379

8480
hal::WatchdogInit();
8581

86-
if (widgetMode == widget::Mode::RDM_SNIFFER)
82+
if (kWidgetMode == widget::Mode::kRdmSniffer)
8783
{
8884
widget.SetPortDirection(0, dmx::PortDirection::kInput, true);
8985
widget.SnifferFillTransmitBuffer(); // Prevent missing first frame

gd32_rdm_responder/.settings/language.settings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
55
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
66
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
7-
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="([^/\\\\]*)((g?cc)|([gc]\+\+)|(clang))" prefer-non-shared="true"/>
8-
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1420124536012079195" id="org.eclipse.embedcdt.managedbuild.cross.arm.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Arm Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
7+
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
8+
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1982985380677206927" id="org.eclipse.embedcdt.managedbuild.cross.arm.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Arm Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
99
<language-scope id="org.eclipse.cdt.core.gcc"/>
1010
<language-scope id="org.eclipse.cdt.core.g++"/>
1111
</provider>

gd32_rdm_responder/firmware/main.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,18 @@ int main() {
100100
RDMPersonality *personalities[PERSONALITY_COUNT];
101101

102102
for (uint32_t nIndex = 0; nIndex < PERSONALITY_COUNT; nIndex++) {
103-
const auto description = pixel::pixel_get_type(static_cast<pixel::Type>(nIndex));
103+
const auto description = pixel::GetType(static_cast<pixel::Type>(nIndex));
104104
personalities[nIndex] = new RDMPersonality(description, &pixelDmx);
105105
}
106106

107107
RDMResponder rdmResponder(personalities, PERSONALITY_COUNT, static_cast<uint32_t>(pixelDmxConfiguration.GetType()) + 1U);
108108
#else
109109
char aDescription[rdm::personality::DESCRIPTION_MAX_LENGTH];
110110
snprintf(aDescription, sizeof(aDescription) - 1U, "%s:%u G%u [%s]",
111-
pixel::pixel_get_type(pixelDmxConfiguration.GetType()),
111+
pixel::GetType(pixelDmxConfiguration.GetType()),
112112
pixelDmxConfiguration.GetCount(),
113113
pixelDmxConfiguration.GetGroupingCount(),
114-
pixel::pixel_get_map(pixelDmxConfiguration.GetMap()));
114+
pixel::GetMap(pixelDmxConfiguration.GetMap()));
115115

116116
RDMPersonality *personalities[2] = {
117117
new RDMPersonality(aDescription, &pixelDmx),
@@ -143,7 +143,7 @@ int main() {
143143
rdmDeviceParams.Set(&rdmResponder);
144144

145145
rdmResponder.Start();
146-
rdmResponder.DmxDisableOutput(!isConfigMode && (nTestPattern != pixelpatterns::Pattern::NONE));
146+
rdmResponder.DmxDisableOutput(!isConfigMode && (nTestPattern != pixelpatterns::Pattern::kNone));
147147
rdmResponder.Print();
148148

149149
if (isConfigMode) {
@@ -154,7 +154,7 @@ int main() {
154154

155155
if (isConfigMode) {
156156
puts("Config mode");
157-
} else if (nTestPattern != pixelpatterns::Pattern::NONE) {
157+
} else if (nTestPattern != pixelpatterns::Pattern::kNone) {
158158
printf("Test pattern : %s [%u]\n", PixelPatterns::GetName(nTestPattern), static_cast<uint32_t>(nTestPattern));
159159
}
160160

@@ -176,17 +176,17 @@ int main() {
176176

177177
display.Show();
178178
display.Printf(7, "%s:%d G%d %s",
179-
pixel::pixel_get_type(pixelDmxConfiguration.GetType()),
179+
pixel::GetType(pixelDmxConfiguration.GetType()),
180180
pixelDmxConfiguration.GetCount(),
181181
pixelDmxConfiguration.GetGroupingCount(),
182-
pixel::pixel_get_map(pixelDmxConfiguration.GetMap()));
182+
pixel::GetMap(pixelDmxConfiguration.GetMap()));
183183

184184
if (isConfigMode) {
185185
display.ClearLine(3);
186186
display.ClearLine(4);
187187
display.Write(4, "Config Mode");
188188
display.ClearLine(5);
189-
} else if (nTestPattern != pixelpatterns::Pattern::NONE) {
189+
} else if (nTestPattern != pixelpatterns::Pattern::kNone) {
190190
display.ClearLine(6);
191191
display.Printf(6, "%s:%u", PixelPatterns::GetName(nTestPattern), static_cast<uint32_t>(nTestPattern));
192192
}

gd32_rdm_responder/lib/display.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ void PixelDmxParamsRdm::Display(const uint8_t *pData) {
4545
}
4646

4747
DisplayUdf::Get()->Printf(7, "%-8s %-2d G%-2d %-5s",
48-
pixel::pixel_get_type(static_cast<pixel::Type>(pData[static_cast<uint32_t>(SlotInfo::TYPE)])),
48+
pixel::GetType(static_cast<pixel::Type>(pData[static_cast<uint32_t>(SlotInfo::TYPE)])),
4949
pData[static_cast<uint32_t>(SlotInfo::COUNT)],
5050
pData[static_cast<uint32_t>(SlotInfo::GROUPING_COUNT)],
51-
pixel::pixel_get_map(static_cast<pixel::Map>(pData[static_cast<uint32_t>(SlotInfo::MAP)])));
51+
pixel::GetMap(static_cast<pixel::Map>(pData[static_cast<uint32_t>(SlotInfo::MAP)])));
5252

5353
if (pData[nLastIndex] == 0xFF) {
5454
if (!s_IsProgrammed) {

gd32_rdm_responder/lib/personalityupdate.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void RDMResponder::PersonalityUpdate(uint32_t nPersonality) {
4545

4646
const auto nTestPattern = PixelTestPattern::Get()->GetPattern();
4747

48-
if (nTestPattern == pixelpatterns::Pattern::NONE) {
48+
if (nTestPattern == pixelpatterns::Pattern::kNone) {
4949
} else {
5050
DisplayUdf::Get()->ClearEndOfLine();
5151
DisplayUdf::Get()->Printf(6, "%s:%u", PixelPatterns::GetName(nTestPattern), static_cast<uint32_t>(nTestPattern));
@@ -55,18 +55,18 @@ void RDMResponder::PersonalityUpdate(uint32_t nPersonality) {
5555

5656
DisplayUdf::Get()->ClearEndOfLine();
5757
DisplayUdf::Get()->Printf(7, "%s:%d G%d %s",
58-
pixel::pixel_get_type(PixelConfiguration::Get().GetType()),
58+
pixel::GetType(PixelConfiguration::Get().GetType()),
5959
PixelConfiguration::Get().GetCount(),
6060
PixelDmxConfiguration::Get().GetGroupingCount(),
61-
pixel::pixel_get_map(PixelConfiguration::Get().GetMap()));
61+
pixel::GetMap(PixelConfiguration::Get().GetMap()));
6262
DisplayUdf::Get()->Show();
6363

6464
#if defined (CONFIG_RDM_MANUFACTURER_PIDS_SET)
6565
#else
6666
if (nPersonality == 1) {
6767
const auto nTestPattern = PixelTestPattern::Get()->GetPattern();
6868

69-
if (nTestPattern == pixelpatterns::Pattern::NONE) {
69+
if (nTestPattern == pixelpatterns::Pattern::kNone) {
7070
} else {
7171
DisplayUdf::Get()->ClearEndOfLine();
7272
DisplayUdf::Get()->Printf(6, "%s:%u", PixelPatterns::GetName(nTestPattern), static_cast<uint32_t>(nTestPattern));

gd32_rdm_responder/lib/rdm_selftest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ bool Set(uint8_t nSelfTest) {
4747
return false;
4848
}
4949

50-
if (static_cast<pixelpatterns::Pattern>(nSelfTest) != pixelpatterns::Pattern::NONE) {
50+
if (static_cast<pixelpatterns::Pattern>(nSelfTest) != pixelpatterns::Pattern::kNone) {
5151
RDMResponder::Get()->DmxDisableOutput(true);
5252
Display::Get()->ClearLine(6);
5353
Display::Get()->Printf(6, "%s:%u", PixelPatterns::GetName(static_cast<pixelpatterns::Pattern>(nSelfTest)), nSelfTest);

gd32_rdm_responder/lib/rdmidentify.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void RDMIdentify::On(rdm::identify::Mode nMode) {
4141
if ((nMode == rdm::identify::Mode::LOUD) && (!s_isOn)) {
4242
s_isOn = true;
4343
s_Pattern = PixelTestPattern::Get()->GetPattern();
44-
PixelTestPattern::Get()->SetPattern(pixelpatterns::Pattern::FADE);
44+
PixelTestPattern::Get()->SetPattern(pixelpatterns::Pattern::kFade);
4545
RDMResponder::Get()->DmxDisableOutput(true);
4646
}
4747

@@ -55,7 +55,7 @@ void RDMIdentify::Off([[maybe_unused]] rdm::identify::Mode nMode) {
5555
if (s_isOn) {
5656
s_isOn = false;
5757
PixelTestPattern::Get()->SetPattern(s_Pattern);
58-
RDMResponder::Get()->DmxDisableOutput(pixelpatterns::Pattern::NONE != s_Pattern);
58+
RDMResponder::Get()->DmxDisableOutput(pixelpatterns::Pattern::kNone != s_Pattern);
5959
}
6060

6161
DEBUG_EXIT

lib-configstore/device/gd32/ram/storedevice.cpp

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @file storedevice.cpp
33
*
44
*/
5-
/* Copyright (C) 2022-2023 by Arjan van Vught mailto:info@gd32-dmx.org
5+
/* Copyright (C) 2022-2025 by Arjan van Vught mailto:info@gd32-dmx.org
66
*
77
* Permission is hereby granted, free of charge, to any person obtaining a copy
88
* of this software and associated documentation files (the "Software"), to deal
@@ -32,14 +32,8 @@
3232

3333
#include "debug.h"
3434

35-
namespace storedevice {
36-
/* Backwards compatibility with SPI FLASH */
37-
static constexpr auto FLASH_SECTOR_SIZE = 4096U;
38-
static constexpr auto BSRAM_SIZE = 4096U;
39-
} // namespace storedevice
40-
41-
42-
using namespace storedevice;
35+
static constexpr uint32_t kFlashSectorSize = 4096U;
36+
static constexpr uint32_t kBsramSize = 4096U;
4337

4438
StoreDevice::StoreDevice() {
4539
DEBUG_ENTRY
@@ -57,39 +51,39 @@ StoreDevice::~StoreDevice() {
5751
}
5852

5953
uint32_t StoreDevice::GetSize() const {
60-
return BSRAM_SIZE;
54+
return kBsramSize;
6155
}
6256

6357
uint32_t StoreDevice::GetSectorSize() const {
64-
return FLASH_SECTOR_SIZE;
58+
return kFlashSectorSize;
6559
}
6660

67-
bool StoreDevice::Read(__attribute__((unused)) uint32_t nOffset, __attribute__((unused)) uint32_t nLength, __attribute__((unused)) uint8_t *pBuffer, storedevice::result& nResult) {
61+
bool StoreDevice::Read(__attribute__((unused)) uint32_t offset, __attribute__((unused)) uint32_t length, __attribute__((unused)) uint8_t *buffer, storedevice::Result& result) {
6862
DEBUG_ENTRY
69-
DEBUG_PRINTF("offset=%p[%d], len=%u[%d], data=%p[%d]", nOffset, (((uint32_t)(nOffset) & 0x3) == 0), nLength, (((uint32_t)(nLength) & 0x3) == 0), pBuffer, (((uint32_t)(pBuffer) & 0x3) == 0));
70-
assert((nOffset + nLength) <= BSRAM_SIZE);
63+
DEBUG_PRINTF("offset=%p[%d], len=%u[%d], data=%p[%d]", offset, (((uint32_t)(offset) & 0x3) == 0), length, (((uint32_t)(length) & 0x3) == 0), buffer, (((uint32_t)(buffer) & 0x3) == 0));
64+
assert((offset + length) <= BSRAM_SIZE);
7165

72-
nResult = result::OK;
66+
result = storedevice::Result::OK;
7367

7468
DEBUG_EXIT
7569
return true;
7670
}
7771

78-
bool StoreDevice::Erase(__attribute__((unused)) uint32_t nOffset, __attribute__((unused)) uint32_t nLength, storedevice::result& nResult) {
72+
bool StoreDevice::Erase(__attribute__((unused)) uint32_t offset, __attribute__((unused)) uint32_t length, storedevice::Result& result) {
7973
DEBUG_ENTRY
8074

81-
nResult = result::OK;
75+
result = storedevice::Result::OK;
8276

8377
DEBUG_EXIT
8478
return true;
8579
}
8680

87-
bool StoreDevice::Write(__attribute__((unused)) uint32_t nOffset, __attribute__((unused)) uint32_t nLength, __attribute__((unused)) const uint8_t *pBuffer, storedevice::result& nResult) {
81+
bool StoreDevice::Write(__attribute__((unused)) uint32_t offset, __attribute__((unused)) uint32_t length, __attribute__((unused)) const uint8_t *buffer, storedevice::Result& result) {
8882
DEBUG_ENTRY
89-
DEBUG_PRINTF("offset=%p[%d], len=%u[%d], data=%p[%d]", nOffset, (((uint32_t)(nOffset) & 0x3) == 0), nLength, (((uint32_t)(nLength) & 0x3) == 0), pBuffer, (((uint32_t)(pBuffer) & 0x3) == 0));
90-
assert((nOffset + nLength) <= BSRAM_SIZE);
83+
DEBUG_PRINTF("offset=%p[%d], len=%u[%d], data=%p[%d]", offset, (((uint32_t)(offset) & 0x3) == 0), length, (((uint32_t)(length) & 0x3) == 0), buffer, (((uint32_t)(buffer) & 0x3) == 0));
84+
assert((offset + length) <= BSRAM_SIZE);
9185

92-
nResult = result::OK;
86+
result = storedevice::Result::OK;
9387

9488
DEBUG_EXIT
9589
return true;

lib-configstore/device/gd32/rom/storedevice.cpp

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @file storedevice.cpp
33
*
44
*/
5-
/* Copyright (C) 2022 by Arjan van Vught mailto:info@orangepi-dmx.nl
5+
/* Copyright (C) 2022-2025 by Arjan van Vught mailto:info@gd32-dmx.org
66
*
77
* Permission is hereby granted, free of charge, to any person obtaining a copy
88
* of this software and associated documentation files (the "Software"), to deal
@@ -24,7 +24,6 @@
2424
*/
2525

2626
#include <cstdint>
27-
#include <cassert>
2827

2928
#include "configstoredevice.h"
3029
#include "flashcode.h"
@@ -53,38 +52,38 @@ uint32_t StoreDevice::GetSectorSize() const {
5352
return FlashCode::GetSectorSize();
5453
}
5554

56-
bool StoreDevice::Read(uint32_t nOffset, uint32_t nLength, uint8_t *pBuffer, storedevice::Result& result) {
55+
bool StoreDevice::Read(uint32_t offset, uint32_t length, uint8_t *pBuffer, storedevice::Result& result) {
5756
DEBUG_ENTRY
5857

59-
flashcode::result flashromResult;
60-
const auto state = FlashCode::Read(nOffset, nLength, pBuffer, flashromResult);
58+
flashcode::result flashrom_result;
59+
const auto kState = FlashCode::Read(offset, length, pBuffer, flashrom_result);
6160

62-
result = static_cast<storedevice::Result>(flashromResult);
61+
result = static_cast<storedevice::Result>(flashrom_result);
6362

6463
DEBUG_EXIT
65-
return state;
64+
return kState;
6665
}
6766

68-
bool StoreDevice::Erase(uint32_t nOffset, uint32_t nLength, storedevice::Result& result) {
67+
bool StoreDevice::Erase(uint32_t offset, uint32_t length, storedevice::Result& result) {
6968
DEBUG_ENTRY
7069

71-
flashcode::result flashromResult;
72-
const auto state = FlashCode::Erase(nOffset, nLength, flashromResult);
70+
flashcode::result flashrom_result;
71+
const auto kState = FlashCode::Erase(offset, length, flashrom_result);
7372

74-
result = static_cast<storedevice::Result>(flashromResult);
73+
result = static_cast<storedevice::Result>(flashrom_result);
7574

7675
DEBUG_EXIT
77-
return state;
76+
return kState;
7877
}
7978

80-
bool StoreDevice::Write(uint32_t nOffset, uint32_t nLength, const uint8_t *pBuffer, storedevice::Result& result) {
79+
bool StoreDevice::Write(uint32_t offset, uint32_t length, const uint8_t *pBuffer, storedevice::Result& result) {
8180
DEBUG_ENTRY
8281

83-
flashcode::result flashromResult;
84-
const auto state = FlashCode::Write(nOffset, nLength, pBuffer, flashromResult);
82+
flashcode::result flashrom_result;
83+
const auto kState = FlashCode::Write(offset, length, pBuffer, flashrom_result);
8584

86-
result = static_cast<storedevice::Result>(flashromResult);
85+
result = static_cast<storedevice::Result>(flashrom_result);
8786

8887
DEBUG_EXIT
89-
return state;
88+
return kState;
9089
}

0 commit comments

Comments
 (0)