mirror of https://github.com/ARMmbed/mbed-os.git
Fix for compiler warnings
parent
a736139336
commit
d578a72b93
|
@ -139,13 +139,14 @@
|
|||
#endif
|
||||
|
||||
/* Define WEAK attribute */
|
||||
#if defined ( __CC_ARM )
|
||||
# define WEAK __attribute__ ((weak))
|
||||
#elif defined ( __ICCARM__ )
|
||||
# define WEAK __weak
|
||||
#elif defined ( __GNUC__ )
|
||||
# define WEAK __attribute__ ((weak))
|
||||
#endif
|
||||
//defined in toochain.h
|
||||
//#if defined ( __CC_ARM )
|
||||
//# define WEAK __attribute__ ((weak))
|
||||
//#elif defined ( __ICCARM__ )
|
||||
//# define WEAK __weak
|
||||
//#elif defined ( __GNUC__ )
|
||||
//# define WEAK __attribute__ ((weak))
|
||||
//#endif
|
||||
|
||||
/* Define NO_INIT attribute */
|
||||
#if defined ( __CC_ARM )
|
||||
|
|
|
@ -268,7 +268,6 @@ bool dma_start_transfer(int channelid)
|
|||
*/
|
||||
bool dma_busy(int channelid)
|
||||
{
|
||||
enum {res = 0};
|
||||
/* Sanity check arguments */
|
||||
MBED_ASSERT(channelid < CONF_MAX_USED_CHANNEL_NUM);
|
||||
|
||||
|
@ -279,6 +278,7 @@ bool dma_busy(int channelid)
|
|||
if (channel_index >= CONF_MAX_USED_CHANNEL_NUM) {
|
||||
/* This channel is not active! return zero for now */
|
||||
//res = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return dma_is_busy(&dma_channels[channel_index].resource);
|
||||
|
@ -292,7 +292,6 @@ bool dma_busy(int channelid)
|
|||
*/
|
||||
bool dma_is_transfer_complete(int channelid)
|
||||
{
|
||||
enum {res = 0};
|
||||
/* Sanity check arguments */
|
||||
MBED_ASSERT(channelid < CONF_MAX_USED_CHANNEL_NUM);
|
||||
|
||||
|
@ -303,6 +302,7 @@ bool dma_is_transfer_complete(int channelid)
|
|||
if (channel_index >= CONF_MAX_USED_CHANNEL_NUM) {
|
||||
/* This channel is not active! return zero for now */
|
||||
// res = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (STATUS_OK == dma_get_job_status(&dma_channels[channel_index].resource));
|
||||
|
|
|
@ -43,7 +43,7 @@ enum dma_status_flags {
|
|||
#define DMA_EVENT_ALL (DMA_TRANSFER_ERROR | DMA_TRANSFER_COMPLETE)
|
||||
|
||||
|
||||
//COMPILER_ALIGNED(16)
|
||||
COMPILER_ALIGNED(16)
|
||||
struct dma_instance_s {
|
||||
struct dma_resource resource;
|
||||
DmacDescriptor descriptor;
|
||||
|
|
|
@ -508,7 +508,7 @@ enum status_code system_clock_source_write_calibration(
|
|||
SYSCTRL->OSCULP32K.bit.CALIB = calibration_value;
|
||||
break;
|
||||
default:
|
||||
//Assert(false);
|
||||
Assert(false);
|
||||
return STATUS_ERR_INVALID_ARG;
|
||||
}
|
||||
return STATUS_OK;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "rtc_count.h"
|
||||
|
||||
#if !defined(RTC_CLOCK_SOURCE)
|
||||
// warning RTC_CLOCK_SOURCE is not defined, assuming RTC_CLOCK_SELECTION_ULP1K.
|
||||
# warning RTC_CLOCK_SOURCE is not defined, assuming RTC_CLOCK_SELECTION_ULP1K.
|
||||
# define RTC_CLOCK_SOURCE RTC_CLOCK_SELECTION_ULP1K
|
||||
#endif
|
||||
|
||||
|
|
|
@ -72,7 +72,6 @@ void us_ticker_init(void)
|
|||
uint32_t cycles_per_us;
|
||||
uint32_t prescaler = 0;
|
||||
struct tc_config config_tc;
|
||||
enum status_code ret_status;
|
||||
|
||||
if (us_ticker_inited) return;
|
||||
us_ticker_inited = 1;
|
||||
|
@ -109,7 +108,7 @@ void us_ticker_init(void)
|
|||
config_tc.counter_32_bit.compare_capture_channel[TC_COMPARE_CAPTURE_CHANNEL_0] = 0xFFFFFFFF;
|
||||
|
||||
/* Initialize the timer */
|
||||
ret_status = tc_init(&us_ticker_module, TICKER_COUNTER_uS, &config_tc);
|
||||
tc_init(&us_ticker_module, TICKER_COUNTER_uS, &config_tc);
|
||||
MBED_ASSERT(ret_status == STATUS_OK);
|
||||
|
||||
/* Register callback function */
|
||||
|
|
Loading…
Reference in New Issue