Astyle run.

pull/14787/head
Dustin Crossman 2021-06-23 15:40:09 -07:00
parent ecaadd2597
commit 444a2bdce0
3 changed files with 7 additions and 8 deletions

View File

@ -26,7 +26,7 @@ extern "C" {
#endif
#if CY_IP_MXSMIF_INSTANCES == 1
static cyhal_qspi_t* qspi_ptr = NULL;
static cyhal_qspi_t *qspi_ptr = NULL;
#else
#error Unhandled number of SMIF instances
#endif
@ -34,15 +34,13 @@ extern "C" {
qspi_status_t qspi_init(qspi_t *obj, PinName io0, PinName io1, PinName io2, PinName io3, PinName sclk, PinName ssel, uint32_t hz, uint8_t mode)
{
// If qspi has already been initialized, free and reinit.
if(qspi_ptr != NULL)
{
if (qspi_ptr != NULL) {
cyhal_qspi_free(qspi_ptr);
qspi_ptr = NULL;
}
cy_rslt_t result = cyhal_qspi_init(&(obj->hal_qspi), io0, io1, io2, io3, NC, NC, NC, NC, sclk, ssel, hz, mode);
if(CY_RSLT_SUCCESS != result)
{
if (CY_RSLT_SUCCESS != result) {
return QSPI_STATUS_ERROR;
}

View File

@ -69,8 +69,9 @@ reset_reason_t hal_reset_reason_get(void)
count++;
}
if (count > 1)
if (count > 1) {
reason = RESET_REASON_MULTIPLE;
}
return reason;
}

View File

@ -74,11 +74,11 @@ void us_ticker_init(void)
* replaced once we have a way to allocate dedicated timers for TF-M
* and Mbed OS. */
cyhal_resource_inst_t res = { CYHAL_RSC_TCPWM, 0, 0 };
if(CY_RSLT_SUCCESS != cyhal_hwmgr_reserve(&res)) {
if (CY_RSLT_SUCCESS != cyhal_hwmgr_reserve(&res)) {
MBED_ERROR(MBED_MAKE_ERROR(MBED_MODULE_DRIVER, MBED_ERROR_CODE_FAILED_OPERATION), "cyhal_timer_init");
}
res.channel_num = 1;
if(CY_RSLT_SUCCESS != cyhal_hwmgr_reserve(&res)) {
if (CY_RSLT_SUCCESS != cyhal_hwmgr_reserve(&res)) {
MBED_ERROR(MBED_MAKE_ERROR(MBED_MODULE_DRIVER, MBED_ERROR_CODE_FAILED_OPERATION), "cyhal_timer_init");
}
#endif