forked from espressif/esp-modbus
tools: Mass fixing of empty prototypes (for -Wstrict-prototypes)
* Original commit: espressif/esp-idf@afbaf74007
This commit is contained in:
@@ -58,7 +58,7 @@ esp_err_t mbc_master_init(mb_port_type_t port_type, void** handler)
|
||||
/**
|
||||
* Modbus controller destroy function
|
||||
*/
|
||||
esp_err_t mbc_master_destroy()
|
||||
esp_err_t mbc_master_destroy(void)
|
||||
{
|
||||
esp_err_t error = ESP_OK;
|
||||
MB_MASTER_CHECK((master_interface_ptr != NULL),
|
||||
@@ -195,7 +195,7 @@ esp_err_t mbc_master_setup(void* comm_info)
|
||||
/**
|
||||
* Modbus controller stack start function
|
||||
*/
|
||||
esp_err_t mbc_master_start()
|
||||
esp_err_t mbc_master_start(void)
|
||||
{
|
||||
esp_err_t error = ESP_OK;
|
||||
MB_MASTER_CHECK((master_interface_ptr != NULL),
|
||||
|
@@ -77,7 +77,7 @@ esp_err_t mbc_slave_init(mb_port_type_t port_type, void** handler)
|
||||
/**
|
||||
* Modbus controller destroy function
|
||||
*/
|
||||
esp_err_t mbc_slave_destroy()
|
||||
esp_err_t mbc_slave_destroy(void)
|
||||
{
|
||||
esp_err_t error = ESP_OK;
|
||||
// Is initialization done?
|
||||
@@ -118,7 +118,7 @@ esp_err_t mbc_slave_setup(void* comm_info)
|
||||
/**
|
||||
* Start Modbus controller start function
|
||||
*/
|
||||
esp_err_t mbc_slave_start()
|
||||
esp_err_t mbc_slave_start(void)
|
||||
{
|
||||
esp_err_t error = ESP_OK;
|
||||
MB_SLAVE_CHECK((slave_interface_ptr != NULL),
|
||||
|
@@ -46,13 +46,13 @@ static _lock_t s_port_lock;
|
||||
|
||||
/* ----------------------- Start implementation -----------------------------*/
|
||||
inline void
|
||||
vMBPortEnterCritical( )
|
||||
vMBPortEnterCritical(void)
|
||||
{
|
||||
_lock_acquire(&s_port_lock);
|
||||
}
|
||||
|
||||
inline void
|
||||
vMBPortExitCritical( )
|
||||
vMBPortExitCritical(void)
|
||||
{
|
||||
_lock_release(&s_port_lock);
|
||||
}
|
||||
|
@@ -56,8 +56,8 @@ typedef short SHORT;
|
||||
typedef unsigned long ULONG;
|
||||
typedef long LONG;
|
||||
|
||||
void vMBPortEnterCritical( );
|
||||
void vMBPortExitCritical( );
|
||||
void vMBPortEnterCritical(void);
|
||||
void vMBPortExitCritical(void);
|
||||
|
||||
#define ENTER_CRITICAL_SECTION( ) { ESP_LOGD(MB_PORT_TAG,"%s: Port enter critical.", __func__); \
|
||||
vMBPortEnterCritical(); }
|
||||
|
@@ -130,7 +130,7 @@ static void vMBPortSerialRxPoll(size_t xEventSize)
|
||||
}
|
||||
}
|
||||
|
||||
BOOL xMBPortSerialTxPoll()
|
||||
BOOL xMBPortSerialTxPoll(void)
|
||||
{
|
||||
BOOL bStatus = FALSE;
|
||||
USHORT usCount = 0;
|
||||
@@ -271,7 +271,7 @@ BOOL xMBPortSerialInit(UCHAR ucPORT, ULONG ulBaudRate,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void vMBPortSerialClose()
|
||||
void vMBPortSerialClose(void)
|
||||
{
|
||||
(void)vTaskSuspend(xMbTaskHandle);
|
||||
(void)vTaskDelete(xMbTaskHandle);
|
||||
|
@@ -121,7 +121,7 @@ static void vMBMasterPortSerialRxPoll(size_t xEventSize)
|
||||
}
|
||||
}
|
||||
|
||||
BOOL xMBMasterPortSerialTxPoll()
|
||||
BOOL xMBMasterPortSerialTxPoll(void)
|
||||
{
|
||||
BOOL bStatus = FALSE;
|
||||
USHORT usCount = 0;
|
||||
@@ -265,7 +265,7 @@ BOOL xMBMasterPortSerialInit( UCHAR ucPORT, ULONG ulBaudRate, UCHAR ucDataBits,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void vMBMasterPortSerialClose()
|
||||
void vMBMasterPortSerialClose(void)
|
||||
{
|
||||
(void)vTaskDelete(xMbTaskHandle);
|
||||
ESP_ERROR_CHECK(uart_driver_delete(ucUartNumber));
|
||||
|
@@ -129,7 +129,7 @@ BOOL xMBPortTimersInit(USHORT usTim1Timerout50us)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void vMBPortTimersEnable()
|
||||
void vMBPortTimersEnable(void)
|
||||
{
|
||||
#ifdef CONFIG_FMB_TIMER_PORT_ENABLED
|
||||
ESP_ERROR_CHECK(timer_pause(usTimerGroupIndex, usTimerIndex));
|
||||
@@ -139,7 +139,7 @@ void vMBPortTimersEnable()
|
||||
#endif
|
||||
}
|
||||
|
||||
void vMBPortTimersDisable()
|
||||
void vMBPortTimersDisable(void)
|
||||
{
|
||||
#ifdef CONFIG_FMB_TIMER_PORT_ENABLED
|
||||
ESP_ERROR_CHECK(timer_pause(usTimerGroupIndex, usTimerIndex));
|
||||
@@ -149,7 +149,7 @@ void vMBPortTimersDisable()
|
||||
#endif
|
||||
}
|
||||
|
||||
void vMBPortTimerClose()
|
||||
void vMBPortTimerClose(void)
|
||||
{
|
||||
#ifdef CONFIG_FMB_TIMER_PORT_ENABLED
|
||||
ESP_ERROR_CHECK(timer_pause(usTimerGroupIndex, usTimerIndex));
|
||||
|
@@ -168,7 +168,7 @@ static BOOL xMBMasterPortTimersEnable(USHORT usTimerTics50us)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void vMBMasterPortTimersT35Enable()
|
||||
void vMBMasterPortTimersT35Enable(void)
|
||||
{
|
||||
USHORT usTimerTicks = usT35TimeOut50us;
|
||||
|
||||
@@ -178,7 +178,7 @@ void vMBMasterPortTimersT35Enable()
|
||||
(void)xMBMasterPortTimersEnable(usTimerTicks);
|
||||
}
|
||||
|
||||
void vMBMasterPortTimersConvertDelayEnable()
|
||||
void vMBMasterPortTimersConvertDelayEnable(void)
|
||||
{
|
||||
// Covert time in milliseconds into ticks
|
||||
USHORT usTimerTicks = ((MB_MASTER_DELAY_MS_CONVERT * 1000) / MB_TICK_TIME_US);
|
||||
@@ -189,7 +189,7 @@ void vMBMasterPortTimersConvertDelayEnable()
|
||||
(void)xMBMasterPortTimersEnable(usTimerTicks);
|
||||
}
|
||||
|
||||
void vMBMasterPortTimersRespondTimeoutEnable()
|
||||
void vMBMasterPortTimersRespondTimeoutEnable(void)
|
||||
{
|
||||
USHORT usTimerTicks = (MB_MASTER_TIMEOUT_MS_RESPOND * 1000 / MB_TICK_TIME_US);
|
||||
|
||||
@@ -198,7 +198,7 @@ void vMBMasterPortTimersRespondTimeoutEnable()
|
||||
(void)xMBMasterPortTimersEnable(usTimerTicks);
|
||||
}
|
||||
|
||||
void vMBMasterPortTimersDisable()
|
||||
void vMBMasterPortTimersDisable(void)
|
||||
{
|
||||
// Stop timer and then reload timer counter value
|
||||
ESP_ERROR_CHECK(timer_pause(usTimerGroupIndex, usTimerIndex));
|
||||
@@ -207,7 +207,7 @@ void vMBMasterPortTimersDisable()
|
||||
ESP_ERROR_CHECK(timer_disable_intr(usTimerGroupIndex, usTimerIndex));
|
||||
}
|
||||
|
||||
void vMBMasterPortTimerClose()
|
||||
void vMBMasterPortTimerClose(void)
|
||||
{
|
||||
ESP_ERROR_CHECK(timer_pause(usTimerGroupIndex, usTimerIndex));
|
||||
ESP_ERROR_CHECK(timer_disable_intr(usTimerGroupIndex, usTimerIndex));
|
||||
|
@@ -156,7 +156,7 @@ esp_err_t mbc_serial_slave_set_descriptor(const mb_register_area_descriptor_t de
|
||||
}
|
||||
|
||||
// The helper function to get time stamp in microseconds
|
||||
static uint64_t get_time_stamp()
|
||||
static uint64_t get_time_stamp(void)
|
||||
{
|
||||
uint64_t time_stamp = esp_timer_get_time();
|
||||
return time_stamp;
|
||||
|
Reference in New Issue
Block a user