Skip to content

Commit

Permalink
Merge branch 'main' into fix/737
Browse files Browse the repository at this point in the history
  • Loading branch information
sihyung-maxim committed Jul 8, 2024
2 parents a4d93bd + 796e710 commit d35c479
Show file tree
Hide file tree
Showing 16 changed files with 406 additions and 820 deletions.
7 changes: 2 additions & 5 deletions Examples/MAX32690/Bluetooth/BLE_otas/dats_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,8 @@ static void datsSetup(dmEvt_t *pMsg)
{
/* Initialize control information */
datsCb.restoringResList = FALSE;
< < < < < < < < <
Temporary merge branch 1 memcpy(&datsScanDataDisc[2], deviceName, sizeof(deviceName));
datsScanDataDisc[0] = sizeof(deviceName);
datsScanDataDisc[1] = DM_ADV_TYPE_LOCAL_NAME;
== == == == = memcpy(&datsScanDataDisc[2], deviceName, sizeof(deviceName));

memcpy(&datsScanDataDisc[2], deviceName, sizeof(deviceName));
datsScanDataDisc[0] = sizeof(deviceName);
datsScanDataDisc[1] = DM_ADV_TYPE_LOCAL_NAME;

Expand Down
81 changes: 25 additions & 56 deletions Libraries/PeriphDrivers/Source/SPI/spi_ai87.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,34 +403,19 @@ int MXC_SPI_MasterTransactionDMA(mxc_spi_req_t *req)
spi_num = MXC_SPI_GET_IDX(req->spi);
MXC_ASSERT(spi_num >= 0);

if (req->txData != NULL) {
switch (spi_num) {
case 0:
reqselTx = MXC_DMA_REQUEST_SPI1TX;
break;

case 1:
reqselTx = MXC_DMA_REQUEST_SPI0TX;
break;

default:
return E_BAD_PARAM;
}
}

if (req->rxData != NULL) {
switch (spi_num) {
case 0:
reqselRx = MXC_DMA_REQUEST_SPI1RX;
break;

case 1:
reqselRx = MXC_DMA_REQUEST_SPI0RX;
break;

default:
return E_BAD_PARAM;
}
switch (spi_num) {
case 0:
reqselTx = MXC_DMA_REQUEST_SPI0TX;
reqselRx = MXC_DMA_REQUEST_SPI0RX;
break;

case 1:
reqselTx = MXC_DMA_REQUEST_SPI1TX;
reqselRx = MXC_DMA_REQUEST_SPI1RX;
break;

default:
return E_BAD_PARAM;
}

return MXC_SPI_RevA1_MasterTransactionDMA((mxc_spi_reva_req_t *)req, reqselTx, reqselRx,
Expand All @@ -457,36 +442,20 @@ int MXC_SPI_SlaveTransactionDMA(mxc_spi_req_t *req)
spi_num = MXC_SPI_GET_IDX(req->spi);
MXC_ASSERT(spi_num >= 0);

if (req->txData != NULL) {
switch (spi_num) {
case 0:
reqselTx = MXC_DMA_REQUEST_SPI1TX;
break;

case 1:
reqselTx = MXC_DMA_REQUEST_SPI0TX;
break;
switch (spi_num) {
case 0:
reqselTx = MXC_DMA_REQUEST_SPI0TX;
reqselRx = MXC_DMA_REQUEST_SPI0RX;
break;

default:
return E_BAD_PARAM;
break;
}
}
case 1:
reqselTx = MXC_DMA_REQUEST_SPI1TX;
reqselRx = MXC_DMA_REQUEST_SPI1RX;
break;

if (req->rxData != NULL) {
switch (spi_num) {
case 0:
reqselRx = MXC_DMA_REQUEST_SPI1RX;
break;

case 1:
reqselRx = MXC_DMA_REQUEST_SPI0RX;
break;

default:
return E_BAD_PARAM;
break;
}
default:
return E_BAD_PARAM;
break;
}

return MXC_SPI_RevA1_SlaveTransactionDMA((mxc_spi_reva_req_t *)req, reqselTx, reqselRx,
Expand Down
79 changes: 24 additions & 55 deletions Libraries/PeriphDrivers/Source/SPI/spi_es17.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,35 +252,19 @@ int MXC_SPI_MasterTransactionDMA(mxc_spi_req_t *req)
spi_num = MXC_SPI_GET_IDX(req->spi);
MXC_ASSERT(spi_num >= 0);

if (req->txData != NULL) {
switch (spi_num) {
case 0:
reqselTx = MXC_DMA_REQUEST_SPI0TX;
break;

case 1:
reqselTx = MXC_DMA_REQUEST_SPI1TX;
break;

default:
return E_BAD_PARAM;
}
}

//tx
if (req->rxData != NULL) {
switch (spi_num) {
case 0:
reqselRx = MXC_DMA_REQUEST_SPI0RX;
break;

case 1:
reqselRx = MXC_DMA_REQUEST_SPI1RX;
break;

default:
return E_BAD_PARAM;
}
switch (spi_num) {
case 0:
reqselTx = MXC_DMA_REQUEST_SPI0TX;
reqselRx = MXC_DMA_REQUEST_SPI0RX;
break;

case 1:
reqselTx = MXC_DMA_REQUEST_SPI1TX;
reqselRx = MXC_DMA_REQUEST_SPI1RX;
break;

default:
return E_BAD_PARAM;
}

return MXC_SPI_RevA1_MasterTransactionDMA((mxc_spi_reva_req_t *)req, reqselTx, reqselRx,
Expand All @@ -307,34 +291,19 @@ int MXC_SPI_SlaveTransactionDMA(mxc_spi_req_t *req)
spi_num = MXC_SPI_GET_IDX(req->spi);
MXC_ASSERT(spi_num >= 0);

if (req->txData != NULL) {
switch (spi_num) {
case 0:
reqselTx = MXC_DMA_REQUEST_SPI0TX;
break;
switch (spi_num) {
case 0:
reqselTx = MXC_DMA_REQUEST_SPI0TX;
reqselRx = MXC_DMA_REQUEST_SPI0RX;
break;

case 1:
reqselTx = MXC_DMA_REQUEST_SPI1TX;
break;
case 1:
reqselTx = MXC_DMA_REQUEST_SPI1TX;
reqselRx = MXC_DMA_REQUEST_SPI1RX;
break;

default:
return E_BAD_PARAM;
}
}

if (req->rxData != NULL) {
switch (spi_num) {
case 0:
reqselRx = MXC_DMA_REQUEST_SPI0RX;
break;

case 1:
reqselRx = MXC_DMA_REQUEST_SPI1RX;
break;

default:
return E_BAD_PARAM;
}
default:
return E_BAD_PARAM;
}

return MXC_SPI_RevA1_SlaveTransactionDMA((mxc_spi_reva_req_t *)req, reqselTx, reqselRx,
Expand Down
78 changes: 24 additions & 54 deletions Libraries/PeriphDrivers/Source/SPI/spi_me11.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,34 +250,19 @@ int MXC_SPI_MasterTransactionDMA(mxc_spi_req_t *req)
spi_num = MXC_SPI_GET_IDX(req->spi);
MXC_ASSERT(spi_num >= 0);

if (req->txData != NULL) {
switch (spi_num) {
case 0:
reqselTx = MXC_DMA_REQUEST_SPI0TX;
break;

case 1:
reqselTx = MXC_DMA_REQUEST_SPIMSSTX;
break;

default:
return E_BAD_PARAM;
}
}

if (req->rxData != NULL) {
switch (spi_num) {
case 0:
reqselRx = MXC_DMA_REQUEST_SPI0RX;
break;

case 1:
reqselTx = MXC_DMA_REQUEST_SPIMSSRX;
break;

default:
return E_BAD_PARAM;
}
switch (spi_num) {
case 0:
reqselTx = MXC_DMA_REQUEST_SPI0TX;
reqselRx = MXC_DMA_REQUEST_SPI0RX;
break;

case 1:
reqselTx = MXC_DMA_REQUEST_SPIMSSTX;
reqselRx = MXC_DMA_REQUEST_SPIMSSRX;
break;

default:
return E_BAD_PARAM;
}

return MXC_SPI_RevA1_MasterTransactionDMA((mxc_spi_reva_req_t *)req, reqselTx, reqselRx,
Expand All @@ -304,34 +289,19 @@ int MXC_SPI_SlaveTransactionDMA(mxc_spi_req_t *req)
spi_num = MXC_SPI_GET_IDX(req->spi);
MXC_ASSERT(spi_num >= 0);

if (req->txData != NULL) {
switch (spi_num) {
case 0:
reqselTx = MXC_DMA_REQUEST_SPI0TX;
break;
switch (spi_num) {
case 0:
reqselTx = MXC_DMA_REQUEST_SPI0TX;
reqselRx = MXC_DMA_REQUEST_SPI0RX;
break;

case 1:
reqselTx = MXC_DMA_REQUEST_SPIMSSTX;
break;
case 1:
reqselTx = MXC_DMA_REQUEST_SPIMSSTX;
reqselRx = MXC_DMA_REQUEST_SPIMSSRX;
break;

default:
return E_BAD_PARAM;
}
}

if (req->rxData != NULL) {
switch (spi_num) {
case 0:
reqselRx = MXC_DMA_REQUEST_SPI0RX;
break;

case 1:
reqselRx = MXC_DMA_REQUEST_SPIMSSRX;
break;

default:
return E_BAD_PARAM;
}
default:
return E_BAD_PARAM;
}

return MXC_SPI_RevA1_SlaveTransactionDMA((mxc_spi_reva_req_t *)req, reqselTx, reqselRx,
Expand Down
81 changes: 25 additions & 56 deletions Libraries/PeriphDrivers/Source/SPI/spi_me12.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,34 +359,19 @@ int MXC_SPI_MasterTransactionDMA(mxc_spi_req_t *req)
spi_num = MXC_SPI_GET_IDX(req->spi);
MXC_ASSERT(spi_num >= 0);

if (req->txData != NULL) {
switch (spi_num) {
case 0:
reqselTx = MXC_DMA_REQUEST_SPI0TX;
break;

case 1:
reqselTx = MXC_DMA_REQUEST_SPI1TX;
break;

default:
return E_BAD_PARAM;
}
}

if (req->rxData != NULL) {
switch (spi_num) {
case 0:
reqselRx = MXC_DMA_REQUEST_SPI0RX;
break;

case 1:
reqselRx = MXC_DMA_REQUEST_SPI1RX;
break;

default:
return E_BAD_PARAM;
}
switch (spi_num) {
case 0:
reqselTx = MXC_DMA_REQUEST_SPI0TX;
reqselRx = MXC_DMA_REQUEST_SPI0RX;
break;

case 1:
reqselTx = MXC_DMA_REQUEST_SPI1TX;
reqselRx = MXC_DMA_REQUEST_SPI1RX;
break;

default:
return E_BAD_PARAM;
}

return MXC_SPI_RevA1_MasterTransactionDMA((mxc_spi_reva_req_t *)req, reqselTx, reqselRx,
Expand All @@ -413,36 +398,20 @@ int MXC_SPI_SlaveTransactionDMA(mxc_spi_req_t *req)
spi_num = MXC_SPI_GET_IDX(req->spi);
MXC_ASSERT(spi_num >= 0);

if (req->txData != NULL) {
switch (spi_num) {
case 0:
reqselTx = MXC_DMA_REQUEST_SPI1TX;
break;

case 1:
reqselTx = MXC_DMA_REQUEST_SPI0TX;
break;

default:
return E_BAD_PARAM;
break;
}
}

if (req->rxData != NULL) {
switch (spi_num) {
case 0:
reqselRx = MXC_DMA_REQUEST_SPI1RX;
break;
switch (spi_num) {
case 0:
reqselTx = MXC_DMA_REQUEST_SPI0TX;
reqselRx = MXC_DMA_REQUEST_SPI0RX;
break;

case 1:
reqselRx = MXC_DMA_REQUEST_SPI0RX;
break;
case 1:
reqselTx = MXC_DMA_REQUEST_SPI1TX;
reqselRx = MXC_DMA_REQUEST_SPI1RX;
break;

default:
return E_BAD_PARAM;
break;
}
default:
return E_BAD_PARAM;
break;
}

return MXC_SPI_RevA1_SlaveTransactionDMA((mxc_spi_reva_req_t *)req, reqselTx, reqselRx,
Expand Down
Loading

0 comments on commit d35c479

Please sign in to comment.