at32f403a_407_sdio.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. /**
  2. **************************************************************************
  3. * @file at32f403a_407_sdio.c
  4. * @brief contains all the functions for the sdio firmware library
  5. **************************************************************************
  6. * Copyright notice & Disclaimer
  7. *
  8. * The software Board Support Package (BSP) that is made available to
  9. * download from Artery official website is the copyrighted work of Artery.
  10. * Artery authorizes customers to use, copy, and distribute the BSP
  11. * software and its related documentation for the purpose of design and
  12. * development in conjunction with Artery microcontrollers. Use of the
  13. * software is governed by this copyright notice and the following disclaimer.
  14. *
  15. * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES,
  16. * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS,
  17. * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR
  18. * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS,
  19. * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
  20. * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
  21. *
  22. **************************************************************************
  23. */
  24. #include "at32f403a_407_conf.h"
  25. /** @addtogroup AT32F403A_407_periph_driver
  26. * @{
  27. */
  28. /** @defgroup SDIO
  29. * @brief SDIO driver modules
  30. * @{
  31. */
  32. #ifdef SDIO_MODULE_ENABLED
  33. /** @defgroup SDIO_private_functions
  34. * @{
  35. */
  36. /**
  37. * @brief reset the sdio register
  38. * @param sdio_x: to select the sdio peripheral.
  39. * this parameter can be one of the following values:
  40. * SDIO1, SDIO2.
  41. * @retval none
  42. */
  43. void sdio_reset(sdio_type *sdio_x)
  44. {
  45. sdio_x->pwrctrl = 0x0;
  46. sdio_x->clkctrl = 0x0;
  47. sdio_x->argu = 0x0;
  48. sdio_x->cmdctrl = 0x0;
  49. sdio_x->dttmr = 0x0;
  50. sdio_x->dtlen = 0x0;
  51. sdio_x->dtctrl = 0x0;
  52. sdio_x->inten = 0x0;
  53. sdio_x->intclr = 0x004007FF;
  54. }
  55. /**
  56. * @brief set the power status of the controller
  57. * @param sdio_x: to select the sdio peripheral.
  58. * this parameter can be one of the following values:
  59. * SDIO1, SDIO2.
  60. * @param power_state
  61. * this parameter can be one of the following values:
  62. * - SDIO_POWER_OFF
  63. * - SDIO_POWER_ON
  64. * @retval none
  65. */
  66. void sdio_power_set(sdio_type *sdio_x, sdio_power_state_type power_state)
  67. {
  68. sdio_x->pwrctrl_bit.ps = power_state;
  69. }
  70. /**
  71. * @brief get power status.
  72. * @param sdio_x: to select the sdio peripheral.
  73. * this parameter can be one of the following values:
  74. * SDIO1, SDIO2.
  75. * @retval sdio_power_state_type (SDIO_POWER_ON or SDIO_POWER_OFF)
  76. */
  77. sdio_power_state_type sdio_power_status_get(sdio_type *sdio_x)
  78. {
  79. return (sdio_power_state_type)(sdio_x->pwrctrl_bit.ps);
  80. }
  81. /**
  82. * @brief config sdio clock
  83. * @param sdio_x: to select the sdio peripheral.
  84. * this parameter can be one of the following values:
  85. * SDIO1, SDIO2.
  86. * @param clk_div: sdio clock divide factor(frequency = sdio_clk / [clk_psc + 2]).
  87. * @param clk_edg
  88. * this parameter can be one of the following values:
  89. * - SDIO_CLOCK_EDGE_RISING
  90. * - SDIO_CLOCK_EDGE_FALLING
  91. * @retval none
  92. */
  93. void sdio_clock_config(sdio_type *sdio_x, uint16_t clk_div, sdio_edge_phase_type clk_edg)
  94. {
  95. /* config clock edge */
  96. sdio_x->clkctrl_bit.clkegs = clk_edg;
  97. /* config clock divide [7:0] */
  98. sdio_x->clkctrl_bit.clkdiv_l = (clk_div & 0xFF);
  99. /* config clock divide [9:8] */
  100. sdio_x->clkctrl_bit.clkdiv_h = ((clk_div & 0x300) >> 8);
  101. }
  102. /**
  103. * @brief config sdio bus width
  104. * @param sdio_x: to select the sdio peripheral.
  105. * this parameter can be one of the following values:
  106. * SDIO1, SDIO2.
  107. * @param width
  108. * this parameter can be one of the following values:
  109. * - SDIO_BUS_WIDTH_D1
  110. * - SDIO_BUS_WIDTH_D4
  111. * - SDIO_BUS_WIDTH_D8
  112. * @retval none
  113. */
  114. void sdio_bus_width_config(sdio_type *sdio_x, sdio_bus_width_type width)
  115. {
  116. sdio_x->clkctrl_bit.busws = width;
  117. }
  118. /**
  119. * @brief enable or disable clock divider bypss
  120. * @param sdio_x: to select the sdio peripheral.
  121. * this parameter can be one of the following values:
  122. * SDIO1, SDIO2.
  123. * @param new_state (TRUE or FALSE)
  124. * @retval none
  125. */
  126. void sdio_clock_bypass(sdio_type *sdio_x, confirm_state new_state)
  127. {
  128. sdio_x->clkctrl_bit.bypsen = new_state;
  129. }
  130. /**
  131. * @brief enable or disable power saving mode, config sdio_ck clock output
  132. * when the bus is idle.
  133. * @param sdio_x: to select the sdio peripheral.
  134. * this parameter can be one of the following values:
  135. * SDIO1, SDIO2.
  136. * @param new_state (TRUE or FALSE)
  137. * @retval none
  138. */
  139. void sdio_power_saving_mode_enable(sdio_type *sdio_x, confirm_state new_state)
  140. {
  141. sdio_x->clkctrl_bit.pwrsven = new_state;
  142. }
  143. /**
  144. * @brief enable or disable hardware flow control.
  145. * @param sdio_x: to select the sdio peripheral.
  146. * this parameter can be one of the following values:
  147. * SDIO1, SDIO2.
  148. * @param new_state (TRUE or FALSE)
  149. * @retval none
  150. */
  151. void sdio_flow_control_enable(sdio_type *sdio_x, confirm_state new_state)
  152. {
  153. sdio_x->clkctrl_bit.hfcen = new_state;
  154. }
  155. /**
  156. * @brief enable or disable sdio_ck output.
  157. * @param sdio_x: to select the sdio peripheral.
  158. * this parameter can be one of the following values:
  159. * SDIO1, SDIO2.
  160. * @param new_state (TRUE or FALSE)
  161. * @retval none
  162. */
  163. void sdio_clock_enable(sdio_type *sdio_x, confirm_state new_state)
  164. {
  165. sdio_x->clkctrl_bit.clkoen = new_state;
  166. }
  167. /**
  168. * @brief enable or disable dma.
  169. * @param sdio_x: to select the sdio peripheral.
  170. * this parameter can be one of the following values:
  171. * SDIO1, SDIO2.
  172. * @param new_state (TRUE or FALSE)
  173. * @retval none
  174. */
  175. void sdio_dma_enable(sdio_type *sdio_x, confirm_state new_state)
  176. {
  177. sdio_x->dtctrl_bit.dmaen = new_state;
  178. }
  179. /**
  180. * @brief config corresponding interrupt.
  181. * @param sdio_x: to select the sdio peripheral.
  182. * this parameter can be one of the following values:
  183. * SDIO1, SDIO2.
  184. * @param int_opt
  185. * this parameter can be one of the following values:
  186. * - SDIO_CMDFAIL_INT
  187. * - SDIO_DTFAIL_INT
  188. * - SDIO_CMDTIMEOUT_INT
  189. * - SDIO_DTTIMEOUT_INT
  190. * - SDIO_TXERRU_INT
  191. * - SDIO_RXERRO_INT
  192. * - SDIO_CMDRSPCMPL_INT
  193. * - SDIO_CMDCMPL_INT
  194. * - SDIO_DTCMP_INT
  195. * - SDIO_SBITERR_INT
  196. * - SDIO_DTBLKCMPL_INT
  197. * - SDIO_DOCMD_INT
  198. * - SDIO_DOTX_INT
  199. * - SDIO_DORX_INT
  200. * - SDIO_TXBUFH_INT
  201. * - SDIO_RXBUFH_INT
  202. * - SDIO_TXBUFF_INT
  203. * - SDIO_RXBUFF_INT
  204. * - SDIO_TXBUFE_INT
  205. * - SDIO_RXBUFE_INT
  206. * - SDIO_TXBUF_INT
  207. * - SDIO_RXBUF_INT
  208. * - SDIO_SDIOIF_INT
  209. * @param new_state (TRUE or FALSE)
  210. * @retval none
  211. */
  212. void sdio_interrupt_enable(sdio_type *sdio_x, uint32_t int_opt, confirm_state new_state)
  213. {
  214. /* enable interrupt */
  215. if(TRUE == new_state)
  216. {
  217. sdio_x->inten |= int_opt;
  218. }
  219. /* disable interrupt */
  220. else
  221. {
  222. sdio_x->inten &= ~(int_opt);
  223. }
  224. }
  225. /**
  226. * @brief get sdio interrupt flag.
  227. * @param sdio_x: to select the sdio peripheral.
  228. * this parameter can be one of the following values:
  229. * SDIO1, SDIO2.
  230. * @param flag
  231. * this parameter can be one of the following values:
  232. * - SDIO_CMDFAIL_FLAG
  233. * - SDIO_DTFAIL_FLAG
  234. * - SDIO_CMDTIMEOUT_FLAG
  235. * - SDIO_DTTIMEOUT_FLAG
  236. * - SDIO_TXERRU_FLAG
  237. * - SDIO_RXERRO_FLAG
  238. * - SDIO_CMDRSPCMPL_FLAG
  239. * - SDIO_CMDCMPL_FLAG
  240. * - SDIO_DTCMPL_FLAG
  241. * - SDIO_SBITERR_FLAG
  242. * - SDIO_DTBLKCMPL_FLAG
  243. * - SDIO_DOCMD_FLAG
  244. * - SDIO_DOTX_FLAG
  245. * - SDIO_DORX_FLAG
  246. * - SDIO_TXBUFH_FLAG
  247. * - SDIO_RXBUFH_FLAG
  248. * - SDIO_TXBUFF_FLAG
  249. * - SDIO_RXBUFF_FLAG
  250. * - SDIO_TXBUFE_FLAG
  251. * - SDIO_RXBUFE_FLAG
  252. * - SDIO_TXBUF_FLAG
  253. * - SDIO_RXBUF_FLAG
  254. * - SDIO_SDIOIF_FLAG
  255. * @retval flag_status (SET or RESET)
  256. */
  257. flag_status sdio_interrupt_flag_get(sdio_type *sdio_x, uint32_t flag)
  258. {
  259. flag_status status = RESET;
  260. if((sdio_x->inten & flag) && (sdio_x->sts & flag))
  261. {
  262. status = SET;
  263. }
  264. return status;
  265. }
  266. /**
  267. * @brief get sdio flag.
  268. * @param sdio_x: to select the sdio peripheral.
  269. * this parameter can be one of the following values:
  270. * SDIO1, SDIO2.
  271. * @param flag
  272. * this parameter can be one of the following values:
  273. * - SDIO_CMDFAIL_FLAG
  274. * - SDIO_DTFAIL_FLAG
  275. * - SDIO_CMDTIMEOUT_FLAG
  276. * - SDIO_DTTIMEOUT_FLAG
  277. * - SDIO_TXERRU_FLAG
  278. * - SDIO_RXERRO_FLAG
  279. * - SDIO_CMDRSPCMPL_FLAG
  280. * - SDIO_CMDCMPL_FLAG
  281. * - SDIO_DTCMPL_FLAG
  282. * - SDIO_SBITERR_FLAG
  283. * - SDIO_DTBLKCMPL_FLAG
  284. * - SDIO_DOCMD_FLAG
  285. * - SDIO_DOTX_FLAG
  286. * - SDIO_DORX_FLAG
  287. * - SDIO_TXBUFH_FLAG
  288. * - SDIO_RXBUFH_FLAG
  289. * - SDIO_TXBUFF_FLAG
  290. * - SDIO_RXBUFF_FLAG
  291. * - SDIO_TXBUFE_FLAG
  292. * - SDIO_RXBUFE_FLAG
  293. * - SDIO_TXBUF_FLAG
  294. * - SDIO_RXBUF_FLAG
  295. * - SDIO_SDIOIF_FLAG
  296. * @retval flag_status (SET or RESET)
  297. */
  298. flag_status sdio_flag_get(sdio_type *sdio_x, uint32_t flag)
  299. {
  300. flag_status status = RESET;
  301. if((sdio_x->sts & flag) == flag)
  302. {
  303. status = SET;
  304. }
  305. else
  306. {
  307. status = RESET;
  308. }
  309. return status;
  310. }
  311. /**
  312. * @brief clear sdio flag.
  313. * @param sdio_x: to select the sdio peripheral.
  314. * this parameter can be one of the following values:
  315. * SDIO1, SDIO2.
  316. * @param int_opt
  317. * this parameter can be any combination of the following values:
  318. * - SDIO_CMDFAIL_FLAG
  319. * - SDIO_DTFAIL_FLAG
  320. * - SDIO_CMDTIMEOUT_FLAG
  321. * - SDIO_DTTIMEOUT_FLAG
  322. * - SDIO_TXERRU_FLAG
  323. * - SDIO_RXERRO_FLAG
  324. * - SDIO_CMDRSPCMPL_FLAG
  325. * - SDIO_CMDCMPL_FLAG
  326. * - SDIO_DTCMPL_FLAG
  327. * - SDIO_SBITERR_FLAG
  328. * - SDIO_DTBLKCMPL_FLAG
  329. * - SDIO_SDIOIF_FLAG
  330. * @retval none
  331. */
  332. void sdio_flag_clear(sdio_type *sdio_x, uint32_t flag)
  333. {
  334. sdio_x->intclr = flag;
  335. }
  336. /**
  337. * @brief config sdio command.
  338. * @param sdio_x: to select the sdio peripheral.
  339. * this parameter can be one of the following values:
  340. * SDIO1, SDIO2.
  341. * @param command_struct : pointer to a sdio_command_struct_type structure
  342. * that contains the configuration information for the sdio command.
  343. * @retval none
  344. */
  345. void sdio_command_config(sdio_type *sdio_x, sdio_command_struct_type *command_struct)
  346. {
  347. /* disable command path state machine */
  348. sdio_x->cmdctrl_bit.ccsmen = FALSE;
  349. /* config command argument */
  350. sdio_x->argu = command_struct->argument;
  351. /* config command register */
  352. sdio_x->cmdctrl_bit.cmdidx = command_struct->cmd_index;
  353. sdio_x->cmdctrl_bit.rspwt = command_struct->rsp_type;
  354. sdio_x->cmdctrl_bit.intwt = (command_struct->wait_type & 0x1); /* [1:0] -> [0] */
  355. sdio_x->cmdctrl_bit.pndwt = (command_struct->wait_type & 0x2)>>1; /* [1:0] -> [1] */
  356. }
  357. /**
  358. * @brief enable or disable command path state machine(CPSM).
  359. * @param sdio_x: to select the sdio peripheral.
  360. * this parameter can be one of the following values:
  361. * SDIO1, SDIO2.
  362. * @param new_state (TRUE or FALSE)
  363. * @retval none
  364. */
  365. void sdio_command_state_machine_enable(sdio_type *sdio_x, confirm_state new_state)
  366. {
  367. sdio_x->cmdctrl_bit.ccsmen = new_state;
  368. }
  369. /**
  370. * @brief get command index of last command for which response received.
  371. * @param sdio_x: to select the sdio peripheral.
  372. * this parameter can be one of the following values:
  373. * SDIO1, SDIO2.
  374. * @param new_state (TRUE or FALSE)
  375. * @retval uint8_t: command index
  376. */
  377. uint8_t sdio_command_response_get(sdio_type *sdio_x)
  378. {
  379. return sdio_x->rspcmd_bit.rspcmd;
  380. }
  381. /**
  382. * @brief get response received from the card for the last command.
  383. * @param sdio_x: to select the sdio peripheral.
  384. * this parameter can be one of the following values:
  385. * SDIO1, SDIO2.
  386. * @param reg_index
  387. * this parameter can be one of the following values:
  388. * - SDIO_RSP1_INDEX
  389. * - SDIO_RSP2_INDEX
  390. * - SDIO_RSP3_INDEX
  391. * - SDIO_RSP4_INDEX
  392. * @retval uint32_t: response register value
  393. */
  394. uint32_t sdio_response_get(sdio_type *sdio_x, sdio_rsp_index_type reg_index)
  395. {
  396. uint32_t response_value = 0;
  397. switch(reg_index)
  398. {
  399. case SDIO_RSP1_INDEX:
  400. response_value = sdio_x->rsp1;
  401. break;
  402. case SDIO_RSP2_INDEX:
  403. response_value = sdio_x->rsp2;
  404. break;
  405. case SDIO_RSP3_INDEX:
  406. response_value = sdio_x->rsp3;
  407. break;
  408. case SDIO_RSP4_INDEX:
  409. response_value = sdio_x->rsp4;
  410. break;
  411. default: break;
  412. }
  413. return response_value;
  414. }
  415. /**
  416. * @brief config sdio data.
  417. * @param sdio_x: to select the sdio peripheral.
  418. * this parameter can be one of the following values:
  419. * SDIO1, SDIO2.
  420. * @param data_struct : pointer to a sdio_data_struct_type structure
  421. * that contains the configuration information for the sdio data.
  422. * @retval none
  423. */
  424. void sdio_data_config(sdio_type *sdio_x, sdio_data_struct_type *data_struct)
  425. {
  426. /* disable data path state machine */
  427. sdio_x->dtctrl_bit.tfren = FALSE;
  428. /* config data block, transfer mode and transfer direction */
  429. sdio_x->dtctrl_bit.blksize = data_struct->block_size;
  430. sdio_x->dtctrl_bit.tfrdir = data_struct->transfer_direction;
  431. sdio_x->dtctrl_bit.tfrmode = data_struct->transfer_mode;
  432. /* config data length */
  433. sdio_x->dtlen_bit.dtlen = data_struct->data_length;
  434. /* config data transfer timeout */
  435. sdio_x->dttmr_bit.timeout = data_struct->timeout;
  436. }
  437. /**
  438. * @brief enable or disable data path state machine(DPSM).
  439. * @param sdio_x: to select the sdio peripheral.
  440. * this parameter can be one of the following values:
  441. * SDIO1, SDIO2.
  442. * @param new_state (TRUE or FALSE)
  443. * @retval none
  444. */
  445. void sdio_data_state_machine_enable(sdio_type *sdio_x, confirm_state new_state)
  446. {
  447. sdio_x->dtctrl_bit.tfren = new_state;
  448. }
  449. /**
  450. * @brief get the number of remaining data bytes to be transferred.
  451. * @param sdio_x: to select the sdio peripheral.
  452. * this parameter can be one of the following values:
  453. * SDIO1, SDIO2.
  454. * @retval uint32_t: number of bytes
  455. */
  456. uint32_t sdio_data_counter_get(sdio_type *sdio_x)
  457. {
  458. return sdio_x->dtcnt;
  459. }
  460. /**
  461. * @brief read a word data from sdio fifo.
  462. * @param sdio_x: to select the sdio peripheral.
  463. * this parameter can be one of the following values:
  464. * SDIO1, SDIO2.
  465. * @retval uint32_t: data received
  466. */
  467. uint32_t sdio_data_read(sdio_type *sdio_x)
  468. {
  469. return sdio_x->buf;
  470. }
  471. /**
  472. * @brief get the number of words left to be written to or read from fifo..
  473. * @param sdio_x: to select the sdio peripheral.
  474. * this parameter can be one of the following values:
  475. * SDIO1, SDIO2.
  476. * @retval uint32_t: number of words
  477. */
  478. uint32_t sdio_buffer_counter_get(sdio_type *sdio_x)
  479. {
  480. return sdio_x->bufcnt;
  481. }
  482. /**
  483. * @brief write one word data to fifo.
  484. * @param sdio_x: to select the sdio peripheral.
  485. * this parameter can be one of the following values:
  486. * SDIO1, SDIO2.
  487. * @param data: data to be transferred.
  488. * @retval none
  489. */
  490. void sdio_data_write(sdio_type *sdio_x, uint32_t data)
  491. {
  492. sdio_x->buf = data;
  493. }
  494. /**
  495. * @brief set the read wait mode.
  496. * @param sdio_x: to select the sdio peripheral.
  497. * this parameter can be one of the following values:
  498. * SDIO1, SDIO2.
  499. * @param mode
  500. * this parameter can be one of the following values:
  501. * - SDIO_READ_WAIT_CONTROLLED_BY_D2
  502. * - SDIO_READ_WAIT_CONTROLLED_BY_CK
  503. * @retval none
  504. */
  505. void sdio_read_wait_mode_set(sdio_type *sdio_x, sdio_read_wait_mode_type mode)
  506. {
  507. sdio_x->dtctrl_bit.rdwtmode = mode;
  508. }
  509. /**
  510. * @brief enable or disable to start sd i/o read wait operation.
  511. * @param sdio_x: to select the sdio peripheral.
  512. * this parameter can be one of the following values:
  513. * SDIO1, SDIO2.
  514. * @param new_state (TRUE or FALSE)
  515. * @retval none
  516. */
  517. void sdio_read_wait_start(sdio_type *sdio_x, confirm_state new_state)
  518. {
  519. sdio_x->dtctrl_bit.rdwtstart = new_state;
  520. }
  521. /**
  522. * @brief enable or disable to stop sd i/o read wait operation.
  523. * @param sdio_x: to select the sdio peripheral.
  524. * this parameter can be one of the following values:
  525. * SDIO1, SDIO2.
  526. * @param new_state (TRUE or FALSE)
  527. * @retval none
  528. */
  529. void sdio_read_wait_stop(sdio_type *sdio_x, confirm_state new_state)
  530. {
  531. sdio_x->dtctrl_bit.rdwtstop = new_state;
  532. }
  533. /**
  534. * @brief enable or disable the sd i/o function.
  535. * @param sdio_x: to select the sdio peripheral.
  536. * this parameter can be one of the following values:
  537. * SDIO1, SDIO2.
  538. * @param new_state (TRUE or FALSE)
  539. * @retval none
  540. */
  541. void sdio_io_function_enable(sdio_type *sdio_x, confirm_state new_state)
  542. {
  543. sdio_x->dtctrl_bit.ioen = new_state;
  544. }
  545. /**
  546. * @brief enable or disable sd i/o suspend command sending.
  547. * @param sdio_x: to select the sdio peripheral.
  548. * this parameter can be one of the following values:
  549. * SDIO1, SDIO2.
  550. * @param new_state (TRUE or FALSE)
  551. * @retval none
  552. */
  553. void sdio_io_suspend_command_set(sdio_type *sdio_x, confirm_state new_state)
  554. {
  555. sdio_x->cmdctrl_bit.iosusp = new_state;
  556. }
  557. /**
  558. * @}
  559. */
  560. #endif
  561. /**
  562. * @}
  563. */
  564. /**
  565. * @}
  566. */