Skip to content

Commit

Permalink
[spinel] make SendCommand public to allow calling without variable …
Browse files Browse the repository at this point in the history
…arguments (openthread#10602)

Changed access of SendCommand to public to allow calling without
variable arguments. This is to address compilation error in
ot-br-posix repo NcpSpinel::ThreadErasePersistentInfo (while building
for OpenWrt v23.05.4 for a mips target)(error: 'args' may be used
uninitialized [-Werror=maybe-uninitialized])
  • Loading branch information
sarveshkumarv3 authored Aug 14, 2024
1 parent 5edc367 commit 8edc081
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/lib/spinel/spinel_driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,20 @@ class SpinelDriver : public otSpinelDriver, public Logger
const char *aFormat,
va_list aArgs);

/*
* Sends a spinel command without arguments to the co-processor.
*
* @param[in] aCommand The spinel command.
* @param[in] aKey The spinel property key.
* @param[in] aTid The spinel transaction id.
*
* @retval OT_ERROR_NONE Successfully sent the command through spinel interface.
* @retval OT_ERROR_INVALID_STATE The spinel interface is in an invalid state.
* @retval OT_ERROR_NO_BUFS The spinel interface doesn't have enough buffer.
*
*/
otError SendCommand(uint32_t aCommand, spinel_prop_key_t aKey, spinel_tid_t aTid);

/*
* Sets the handler to process the received spinel frame.
*
Expand Down Expand Up @@ -291,8 +305,6 @@ class SpinelDriver : public otSpinelDriver, public Logger
void *aContext);
void HandleInitialFrame(const uint8_t *aFrame, uint16_t aLength, uint8_t aHeader, bool &aSave);

otError SendCommand(uint32_t aCommand, spinel_prop_key_t aKey, spinel_tid_t aTid);

otError CheckSpinelVersion(void);
otError GetCoprocessorVersion(void);
otError GetCoprocessorCaps(void);
Expand Down

0 comments on commit 8edc081

Please sign in to comment.