mirror of https://github.com/ARMmbed/mbed-os.git
Astyle run.
parent
ecaadd2597
commit
444a2bdce0
|
@ -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)
|
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 has already been initialized, free and reinit.
|
||||||
if(qspi_ptr != NULL)
|
if (qspi_ptr != NULL) {
|
||||||
{
|
|
||||||
cyhal_qspi_free(qspi_ptr);
|
cyhal_qspi_free(qspi_ptr);
|
||||||
qspi_ptr = NULL;
|
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);
|
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;
|
return QSPI_STATUS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,8 +69,9 @@ reset_reason_t hal_reset_reason_get(void)
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count > 1)
|
if (count > 1) {
|
||||||
reason = RESET_REASON_MULTIPLE;
|
reason = RESET_REASON_MULTIPLE;
|
||||||
|
}
|
||||||
|
|
||||||
return reason;
|
return reason;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue