1 /* 2 * Copyright (c) 2022 Winner Microelectronics Co., Ltd. All rights reserved. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef __WM_TIPC_H_ 17 #define __WM_TIPC_H_ 18 19 #include <core_804.h> 20 #include "wm_regs.h" 21 22 #define HR_TIPC_BASE (HR_APB_BASE_ADDR + 0x2400) 23 24 typedef union { 25 struct { 26 uint32_t I2C : 1; /*!< bit : 0 */ 27 uint32_t SAR_ADC : 1; /*!< bit : 1 */ 28 uint32_t SPI_LS : 1; /*!< bit : 2 */ 29 uint32_t UART0 : 1; /*!< bit : 3 */ 30 uint32_t UART1 : 1; /*!< bit : 4 */ 31 uint32_t UART2 : 1; /*!< bit : 5 */ 32 uint32_t UART3 : 1; /*!< bit : 6 */ 33 uint32_t UART4 : 1; /*!< bit : 7 */ 34 uint32_t UART5 : 1; /*!< bit : 8 */ 35 uint32_t PORTA : 1; /*!< bit : 9 */ 36 uint32_t PORTB : 1; /*!< bit : 10 */ 37 uint32_t WD : 1; /*!< bit : 11 */ 38 uint32_t TIMER : 1; /*!< bit : 12 */ 39 uint32_t RFC : 1; /*!< bit : 13 */ 40 uint32_t LCD : 1; /*!< bit : 14 */ 41 uint32_t PWM : 1; /*!< bit : 15 */ 42 uint32_t I2S : 1; /*!< bit : 16 */ 43 uint32_t BT_MODEM : 1; /*!< bit : 17 */ 44 uint32_t _reserved0 : 14; 45 }b; 46 uint32_t w; 47 } TIPC_VLD0_Type; 48 49 typedef union { 50 struct { 51 uint32_t SDIO_HOST : 1; /*!< bit : 0 */ 52 uint32_t FLASH : 1; /*!< bit : 1 */ 53 uint32_t PSRAM : 1; /*!< bit : 2 */ 54 uint32_t RSA : 1; /*!< bit : 3 */ 55 uint32_t DMA : 1; /*!< bit : 4 */ 56 uint32_t GPSEC : 1; /*!< bit : 5 */ 57 uint32_t BT : 1; /*!< bit : 6 */ 58 uint32_t PMU : 1; /*!< bit : 7 */ 59 uint32_t CLK_RST : 1; /*!< bit : 8 */ 60 uint32_t MMU : 1; /*!< bit : 9 */ 61 uint32_t BBP : 1; /*!< bit : 10 */ 62 uint32_t MAC : 1; /*!< bit : 11 */ 63 uint32_t SEC : 1; /*!< bit : 12 */ 64 uint32_t _reserved0 : 1; /*!< bit : 13 */ 65 uint32_t SDIO_SLAVE : 1; /*!< bit : 14 */ 66 uint32_t SPI_HS : 1; /*!< bit : 15 */ 67 uint32_t SDIO_WRAPPER : 1; /*!< bit : 16 */ 68 uint32_t RF_BIST : 1; /*!< bit : 17 */ 69 uint32_t _reserved1 : 14; 70 }b; 71 uint32_t w; 72 } TIPC_VLD1_Type; 73 74 typedef struct { 75 __IOM uint32_t VLD0; 76 __IOM uint32_t VLD1; 77 } TIPC_Type; 78 79 #define TIPC ((TIPC_Type *) HR_TIPC_BASE) 80 81 /** 82 * @defgroup Driver_APIs Driver APIs 83 * @brief Driver APIs 84 */ 85 86 /** 87 * @addtogroup Driver_APIs 88 * @{ 89 */ 90 91 /** 92 * @defgroup TIPC_Driver_APIs TIPC Driver APIs 93 * @brief TIPC driver APIs 94 */ 95 96 /** 97 * @addtogroup TIPC_Driver_APIs 98 * @{ 99 */ 100 101 /** 102 * @brief This function is used enable i2c. 103 * 104 * @param[in] None 105 * 106 * @return None 107 * 108 * @note None 109 */ wm_tipc_enable_i2c(void)110__STATIC_INLINE void wm_tipc_enable_i2c(void) 111 { 112 TIPC_VLD0_Type vld0; 113 vld0.w = TIPC->VLD0; 114 vld0.b.I2C = 1; 115 TIPC->VLD0 = vld0.w; 116 } 117 118 /** 119 * @brief This function is used disable i2c. 120 * 121 * @param[in] None 122 * 123 * @return None 124 * 125 * @note None 126 */ wm_tipc_disable_i2c(void)127__STATIC_INLINE void wm_tipc_disable_i2c(void) 128 { 129 TIPC_VLD0_Type vld0; 130 vld0.w = TIPC->VLD0; 131 vld0.b.I2C = 0; 132 TIPC->VLD0 = vld0.w; 133 } 134 135 /** 136 * @brief This function is used enable uart0. 137 * 138 * @param[in] None 139 * 140 * @return None 141 * 142 * @note None 143 */ wm_tipc_enable_uart0(void)144__STATIC_INLINE void wm_tipc_enable_uart0(void) 145 { 146 TIPC_VLD0_Type vld0; 147 vld0.w = TIPC->VLD0; 148 vld0.b.UART0 = 1; 149 TIPC->VLD0 = vld0.w; 150 } 151 152 /** 153 * @brief This function is used disable uart0. 154 * 155 * @param[in] None 156 * 157 * @return None 158 * 159 * @note None 160 */ wm_tipc_disable_uart0(void)161__STATIC_INLINE void wm_tipc_disable_uart0(void) 162 { 163 TIPC_VLD0_Type vld0; 164 vld0.w = TIPC->VLD0; 165 vld0.b.UART0 = 0; 166 TIPC->VLD0 = vld0.w; 167 } 168 169 /** 170 * @brief This function is used enable sar adc. 171 * 172 * @param[in] None 173 * 174 * @return None 175 * 176 * @note None 177 */ wm_tipc_enable_sar_adc(void)178__STATIC_INLINE void wm_tipc_enable_sar_adc(void) 179 { 180 TIPC_VLD0_Type vld0; 181 vld0.w = TIPC->VLD0; 182 vld0.b.SAR_ADC = 1; 183 TIPC->VLD0 = vld0.w; 184 } 185 186 /** 187 * @brief This function is used disable sar adc. 188 * 189 * @param[in] None 190 * 191 * @return None 192 * 193 * @note None 194 */ wm_tipc_disable_sar_adc(void)195__STATIC_INLINE void wm_tipc_disable_sar_adc(void) 196 { 197 TIPC_VLD0_Type vld0; 198 vld0.w = TIPC->VLD0; 199 vld0.b.SAR_ADC = 0; 200 TIPC->VLD0 = vld0.w; 201 } 202 203 /** 204 * @brief This function is used enable low speed spi. 205 * 206 * @param[in] None 207 * 208 * @return None 209 * 210 * @note None 211 */ wm_tipc_enable_lspi(void)212__STATIC_INLINE void wm_tipc_enable_lspi(void) 213 { 214 TIPC_VLD0_Type vld0; 215 vld0.w = TIPC->VLD0; 216 vld0.b.SPI_LS = 1; 217 TIPC->VLD0 = vld0.w; 218 } 219 220 /** 221 * @brief This function is used disable low speed spi. 222 * 223 * @param[in] None 224 * 225 * @return None 226 * 227 * @note None 228 */ wm_tipc_disable_lspi(void)229__STATIC_INLINE void wm_tipc_disable_lspi(void) 230 { 231 TIPC_VLD0_Type vld0; 232 vld0.w = TIPC->VLD0; 233 vld0.b.SPI_LS = 0; 234 TIPC->VLD0 = vld0.w; 235 } 236 237 /** 238 * @brief This function is used enable uart1. 239 * 240 * @param[in] None 241 * 242 * @return None 243 * 244 * @note None 245 */ wm_tipc_enable_uart1(void)246__STATIC_INLINE void wm_tipc_enable_uart1(void) 247 { 248 TIPC_VLD0_Type vld0; 249 vld0.w = TIPC->VLD0; 250 vld0.b.UART1 = 1; 251 TIPC->VLD0 = vld0.w; 252 } 253 254 /** 255 * @brief This function is used disable uart1. 256 * 257 * @param[in] None 258 * 259 * @return None 260 * 261 * @note None 262 */ wm_tipc_disable_uart1(void)263__STATIC_INLINE void wm_tipc_disable_uart1(void) 264 { 265 TIPC_VLD0_Type vld0; 266 vld0.w = TIPC->VLD0; 267 vld0.b.UART1 = 0; 268 TIPC->VLD0 = vld0.w; 269 } 270 271 /** 272 * @brief This function is used enable uart2. 273 * 274 * @param[in] None 275 * 276 * @return None 277 * 278 * @note None 279 */ wm_tipc_enable_uart2(void)280__STATIC_INLINE void wm_tipc_enable_uart2(void) 281 { 282 TIPC_VLD0_Type vld0; 283 vld0.w = TIPC->VLD0; 284 vld0.b.UART2 = 1; 285 TIPC->VLD0 = vld0.w; 286 } 287 288 /** 289 * @brief This function is used disable uart2. 290 * 291 * @param[in] None 292 * 293 * @return None 294 * 295 * @note None 296 */ wm_tipc_disable_uart2(void)297__STATIC_INLINE void wm_tipc_disable_uart2(void) 298 { 299 TIPC_VLD0_Type vld0; 300 vld0.w = TIPC->VLD0; 301 vld0.b.UART2 = 0; 302 TIPC->VLD0 = vld0.w; 303 } 304 305 /** 306 * @brief This function is used enable uart3. 307 * 308 * @param[in] None 309 * 310 * @return None 311 * 312 * @note None 313 */ wm_tipc_enable_uart3(void)314__STATIC_INLINE void wm_tipc_enable_uart3(void) 315 { 316 TIPC_VLD0_Type vld0; 317 vld0.w = TIPC->VLD0; 318 vld0.b.UART3 = 1; 319 TIPC->VLD0 = vld0.w; 320 } 321 322 /** 323 * @brief This function is used disable uart3. 324 * 325 * @param[in] None 326 * 327 * @return None 328 * 329 * @note None 330 */ wm_tipc_disable_uart3(void)331__STATIC_INLINE void wm_tipc_disable_uart3(void) 332 { 333 TIPC_VLD0_Type vld0; 334 vld0.w = TIPC->VLD0; 335 vld0.b.UART3 = 0; 336 TIPC->VLD0 = vld0.w; 337 } 338 339 /** 340 * @brief This function is used enable uart4. 341 * 342 * @param[in] None 343 * 344 * @return None 345 * 346 * @note None 347 */ wm_tipc_enable_uart4(void)348__STATIC_INLINE void wm_tipc_enable_uart4(void) 349 { 350 TIPC_VLD0_Type vld0; 351 vld0.w = TIPC->VLD0; 352 vld0.b.UART4 = 1; 353 TIPC->VLD0 = vld0.w; 354 } 355 356 /** 357 * @brief This function is used disable uart4. 358 * 359 * @param[in] None 360 * 361 * @return None 362 * 363 * @note None 364 */ wm_tipc_disable_uart4(void)365__STATIC_INLINE void wm_tipc_disable_uart4(void) 366 { 367 TIPC_VLD0_Type vld0; 368 vld0.w = TIPC->VLD0; 369 vld0.b.UART4 = 0; 370 TIPC->VLD0 = vld0.w; 371 } 372 373 /** 374 * @brief This function is used enable uart5. 375 * 376 * @param[in] None 377 * 378 * @return None 379 * 380 * @note None 381 */ wm_tipc_enable_uart5(void)382__STATIC_INLINE void wm_tipc_enable_uart5(void) 383 { 384 TIPC_VLD0_Type vld0; 385 vld0.w = TIPC->VLD0; 386 vld0.b.UART5 = 1; 387 TIPC->VLD0 = vld0.w; 388 } 389 390 /** 391 * @brief This function is used disable uart5. 392 * 393 * @param[in] None 394 * 395 * @return None 396 * 397 * @note None 398 */ wm_tipc_disable_uart5(void)399__STATIC_INLINE void wm_tipc_disable_uart5(void) 400 { 401 TIPC_VLD0_Type vld0; 402 vld0.w = TIPC->VLD0; 403 vld0.b.UART5 = 0; 404 TIPC->VLD0 = vld0.w; 405 } 406 407 /** 408 * @brief This function is used enable porta. 409 * 410 * @param[in] None 411 * 412 * @return None 413 * 414 * @note None 415 */ wm_tipc_enable_porta(void)416__STATIC_INLINE void wm_tipc_enable_porta(void) 417 { 418 TIPC_VLD0_Type vld0; 419 vld0.w = TIPC->VLD0; 420 vld0.b.PORTA = 1; 421 TIPC->VLD0 = vld0.w; 422 } 423 424 /** 425 * @brief This function is used disable porta. 426 * 427 * @param[in] None 428 * 429 * @return None 430 * 431 * @note None 432 */ wm_tipc_disable_porta(void)433__STATIC_INLINE void wm_tipc_disable_porta(void) 434 { 435 TIPC_VLD0_Type vld0; 436 vld0.w = TIPC->VLD0; 437 vld0.b.PORTA = 0; 438 TIPC->VLD0 = vld0.w; 439 } 440 441 /** 442 * @brief This function is used enable portb. 443 * 444 * @param[in] None 445 * 446 * @return None 447 * 448 * @note None 449 */ wm_tipc_enable_portb(void)450__STATIC_INLINE void wm_tipc_enable_portb(void) 451 { 452 TIPC_VLD0_Type vld0; 453 vld0.w = TIPC->VLD0; 454 vld0.b.PORTB = 1; 455 TIPC->VLD0 = vld0.w; 456 } 457 458 /** 459 * @brief This function is used disable portb. 460 * 461 * @param[in] None 462 * 463 * @return None 464 * 465 * @note None 466 */ wm_tipc_disable_portb(void)467__STATIC_INLINE void wm_tipc_disable_portb(void) 468 { 469 TIPC_VLD0_Type vld0; 470 vld0.w = TIPC->VLD0; 471 vld0.b.PORTB = 0; 472 TIPC->VLD0 = vld0.w; 473 } 474 475 /** 476 * @brief This function is used enable watch dog. 477 * 478 * @param[in] None 479 * 480 * @return None 481 * 482 * @note None 483 */ wm_tipc_enable_watch_dog(void)484__STATIC_INLINE void wm_tipc_enable_watch_dog(void) 485 { 486 TIPC_VLD0_Type vld0; 487 vld0.w = TIPC->VLD0; 488 vld0.b.WD = 1; 489 TIPC->VLD0 = vld0.w; 490 } 491 492 /** 493 * @brief This function is used disable watch dog. 494 * 495 * @param[in] None 496 * 497 * @return None 498 * 499 * @note None 500 */ wm_tipc_disable_watch_dog(void)501__STATIC_INLINE void wm_tipc_disable_watch_dog(void) 502 { 503 TIPC_VLD0_Type vld0; 504 vld0.w = TIPC->VLD0; 505 vld0.b.WD = 0; 506 TIPC->VLD0 = vld0.w; 507 } 508 509 /** 510 * @brief This function is used enable timer. 511 * 512 * @param[in] None 513 * 514 * @return None 515 * 516 * @note None 517 */ wm_tipc_enable_timer(void)518__STATIC_INLINE void wm_tipc_enable_timer(void) 519 { 520 TIPC_VLD0_Type vld0; 521 vld0.w = TIPC->VLD0; 522 vld0.b.TIMER = 1; 523 TIPC->VLD0 = vld0.w; 524 } 525 526 /** 527 * @brief This function is used disable timer. 528 * 529 * @param[in] None 530 * 531 * @return None 532 * 533 * @note None 534 */ wm_tipc_disable_timer(void)535__STATIC_INLINE void wm_tipc_disable_timer(void) 536 { 537 TIPC_VLD0_Type vld0; 538 vld0.w = TIPC->VLD0; 539 vld0.b.TIMER = 0; 540 TIPC->VLD0 = vld0.w; 541 } 542 543 /** 544 * @brief This function is used enable rf controler. 545 * 546 * @param[in] None 547 * 548 * @return None 549 * 550 * @note None 551 */ wm_tipc_enable_rf_controler(void)552__STATIC_INLINE void wm_tipc_enable_rf_controler(void) 553 { 554 TIPC_VLD0_Type vld0; 555 vld0.w = TIPC->VLD0; 556 vld0.b.RFC = 1; 557 TIPC->VLD0 = vld0.w; 558 } 559 560 /** 561 * @brief This function is used disable rf controler. 562 * 563 * @param[in] None 564 * 565 * @return None 566 * 567 * @note None 568 */ wm_tipc_disable_rf_controler(void)569__STATIC_INLINE void wm_tipc_disable_rf_controler(void) 570 { 571 TIPC_VLD0_Type vld0; 572 vld0.w = TIPC->VLD0; 573 vld0.b.RFC = 0; 574 TIPC->VLD0 = vld0.w; 575 } 576 577 /** 578 * @brief This function is used enable lcd. 579 * 580 * @param[in] None 581 * 582 * @return None 583 * 584 * @note None 585 */ wm_tipc_enable_lcd(void)586__STATIC_INLINE void wm_tipc_enable_lcd(void) 587 { 588 TIPC_VLD0_Type vld0; 589 vld0.w = TIPC->VLD0; 590 vld0.b.LCD = 1; 591 TIPC->VLD0 = vld0.w; 592 } 593 594 /** 595 * @brief This function is used disable lcd. 596 * 597 * @param[in] None 598 * 599 * @return None 600 * 601 * @note None 602 */ wm_tipc_disable_lcd(void)603__STATIC_INLINE void wm_tipc_disable_lcd(void) 604 { 605 TIPC_VLD0_Type vld0; 606 vld0.w = TIPC->VLD0; 607 vld0.b.LCD = 0; 608 TIPC->VLD0 = vld0.w; 609 } 610 611 /** 612 * @brief This function is used enable pwm. 613 * 614 * @param[in] None 615 * 616 * @return None 617 * 618 * @note None 619 */ wm_tipc_enable_pwm(void)620__STATIC_INLINE void wm_tipc_enable_pwm(void) 621 { 622 TIPC_VLD0_Type vld0; 623 vld0.w = TIPC->VLD0; 624 vld0.b.PWM = 1; 625 TIPC->VLD0 = vld0.w; 626 } 627 628 /** 629 * @brief This function is used disable pwm. 630 * 631 * @param[in] None 632 * 633 * @return None 634 * 635 * @note None 636 */ wm_tipc_disable_pwm(void)637__STATIC_INLINE void wm_tipc_disable_pwm(void) 638 { 639 TIPC_VLD0_Type vld0; 640 vld0.w = TIPC->VLD0; 641 vld0.b.PWM = 0; 642 TIPC->VLD0 = vld0.w; 643 } 644 645 /** 646 * @brief This function is used enable i2s. 647 * 648 * @param[in] None 649 * 650 * @return None 651 * 652 * @note None 653 */ wm_tipc_enable_i2s(void)654__STATIC_INLINE void wm_tipc_enable_i2s(void) 655 { 656 TIPC_VLD0_Type vld0; 657 vld0.w = TIPC->VLD0; 658 vld0.b.I2S = 1; 659 TIPC->VLD0 = vld0.w; 660 } 661 662 /** 663 * @brief This function is used disable i2s. 664 * 665 * @param[in] None 666 * 667 * @return None 668 * 669 * @note None 670 */ wm_tipc_disable_i2s(void)671__STATIC_INLINE void wm_tipc_disable_i2s(void) 672 { 673 TIPC_VLD0_Type vld0; 674 vld0.w = TIPC->VLD0; 675 vld0.b.I2S = 0; 676 TIPC->VLD0 = vld0.w; 677 } 678 679 /** 680 * @brief This function is used enable bt modem. 681 * 682 * @param[in] None 683 * 684 * @return None 685 * 686 * @note None 687 */ wm_tipc_enable_bt_modem(void)688__STATIC_INLINE void wm_tipc_enable_bt_modem(void) 689 { 690 TIPC_VLD0_Type vld0; 691 vld0.w = TIPC->VLD0; 692 vld0.b.BT_MODEM = 1; 693 TIPC->VLD0 = vld0.w; 694 } 695 696 /** 697 * @brief This function is used disable bt modem. 698 * 699 * @param[in] None 700 * 701 * @return None 702 * 703 * @note None 704 */ wm_tipc_disable_bt_modem(void)705__STATIC_INLINE void wm_tipc_disable_bt_modem(void) 706 { 707 TIPC_VLD0_Type vld0; 708 vld0.w = TIPC->VLD0; 709 vld0.b.BT_MODEM = 0; 710 TIPC->VLD0 = vld0.w; 711 } 712 713 /** 714 * @brief This function is used enable sdio host. 715 * 716 * @param[in] None 717 * 718 * @return None 719 * 720 * @note None 721 */ wm_tipc_enable_sdio_host(void)722__STATIC_INLINE void wm_tipc_enable_sdio_host(void) 723 { 724 TIPC_VLD1_Type vld1; 725 vld1.w = TIPC->VLD1; 726 vld1.b.SDIO_HOST = 1; 727 TIPC->VLD1 = vld1.w; 728 } 729 730 /** 731 * @brief This function is used disable sdio host. 732 * 733 * @param[in] None 734 * 735 * @return None 736 * 737 * @note None 738 */ wm_tipc_disable_sdio_host(void)739__STATIC_INLINE void wm_tipc_disable_sdio_host(void) 740 { 741 TIPC_VLD1_Type vld1; 742 vld1.w = TIPC->VLD1; 743 vld1.b.SDIO_HOST = 0; 744 TIPC->VLD1 = vld1.w; 745 } 746 747 /** 748 * @brief This function is used enable flash. 749 * 750 * @param[in] None 751 * 752 * @return None 753 * 754 * @note None 755 */ wm_tipc_enable_flash(void)756__STATIC_INLINE void wm_tipc_enable_flash(void) 757 { 758 TIPC_VLD1_Type vld1; 759 vld1.w = TIPC->VLD1; 760 vld1.b.FLASH = 1; 761 TIPC->VLD1 = vld1.w; 762 } 763 764 /** 765 * @brief This function is used disable flash. 766 * 767 * @param[in] None 768 * 769 * @return None 770 * 771 * @note None 772 */ wm_tipc_disable_flash(void)773__STATIC_INLINE void wm_tipc_disable_flash(void) 774 { 775 TIPC_VLD1_Type vld1; 776 vld1.w = TIPC->VLD1; 777 vld1.b.FLASH = 0; 778 TIPC->VLD1 = vld1.w; 779 } 780 781 /** 782 * @brief This function is used enable psram. 783 * 784 * @param[in] None 785 * 786 * @return None 787 * 788 * @note None 789 */ wm_tipc_enable_psram(void)790__STATIC_INLINE void wm_tipc_enable_psram(void) 791 { 792 TIPC_VLD1_Type vld1; 793 vld1.w = TIPC->VLD1; 794 vld1.b.PSRAM = 1; 795 TIPC->VLD1 = vld1.w; 796 } 797 798 /** 799 * @brief This function is used disable psram. 800 * 801 * @param[in] None 802 * 803 * @return None 804 * 805 * @note None 806 */ wm_tipc_disable_psram(void)807__STATIC_INLINE void wm_tipc_disable_psram(void) 808 { 809 TIPC_VLD1_Type vld1; 810 vld1.w = TIPC->VLD1; 811 vld1.b.PSRAM = 0; 812 TIPC->VLD1 = vld1.w; 813 } 814 815 /** 816 * @brief This function is used enable rsa. 817 * 818 * @param[in] None 819 * 820 * @return None 821 * 822 * @note None 823 */ wm_tipc_enable_rsa(void)824__STATIC_INLINE void wm_tipc_enable_rsa(void) 825 { 826 TIPC_VLD1_Type vld1; 827 vld1.w = TIPC->VLD1; 828 vld1.b.RSA = 1; 829 TIPC->VLD1 = vld1.w; 830 } 831 832 /** 833 * @brief This function is used disable rsa. 834 * 835 * @param[in] None 836 * 837 * @return None 838 * 839 * @note None 840 */ wm_tipc_disable_rsa(void)841__STATIC_INLINE void wm_tipc_disable_rsa(void) 842 { 843 TIPC_VLD1_Type vld1; 844 vld1.w = TIPC->VLD1; 845 vld1.b.RSA = 0; 846 TIPC->VLD1 = vld1.w; 847 } 848 849 /** 850 * @brief This function is used enable dma. 851 * 852 * @param[in] None 853 * 854 * @return None 855 * 856 * @note None 857 */ wm_tipc_enable_dma(void)858__STATIC_INLINE void wm_tipc_enable_dma(void) 859 { 860 TIPC_VLD1_Type vld1; 861 vld1.w = TIPC->VLD1; 862 vld1.b.DMA = 1; 863 TIPC->VLD1 = vld1.w; 864 } 865 866 /** 867 * @brief This function is used disable dma. 868 * 869 * @param[in] None 870 * 871 * @return None 872 * 873 * @note None 874 */ wm_tipc_disable_dma(void)875__STATIC_INLINE void wm_tipc_disable_dma(void) 876 { 877 TIPC_VLD1_Type vld1; 878 vld1.w = TIPC->VLD1; 879 vld1.b.DMA = 0; 880 TIPC->VLD1 = vld1.w; 881 } 882 883 /** 884 * @brief This function is used enable gpsec. 885 * 886 * @param[in] None 887 * 888 * @return None 889 * 890 * @note None 891 */ wm_tipc_enable_gpsec(void)892__STATIC_INLINE void wm_tipc_enable_gpsec(void) 893 { 894 TIPC_VLD1_Type vld1; 895 vld1.w = TIPC->VLD1; 896 vld1.b.GPSEC = 1; 897 TIPC->VLD1 = vld1.w; 898 } 899 900 /** 901 * @brief This function is used disable gpsec. 902 * 903 * @param[in] None 904 * 905 * @return None 906 * 907 * @note None 908 */ wm_tipc_disable_gpsec(void)909__STATIC_INLINE void wm_tipc_disable_gpsec(void) 910 { 911 TIPC_VLD1_Type vld1; 912 vld1.w = TIPC->VLD1; 913 vld1.b.GPSEC = 0; 914 TIPC->VLD1 = vld1.w; 915 } 916 917 /** 918 * @brief This function is used enable bt. 919 * 920 * @param[in] None 921 * 922 * @return None 923 * 924 * @note None 925 */ wm_tipc_enable_bt(void)926__STATIC_INLINE void wm_tipc_enable_bt(void) 927 { 928 TIPC_VLD1_Type vld1; 929 vld1.w = TIPC->VLD1; 930 vld1.b.BT = 1; 931 TIPC->VLD1 = vld1.w; 932 } 933 934 /** 935 * @brief This function is used disable bt. 936 * 937 * @param[in] None 938 * 939 * @return None 940 * 941 * @note None 942 */ wm_tipc_disable_bt(void)943__STATIC_INLINE void wm_tipc_disable_bt(void) 944 { 945 TIPC_VLD1_Type vld1; 946 vld1.w = TIPC->VLD1; 947 vld1.b.BT = 0; 948 TIPC->VLD1 = vld1.w; 949 } 950 951 /** 952 * @brief This function is used enable pmu. 953 * 954 * @param[in] None 955 * 956 * @return None 957 * 958 * @note None 959 */ wm_tipc_enable_pmu(void)960__STATIC_INLINE void wm_tipc_enable_pmu(void) 961 { 962 TIPC_VLD1_Type vld1; 963 vld1.w = TIPC->VLD1; 964 vld1.b.PMU = 1; 965 TIPC->VLD1 = vld1.w; 966 } 967 968 /** 969 * @brief This function is used disable pmu. 970 * 971 * @param[in] None 972 * 973 * @return None 974 * 975 * @note None 976 */ wm_tipc_disable_pmu(void)977__STATIC_INLINE void wm_tipc_disable_pmu(void) 978 { 979 TIPC_VLD1_Type vld1; 980 vld1.w = TIPC->VLD1; 981 vld1.b.PMU = 0; 982 TIPC->VLD1 = vld1.w; 983 } 984 985 /** 986 * @brief This function is used enable clock reset. 987 * 988 * @param[in] None 989 * 990 * @return None 991 * 992 * @note None 993 */ wm_tipc_enable_clk_rst(void)994__STATIC_INLINE void wm_tipc_enable_clk_rst(void) 995 { 996 TIPC_VLD1_Type vld1; 997 vld1.w = TIPC->VLD1; 998 vld1.b.CLK_RST = 1; 999 TIPC->VLD1 = vld1.w; 1000 } 1001 1002 /** 1003 * @brief This function is used disable clock reset. 1004 * 1005 * @param[in] None 1006 * 1007 * @return None 1008 * 1009 * @note None 1010 */ wm_tipc_disable_clk_rst(void)1011__STATIC_INLINE void wm_tipc_disable_clk_rst(void) 1012 { 1013 TIPC_VLD1_Type vld1; 1014 vld1.w = TIPC->VLD1; 1015 vld1.b.CLK_RST = 0; 1016 TIPC->VLD1 = vld1.w; 1017 } 1018 1019 /** 1020 * @brief This function is used enable mmu. 1021 * 1022 * @param[in] None 1023 * 1024 * @return None 1025 * 1026 * @note None 1027 */ wm_tipc_enable_mmu(void)1028__STATIC_INLINE void wm_tipc_enable_mmu(void) 1029 { 1030 TIPC_VLD1_Type vld1; 1031 vld1.w = TIPC->VLD1; 1032 vld1.b.MMU = 1; 1033 TIPC->VLD1 = vld1.w; 1034 } 1035 1036 /** 1037 * @brief This function is used disable mmu. 1038 * 1039 * @param[in] None 1040 * 1041 * @return None 1042 * 1043 * @note None 1044 */ wm_tipc_disable_mmu(void)1045__STATIC_INLINE void wm_tipc_disable_mmu(void) 1046 { 1047 TIPC_VLD1_Type vld1; 1048 vld1.w = TIPC->VLD1; 1049 vld1.b.MMU = 0; 1050 TIPC->VLD1 = vld1.w; 1051 } 1052 1053 /** 1054 * @brief This function is used enable bbp. 1055 * 1056 * @param[in] None 1057 * 1058 * @return None 1059 * 1060 * @note None 1061 */ wm_tipc_enable_bbp(void)1062__STATIC_INLINE void wm_tipc_enable_bbp(void) 1063 { 1064 TIPC_VLD1_Type vld1; 1065 vld1.w = TIPC->VLD1; 1066 vld1.b.BBP = 1; 1067 TIPC->VLD1 = vld1.w; 1068 } 1069 1070 /** 1071 * @brief This function is used disable bbp. 1072 * 1073 * @param[in] None 1074 * 1075 * @return None 1076 * 1077 * @note None 1078 */ wm_tipc_disable_bbp(void)1079__STATIC_INLINE void wm_tipc_disable_bbp(void) 1080 { 1081 TIPC_VLD1_Type vld1; 1082 vld1.w = TIPC->VLD1; 1083 vld1.b.BBP = 0; 1084 TIPC->VLD1 = vld1.w; 1085 } 1086 1087 /** 1088 * @brief This function is used enable mac. 1089 * 1090 * @param[in] None 1091 * 1092 * @return None 1093 * 1094 * @note None 1095 */ wm_tipc_enable_mac(void)1096__STATIC_INLINE void wm_tipc_enable_mac(void) 1097 { 1098 TIPC_VLD1_Type vld1; 1099 vld1.w = TIPC->VLD1; 1100 vld1.b.MAC = 1; 1101 TIPC->VLD1 = vld1.w; 1102 } 1103 1104 /** 1105 * @brief This function is used disable mac. 1106 * 1107 * @param[in] None 1108 * 1109 * @return None 1110 * 1111 * @note None 1112 */ wm_tipc_disable_mac(void)1113__STATIC_INLINE void wm_tipc_disable_mac(void) 1114 { 1115 TIPC_VLD1_Type vld1; 1116 vld1.w = TIPC->VLD1; 1117 vld1.b.MAC = 0; 1118 TIPC->VLD1 = vld1.w; 1119 } 1120 1121 /** 1122 * @brief This function is used enable sec. 1123 * 1124 * @param[in] None 1125 * 1126 * @return None 1127 * 1128 * @note None 1129 */ wm_tipc_enable_sec(void)1130__STATIC_INLINE void wm_tipc_enable_sec(void) 1131 { 1132 TIPC_VLD1_Type vld1; 1133 vld1.w = TIPC->VLD1; 1134 vld1.b.SEC = 1; 1135 TIPC->VLD1 = vld1.w; 1136 } 1137 1138 /** 1139 * @brief This function is used disable sec. 1140 * 1141 * @param[in] None 1142 * 1143 * @return None 1144 * 1145 * @note None 1146 */ wm_tipc_disable_sec(void)1147__STATIC_INLINE void wm_tipc_disable_sec(void) 1148 { 1149 TIPC_VLD1_Type vld1; 1150 vld1.w = TIPC->VLD1; 1151 vld1.b.SEC = 0; 1152 TIPC->VLD1 = vld1.w; 1153 } 1154 1155 /** 1156 * @brief This function is used enable sdio slave. 1157 * 1158 * @param[in] None 1159 * 1160 * @return None 1161 * 1162 * @note None 1163 */ wm_tipc_enable_sdio_slave(void)1164__STATIC_INLINE void wm_tipc_enable_sdio_slave(void) 1165 { 1166 TIPC_VLD1_Type vld1; 1167 vld1.w = TIPC->VLD1; 1168 vld1.b.SDIO_SLAVE = 1; 1169 TIPC->VLD1 = vld1.w; 1170 } 1171 1172 /** 1173 * @brief This function is used disable sdio slave. 1174 * 1175 * @param[in] None 1176 * 1177 * @return None 1178 * 1179 * @note None 1180 */ wm_tipc_disable_sdio_slave(void)1181__STATIC_INLINE void wm_tipc_disable_sdio_slave(void) 1182 { 1183 TIPC_VLD1_Type vld1; 1184 vld1.w = TIPC->VLD1; 1185 vld1.b.SDIO_SLAVE = 0; 1186 TIPC->VLD1 = vld1.w; 1187 } 1188 1189 /** 1190 * @brief This function is used enable high speed spi. 1191 * 1192 * @param[in] None 1193 * 1194 * @return None 1195 * 1196 * @note None 1197 */ wm_tipc_enable_hspi(void)1198__STATIC_INLINE void wm_tipc_enable_hspi(void) 1199 { 1200 TIPC_VLD1_Type vld1; 1201 vld1.w = TIPC->VLD1; 1202 vld1.b.SPI_HS = 1; 1203 TIPC->VLD1 = vld1.w; 1204 } 1205 1206 /** 1207 * @brief This function is used disable high speed spi. 1208 * 1209 * @param[in] None 1210 * 1211 * @return None 1212 * 1213 * @note None 1214 */ wm_tipc_disable_hspi(void)1215__STATIC_INLINE void wm_tipc_disable_hspi(void) 1216 { 1217 TIPC_VLD1_Type vld1; 1218 vld1.w = TIPC->VLD1; 1219 vld1.b.SPI_HS = 0; 1220 TIPC->VLD1 = vld1.w; 1221 } 1222 1223 /** 1224 * @brief This function is used enable sdio wrapper. 1225 * 1226 * @param[in] None 1227 * 1228 * @return None 1229 * 1230 * @note None 1231 */ wm_tipc_enable_sdio_wrapper(void)1232__STATIC_INLINE void wm_tipc_enable_sdio_wrapper(void) 1233 { 1234 TIPC_VLD1_Type vld1; 1235 vld1.w = TIPC->VLD1; 1236 vld1.b.SDIO_WRAPPER = 1; 1237 TIPC->VLD1 = vld1.w; 1238 } 1239 1240 /** 1241 * @brief This function is used disable sdio wrapper. 1242 * 1243 * @param[in] None 1244 * 1245 * @return None 1246 * 1247 * @note None 1248 */ wm_tipc_disable_sdio_wrapper(void)1249__STATIC_INLINE void wm_tipc_disable_sdio_wrapper(void) 1250 { 1251 TIPC_VLD1_Type vld1; 1252 vld1.w = TIPC->VLD1; 1253 vld1.b.SDIO_WRAPPER = 0; 1254 TIPC->VLD1 = vld1.w; 1255 } 1256 1257 /** 1258 * @brief This function is used enable rf bist. 1259 * 1260 * @param[in] None 1261 * 1262 * @return None 1263 * 1264 * @note None 1265 */ wm_tipc_enable_rf_bist(void)1266__STATIC_INLINE void wm_tipc_enable_rf_bist(void) 1267 { 1268 TIPC_VLD1_Type vld1; 1269 vld1.w = TIPC->VLD1; 1270 vld1.b.RF_BIST = 1; 1271 TIPC->VLD1 = vld1.w; 1272 } 1273 1274 /** 1275 * @brief This function is used disable rf bist. 1276 * 1277 * @param[in] None 1278 * 1279 * @return None 1280 * 1281 * @note None 1282 */ wm_tipc_disable_rf_bist(void)1283__STATIC_INLINE void wm_tipc_disable_rf_bist(void) 1284 { 1285 TIPC_VLD1_Type vld1; 1286 vld1.w = TIPC->VLD1; 1287 vld1.b.RF_BIST = 0; 1288 TIPC->VLD1 = vld1.w; 1289 } 1290 1291 /** 1292 * @} 1293 */ 1294 1295 /** 1296 * @} 1297 */ 1298 1299 #endif 1300