Update all demos, projects and bootloaders to indent all function parameters, one per line, for better readability.
Add missing const qualifiers to the demos.
This commit is contained in:
parent
83e293a6ec
commit
6bda628718
271 changed files with 1312 additions and 621 deletions
|
@ -172,7 +172,9 @@ USB_Descriptor_String_t PROGMEM SerialString =
|
|||
* is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the
|
||||
* USB host.
|
||||
*/
|
||||
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
|
||||
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
|
||||
const uint8_t wIndex,
|
||||
void** const DescriptorAddress)
|
||||
{
|
||||
const uint8_t DescriptorType = (wValue >> 8);
|
||||
const uint8_t DescriptorNumber = (wValue & 0xFF);
|
||||
|
|
|
@ -73,7 +73,8 @@
|
|||
} USB_Descriptor_Configuration_t;
|
||||
|
||||
/* Function Prototypes: */
|
||||
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
|
||||
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
|
||||
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
|
||||
const uint8_t wIndex,
|
||||
void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -109,8 +109,11 @@ void ISPTarget_ChangeTargetResetLine(const bool ResetTarget)
|
|||
* \return V2 Protocol status \ref STATUS_CMD_OK if the no timeout occurred, \ref STATUS_RDY_BSY_TOUT or
|
||||
* \ref STATUS_CMD_TOUT otherwise
|
||||
*/
|
||||
uint8_t ISPTarget_WaitForProgComplete(const uint8_t ProgrammingMode, const uint16_t PollAddress, const uint8_t PollValue,
|
||||
const uint8_t DelayMS, const uint8_t ReadMemCommand)
|
||||
uint8_t ISPTarget_WaitForProgComplete(const uint8_t ProgrammingMode,
|
||||
const uint16_t PollAddress,
|
||||
const uint8_t PollValue,
|
||||
const uint8_t DelayMS,
|
||||
const uint8_t ReadMemCommand)
|
||||
{
|
||||
uint8_t ProgrammingStatus = STATUS_CMD_OK;
|
||||
|
||||
|
|
|
@ -65,8 +65,10 @@
|
|||
/* Function Prototypes: */
|
||||
uint8_t ISPTarget_GetSPIPrescalerMask(void);
|
||||
void ISPTarget_ChangeTargetResetLine(const bool ResetTarget);
|
||||
uint8_t ISPTarget_WaitForProgComplete(const uint8_t ProgrammingMode, const uint16_t PollAddress,
|
||||
const uint8_t PollValue, const uint8_t DelayMS,
|
||||
uint8_t ISPTarget_WaitForProgComplete(const uint8_t ProgrammingMode,
|
||||
const uint16_t PollAddress,
|
||||
const uint8_t PollValue,
|
||||
const uint8_t DelayMS,
|
||||
const uint8_t ReadMemCommand);
|
||||
uint8_t ISPTarget_WaitWhileTargetBusy(void);
|
||||
void ISPTarget_LoadExtendedAddress(void);
|
||||
|
|
|
@ -151,7 +151,8 @@ uint8_t V2Params_GetParameterValue(const uint8_t ParamID)
|
|||
*
|
||||
* \return Pointer to the associated parameter information from the parameter table if found, NULL otherwise
|
||||
*/
|
||||
void V2Params_SetParameterValue(const uint8_t ParamID, const uint8_t Value)
|
||||
void V2Params_SetParameterValue(const uint8_t ParamID,
|
||||
const uint8_t Value)
|
||||
{
|
||||
ParameterItem_t* ParamInfo = V2Params_GetParamFromTable(ParamID);
|
||||
|
||||
|
|
|
@ -75,7 +75,8 @@
|
|||
|
||||
uint8_t V2Params_GetParameterPrivileges(const uint8_t ParamID);
|
||||
uint8_t V2Params_GetParameterValue(const uint8_t ParamID);
|
||||
void V2Params_SetParameterValue(const uint8_t ParamID, const uint8_t Value);
|
||||
void V2Params_SetParameterValue(const uint8_t ParamID,
|
||||
const uint8_t Value);
|
||||
|
||||
#if defined(INCLUDE_FROM_V2PROTOCOL_PARAMS_C)
|
||||
static ParameterItem_t* V2Params_GetParamFromTable(const uint8_t ParamID);
|
||||
|
|
|
@ -127,7 +127,9 @@ bool TINYNVM_WaitWhileNVMControllerBusy(void)
|
|||
*
|
||||
* \return Boolean true if the command sequence complete successfully
|
||||
*/
|
||||
bool TINYNVM_ReadMemory(const uint16_t ReadAddress, uint8_t* ReadBuffer, uint16_t ReadSize)
|
||||
bool TINYNVM_ReadMemory(const uint16_t ReadAddress,
|
||||
uint8_t* ReadBuffer,
|
||||
uint16_t ReadSize)
|
||||
{
|
||||
/* Wait until the NVM controller is no longer busy */
|
||||
if (!(TINYNVM_WaitWhileNVMControllerBusy()))
|
||||
|
@ -158,7 +160,9 @@ bool TINYNVM_ReadMemory(const uint16_t ReadAddress, uint8_t* ReadBuffer, uint16_
|
|||
*
|
||||
* \return Boolean true if the command sequence complete successfully
|
||||
*/
|
||||
bool TINYNVM_WriteMemory(const uint16_t WriteAddress, uint8_t* WriteBuffer, uint16_t WriteLength)
|
||||
bool TINYNVM_WriteMemory(const uint16_t WriteAddress,
|
||||
uint8_t* WriteBuffer,
|
||||
uint16_t WriteLength)
|
||||
{
|
||||
/* Wait until the NVM controller is no longer busy */
|
||||
if (!(TINYNVM_WaitWhileNVMControllerBusy()))
|
||||
|
@ -203,7 +207,8 @@ bool TINYNVM_WriteMemory(const uint16_t WriteAddress, uint8_t* WriteBuffer, uint
|
|||
*
|
||||
* \return Boolean true if the command sequence complete successfully
|
||||
*/
|
||||
bool TINYNVM_EraseMemory(const uint8_t EraseCommand, const uint16_t Address)
|
||||
bool TINYNVM_EraseMemory(const uint8_t EraseCommand,
|
||||
const uint16_t Address)
|
||||
{
|
||||
/* Wait until the NVM controller is no longer busy */
|
||||
if (!(TINYNVM_WaitWhileNVMControllerBusy()))
|
||||
|
|
|
@ -64,9 +64,14 @@
|
|||
/* Function Prototypes: */
|
||||
bool TINYNVM_WaitWhileNVMBusBusy(void);
|
||||
bool TINYNVM_WaitWhileNVMControllerBusy(void);
|
||||
bool TINYNVM_ReadMemory(const uint16_t ReadAddress, uint8_t* ReadBuffer, uint16_t ReadLength);
|
||||
bool TINYNVM_WriteMemory(const uint16_t WriteAddress, uint8_t* WriteBuffer, uint16_t WriteLength);
|
||||
bool TINYNVM_EraseMemory(const uint8_t EraseCommand, const uint16_t Address);
|
||||
bool TINYNVM_ReadMemory(const uint16_t ReadAddress,
|
||||
uint8_t* ReadBuffer,
|
||||
uint16_t ReadLength);
|
||||
bool TINYNVM_WriteMemory(const uint16_t WriteAddress,
|
||||
uint8_t* WriteBuffer,
|
||||
uint16_t WriteLength);
|
||||
bool TINYNVM_EraseMemory(const uint8_t EraseCommand,
|
||||
const uint16_t Address);
|
||||
|
||||
#if (defined(INCLUDE_FROM_TINYNVM_C) && defined(ENABLE_XPROG_PROTOCOL))
|
||||
static void TINYNVM_SendReadNVMRegister(const uint8_t Address);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue