[资料分享] LMP91300驱动分享

[复制链接]
 楼主| xyz549040622 发表于 2019-12-21 11:15 | 显示全部楼层 |阅读模式
lm, TI, se, tc, IO
  1. /**
  2. *  \file   swif.c
  3. *
  4. *  \brief  swif APIs.
  5. *
  6. *   This file contains the APIs for swif.
  7. */

  8. /*
  9. * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
  10. */
  11. /*
  12. *  Redistribution and use in source and binary forms, with or without
  13. *  modification, are permitted provided that the following conditions
  14. *  are met:
  15. *
  16. *    Redistributions of source code must retain the above copyright
  17. *    notice, this list of conditions and the following disclaimer.
  18. *
  19. *    Redistributions in binary form must reproduce the above copyright
  20. *    notice, this list of conditions and the following disclaimer in the
  21. *    documentation and/or other materials provided with the
  22. *    distribution.
  23. *
  24. *    Neither the name of Texas Instruments Incorporated nor the names of
  25. *    its contributors may be used to endorse or promote products derived
  26. *    from this software without specific prior written permission.
  27. *
  28. *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  29. *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  30. *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  31. *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  32. *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  33. *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  34. *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  35. *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  36. *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  37. *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  38. *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  39. *
  40. */

  41. #include "..\Common\device.h"
  42. #include "..\Common\types.h"          // Basic Type declarations
  43. #include "..\Common\hal_UCS.h"
  44. #include "..\Common\hal_pmm.h"
  45. #include "usb2any.h"
  46. #include "..\wavevision\_include\fpga.h"




  47. unsigned int DUTY_CYCLE_25,DUTY_CYCLE_50,DUTY_CYCLE_75,DUTY_CYCLE_35,DUTY_CYCLE_65;
  48. #define SWIF_INPUT    0x10
  49. #define SWIF_OUTPUT   0x08


  50. //definition for reading a register
  51. #define RD_TIME_UINT     125000
  52. #define RD_TIME_UINT_25  781
  53. #define RD_TIME_UINT_35  1093
  54. #define RD_TIME_UINT_50  1562
  55. #define RD_TIME_UINT_65  2031
  56. #define RD_TIME_UINT_75  2381
  57. static unsigned int cur_clk_s;



  58. //definition for sending a symbol to lmp91300
  59. #define  SET_TX_HIGH  0xF7
  60. #define  SET_TX_LOW  0x08
  61. #define  ZERO_SYM  0
  62. #define  ONE_SYM   1
  63. #define  IDLE_SYM  2


  64. //------------------------------------------------------------------------------
  65. //  reset_swif_for_spi
  66. //
  67. //  DESCRIPTION:
  68. //  initialize the pins for SPI interface
  69. //
  70. //------------------------------------------------------------------------------

  71. void reset_swif_for_spi(void)
  72. {


  73.         P2SEL  &= ~0x08;                         // p2.3 rx
  74.         P2SEL  &= ~0x10;                         // p2.4 tx

  75.         P2DIR  |=  0x18;                        // make it out, in spi mode, these two pin muts be low
  76.         P2OUT &=  ~0x18;                         //        Make Low

  77. }

  78. //------------------------------------------------------------------------------
  79. //  init_swif_set
  80. //
  81. //  DESCRIPTION:
  82. //  initialize the pins for SWIF interface
  83. //  unsigned char swif_clk: SWIF transfer speed(k unit)
  84. //------------------------------------------------------------------------------

  85. void init_swif_set(unsigned char swif_clk)
  86. {
  87.         unsigned int one_time_uint_cycles;


  88.         P2SEL  &= ~0x08;                         // p2.3 tx
  89.         P2SEL  &= ~0x10;                         // p2.4 rx

  90.         P2DIR  &=  ~0x10;                         // make it input
  91.         P2DIR  |=  0x08;                         // make it output

  92.         P2OUT &=  ~0x08;                         //        Make Low

  93.         one_time_uint_cycles = MASTER_CLOCK_KHZ/swif_clk;

  94.         DUTY_CYCLE_50 = one_time_uint_cycles >>1;
  95.         DUTY_CYCLE_25 = DUTY_CYCLE_50>>1;
  96.         DUTY_CYCLE_75 = DUTY_CYCLE_50  + DUTY_CYCLE_25 ;

  97. }

  98. //------------------------------------------------------------------------------
  99. //  delay_cycles
  100. //
  101. //  DESCRIPTION:
  102. //  delay cpu cycles.
  103. //------------------------------------------------------------------------------
  104. void delay_cycles(unsigned int delay_cycles)
  105. {
  106.         unsigned char count[4];
  107.         unsigned int cur_clk;


  108.         RTCCTL01 = 0;
  109.         RTCCTL01 |= RTCHOLD;                                        // Make sure  RTC_A is stopped
  110.         RTCNT1 = 10;                                                   // Load RTC_A (4 bytes to make a 32-bit)
  111.         RTCNT2 = 0;
  112.         //RTCNT3 = 0;
  113.         //RTCNT4 = 0;
  114.         RTCCTL01 =  RTCSSEL_1 + RTCTEV_3;        // CTR_A: Counter Mode, Enable Interrupt, MCLK Input, 32-bit overflow, Start counter


  115.         do {
  116.                 cur_clk = 0;
  117.                 cur_clk = RTCNT2;
  118.                 cur_clk <<=8;
  119.                 cur_clk |= RTCNT1;

  120.         }while (cur_clk < delay_cycles );

  121. }



  122. //------------------------------------------------------------------------------
  123. //  void SWIFSendSymbol(uint8_t sym)
  124. //
  125. //  DESCRIPTION:
  126. //  Send symbol "sym" to lmp91300 on the SWIF TX pin.
  127. //------------------------------------------------------------------------------

  128. void SWIF_send_symbol(uint8_t sym)
  129. {

  130.         P2OUT &= SET_TX_HIGH;

  131.         switch (sym) {
  132.         case ZERO_SYM:
  133.                 {
  134.                         delay_cycles(DUTY_CYCLE_25);                                                                                   // high period for symbol 0
  135.                         break;
  136.                 }
  137.         case ONE_SYM:
  138.                 {
  139.                         delay_cycles(DUTY_CYCLE_75);                                                                                   // high period for symbol 1
  140.                         break;
  141.                 }
  142.         case IDLE_SYM:
  143.                 {
  144.                         delay_cycles(DUTY_CYCLE_50);                                                                                   // high period for symbol idle
  145.                         break;
  146.                 }
  147.         default:
  148.                 {
  149.                         delay_cycles(DUTY_CYCLE_50);                                                                                   // all low period
  150.                         break;
  151.                 }
  152.         }

  153.         //        P2OUT &= SET_TX_LOW;       // assert PRI_TX_EN_N
  154.         P2OUT |= SET_TX_LOW;
  155.         switch (sym) {
  156.         case ZERO_SYM:
  157.                 {
  158.                         delay_cycles(DUTY_CYCLE_75);                                                                                   // low period for symbol 0
  159.                         break;
  160.                 }
  161.         case ONE_SYM:
  162.                 {
  163.                         delay_cycles(DUTY_CYCLE_25);                                                                                   // low period for symbol 1
  164.                         break;
  165.                 }
  166.         case IDLE_SYM:
  167.                 {
  168.                         delay_cycles(DUTY_CYCLE_50);                                                                                   // low period for idle symbol
  169.                         break;
  170.                 }
  171.         default:
  172.                 {
  173.                         delay_cycles(DUTY_CYCLE_50);                                                                                   // all low period
  174.                         break;
  175.                 }
  176.         }

  177. }

  178. //------------------------------------------------------------------------------
  179. //  void SWIF_write_byte
  180. //
  181. //  DESCRIPTION:
  182. //  Send a byte to lmp91300 by swif interface
  183. //  unsigned char data: the data written to lmp91300 via swif
  184. //------------------------------------------------------------------------------

  185. void SWIF_write_byte(unsigned char data)
  186. {
  187.         int i;
  188.         for ( i=7; i>=0; i--) {
  189.                 //output MSB first
  190.                 SWIF_send_symbol((data>>i) & 1 );
  191.         }

  192. }







  193. //------------------------------------------------------------------------------
  194. //  void SWIF_get_idle
  195. //
  196. //  DESCRIPTION:
  197. //  wait for a idle coming and measure a idle time unit
  198. //  return: true, if the symbol is idle
  199. //------------------------------------------------------------------------------

  200. unsigned char SWIF_get_idle()
  201. {
  202.         unsigned int cur_clk_d, cur_clk_e;
  203.         unsigned int one_time_uint_cycles;

  204.         do {
  205.                
  206.                 {//wait for input become low
  207.                         cur_clk_d = RTCNT2;
  208.                         cur_clk_d <<=8;
  209.                         cur_clk_d |=RTCNT1;

  210.                 }

  211.                 if ((cur_clk_d - cur_clk_s) > RD_TIME_UINT)        //8kbit, 1 time unit is 3125 (125* 25)
  212.                         return 0;

  213.                 if ((P2IN & SWIF_INPUT)==0x10)
  214.                         break;

  215.         }while (1);


  216.         do {
  217.                
  218.                 {//wait for input become low
  219.                         cur_clk_e = RTCNT2;
  220.                         cur_clk_e <<=8;
  221.                         cur_clk_e |=RTCNT1;


  222.                 }


  223.                 if ((cur_clk_e - cur_clk_d) > RD_TIME_UINT)        //8kbit, 1 time unit is 3125 (125* 25)
  224.                         return 0;
  225.                 //wait for high
  226.                 if ((P2IN & SWIF_INPUT)==0x0)
  227.                         break;

  228.         }while (1);


  229.         one_time_uint_cycles = cur_clk_e  - cur_clk_s-5 ;

  230.         DUTY_CYCLE_50 = one_time_uint_cycles >>1;
  231.         DUTY_CYCLE_25 = DUTY_CYCLE_50>>1;
  232.         DUTY_CYCLE_75 = DUTY_CYCLE_50  + DUTY_CYCLE_25 ;

  233.         DUTY_CYCLE_35 = DUTY_CYCLE_25 + (DUTY_CYCLE_25>>1);//adjust 150 clk.

  234.         DUTY_CYCLE_65 = DUTY_CYCLE_50 + (DUTY_CYCLE_25>>1);




  235.         //keep the current change point


  236.         if (((cur_clk_d- cur_clk_s) > DUTY_CYCLE_35 ) && ((cur_clk_d- cur_clk_s) < DUTY_CYCLE_65) ) {
  237.                 cur_clk_s = cur_clk_e;
  238.                 return 1;
  239.         }

  240.         return 0;
  241. }



  242. //------------------------------------------------------------------------------
  243. //  void SWIF_get_sym
  244. //
  245. //  DESCRIPTION:
  246. //  read a sym
  247. //  return : a sym
  248. //------------------------------------------------------------------------------

  249. unsigned char SWIF_get_sym()
  250. {
  251.         unsigned char one_sym = 0xFF;
  252.         unsigned int cur_clk_d, cur_clk_e;


  253.         do {
  254.                
  255.                 {//wait for input become low
  256.                         cur_clk_d = RTCNT2;
  257.                         cur_clk_d <<=8;
  258.                         cur_clk_d |=RTCNT1;
  259.                 }


  260.                 if ((cur_clk_d - cur_clk_s) > RD_TIME_UINT)        //8kbit, 1 time unit is 3125 (125* 25)
  261.                         return 0xFF;
  262.                 //wait for low
  263.                 if ((P2IN & SWIF_INPUT)==0x10)
  264.                         break;

  265.         }while (1);

  266.         do {
  267.                
  268.                 {//wait for input become high
  269.                         cur_clk_e = RTCNT2;
  270.                         cur_clk_e <<=8;
  271.                         cur_clk_e |=RTCNT1;
  272.                 }

  273.                 if ((cur_clk_e - cur_clk_d) > RD_TIME_UINT) { //8kbit, 1 time unit is 3125 (125* 25)
  274.                         return 0XFF;
  275.                 }
  276.                 //wait for high
  277.                 if ((P2IN & SWIF_INPUT)==0x0)
  278.                         break;

  279.         }while (1);



  280.         if (((cur_clk_d- cur_clk_s) < DUTY_CYCLE_35 ) && ((cur_clk_e- cur_clk_d) > DUTY_CYCLE_65) )
  281.                 one_sym = ZERO_SYM;
  282.         else        one_sym        = ONE_SYM;

  283.         //keep the current change point
  284.         cur_clk_s = cur_clk_e;

  285.         return one_sym;
  286. }



  287. //------------------------------------------------------------------------------
  288. //  void SWIF_read_reg
  289. //
  290. //  DESCRIPTION:
  291. //  read a register from lmp91300 by swif interface
  292. //  unsigned char cmd: the register address
  293. //  unsigned char swif_capture_data[2]: the buffer to store the received data
  294. //  return: none
  295. //------------------------------------------------------------------------------

  296. void SWIF_read_reg(unsigned char cmd,unsigned char swif_capture_data[2])
  297. {
  298.         unsigned char data;
  299.         unsigned int cur_clk;
  300.         int i;



  301.         //send read command
  302.         SWIF_send_symbol(IDLE_SYM);
  303.         SWIF_write_byte(cmd);
  304.         SWIF_send_symbol(IDLE_SYM);

  305.         //end transfer

  306.         P2OUT &= SET_TX_HIGH;
  307.         P2OUT &= SET_TX_HIGH;
  308.         P2OUT &= SET_TX_HIGH;
  309.         P2OUT |= SET_TX_LOW;

  310.         //start time clk
  311.         RTCCTL01 = 0;
  312.         RTCCTL01 |= RTCHOLD;                                  // Make sure  RTC_A is stopped
  313.         RTCNT1 = 0;                                                         // Load RTC_A (4 bytes to make a 32-bit)
  314.         RTCNT2 = 0;
  315.         RTCNT3 = 0;
  316.         RTCNT4 = 0;
  317.         RTCCTL01 =  RTCSSEL_1 + RTCTEV_3;          // CTR_A: Counter Mode, Enable Interrupt, MCLK Input, 32-bit overflow, Start counter



  318.         //wait for getting the idle start point.
  319.         do {


  320.                 if ((P2IN & SWIF_INPUT)==0x10) {//wait for input become high
  321.                         cur_clk = RTCNT2;
  322.                         cur_clk <<=8;
  323.                         cur_clk |=RTCNT1;


  324.                 } else {
  325.                         //reset the clk count
  326.                         RTCCTL01 = 0;
  327.                         RTCCTL01 |= RTCHOLD;                                  // Make sure  RTC_A is stopped
  328.                         RTCNT1 = 0;                                                         // Load RTC_A (4 bytes to make a 32-bit)
  329.                         RTCNT2 = 0;
  330.                         RTCNT3 = 0;
  331.                         RTCNT4 = 0;
  332.                         RTCCTL01 =  RTCSSEL_1 + RTCTEV_3;          // CTR_A: Counter Mode, Enable Interrupt, MCLK Input, 32-bit overflow, Start counter
  333.                         //initialize start point clk
  334.                         cur_clk_s = 0;
  335.                         break;
  336.                 }

  337.         }while (1);




  338.         if (SWIF_get_idle() ==0) { //for reading, the first symbol must be idle
  339.                 return ;
  340.         }

  341.         RTCCTL01 = 0;
  342.         RTCCTL01 |= RTCHOLD;                                  // Make sure  RTC_A is stopped
  343.         RTCNT1 = 0;                                                         // Load RTC_A (4 bytes to make a 32-bit)
  344.         RTCNT2 = 0;
  345.         RTCNT3 = 0;
  346.         RTCNT4 = 0;
  347.         RTCCTL01 =  RTCSSEL_1 + RTCTEV_3;          // CTR_A: Counter Mode, Enable Interrupt, MCLK Input, 32-bit overflow, Start counter
  348.         //initialize start point clk
  349.         cur_clk_s = 0;


  350.         data = 0;
  351.         for ( i=7; i>=0; i--) {
  352.                 //output MSB first
  353.                 //reset the clk count
  354.                 data |= (SWIF_get_sym()<< i);
  355.         }

  356.         swif_capture_data[0] = data;

  357.         //don't read the second byte because some register only outputs a byte
  358. #if 0
  359.         data  =0;
  360.         for ( i=7; i>=0; i--) {
  361.                 //output MSB first
  362.                 data |= (SWIF_get_sym()<< i);
  363.         }

  364.         swif_capture_data[1] = data;
  365. #endif
  366.         //wait for the read done (8*8*125*25), one bit:125us
  367.         __delay_cycles(4*125*25);

  368. }

  369. //------------------------------------------------------------------------------
  370. //  void SWIF_read_data
  371. //
  372. //  DESCRIPTION:
  373. //  read data from lmp91300 by swif interface, this is for stream mode
  374. //  unsigned char swif_capture_data[2]: the buffer to store the received data
  375. //  return: none
  376. //------------------------------------------------------------------------------

  377. void SWIF_read_data(unsigned char swif_capture_data[2])
  378. {
  379.         unsigned char data;
  380.         unsigned char cmd;

  381.         unsigned int cur_clk;
  382.         int i;

  383.         //  init_swif_set(ctrl_data[FPGA_SPI_CFG]);
  384.         init_swif_set(7);


  385.         cmd =0xFA;//read address 0x7a|readflag

  386.         //send read command
  387.         SWIF_send_symbol(IDLE_SYM);
  388.         SWIF_write_byte(cmd);
  389.         SWIF_send_symbol(IDLE_SYM);

  390.         //end transfer

  391.         P2OUT &= SET_TX_HIGH;
  392.         P2OUT &= SET_TX_HIGH;
  393.         P2OUT &= SET_TX_HIGH;
  394.         P2OUT |= SET_TX_LOW;

  395.         //start time clk
  396.         RTCCTL01 = 0;
  397.         RTCCTL01 |= RTCHOLD;                                  // Make sure  RTC_A is stopped
  398.         RTCNT1 = 0;                                                         // Load RTC_A (4 bytes to make a 32-bit)
  399.         RTCNT2 = 0;
  400.         RTCNT3 = 0;
  401.         RTCNT4 = 0;
  402.         RTCCTL01 =  RTCSSEL_1 + RTCTEV_3;          // CTR_A: Counter Mode, Enable Interrupt, MCLK Input, 32-bit overflow, Start counter



  403.         //wait for getting the idle start point.
  404.         do {


  405.                 if ((P2IN & SWIF_INPUT)==0x10) {//wait for input become high
  406.                         cur_clk = RTCNT2;
  407.                         cur_clk <<=8;
  408.                         cur_clk |=RTCNT1;


  409.                 } else {
  410.                         //reset the clk count
  411.                         RTCCTL01 = 0;
  412.                         RTCCTL01 |= RTCHOLD;                                  // Make sure  RTC_A is stopped
  413.                         RTCNT1 = 0;                                                         // Load RTC_A (4 bytes to make a 32-bit)
  414.                         RTCNT2 = 0;
  415.                         RTCNT3 = 0;
  416.                         RTCNT4 = 0;
  417.                         RTCCTL01 =  RTCSSEL_1 + RTCTEV_3;          // CTR_A: Counter Mode, Enable Interrupt, MCLK Input, 32-bit overflow, Start counter
  418.                         //initialize start point clk
  419.                         cur_clk_s = 0;
  420.                         break;
  421.                 }

  422.         }while (1);




  423.         if (SWIF_get_idle() ==0) { //for reading, the first symbol must be idle
  424.                 return ;
  425.         }

  426.         RTCCTL01 = 0;
  427.         RTCCTL01 |= RTCHOLD;                                  // Make sure  RTC_A is stopped
  428.         RTCNT1 = 0;                                                         // Load RTC_A (4 bytes to make a 32-bit)
  429.         RTCNT2 = 0;
  430.         RTCNT3 = 0;
  431.         RTCNT4 = 0;
  432.         RTCCTL01 =  RTCSSEL_1 + RTCTEV_3;          // CTR_A: Counter Mode, Enable Interrupt, MCLK Input, 32-bit overflow, Start counter
  433.         //initialize start point clk
  434.         cur_clk_s = 0;


  435.         data = 0;
  436.         for ( i=7; i>=0; i--) {
  437.                 data |= (SWIF_get_sym()<< i);
  438.         }

  439.         swif_capture_data[0] = data;

  440.         data  =0;
  441.         for ( i=7; i>=0; i--) {
  442.                 //output MSB first
  443.                 data |= (SWIF_get_sym()<< i);
  444.         }

  445.         swif_capture_data[1] = data;

  446. }

  447. //------------------------------------------------------------------------------
  448. //  void SWIF_write_reg
  449. //
  450. //  DESCRIPTION:
  451. //  write the value to  a register  by swif interface
  452. //  unsigned char cmd: the register address
  453. //  unsigned char data[2]: the value to write to register
  454. //  unsigned char data_width: 0 8 bits, 1: 16 bits
  455. //  return: none
  456. //------------------------------------------------------------------------------

  457. void SWIF_write_reg(unsigned char cmd, unsigned char data[2], unsigned char data_width)
  458. {

  459.         //send idle
  460.         SWIF_send_symbol(IDLE_SYM);
  461.         //write write command
  462.         SWIF_write_byte(cmd);

  463.         //write data
  464.         SWIF_write_byte(data[0]);

  465.         if (data_width)//if it is 16 bit data
  466.                 SWIF_write_byte(data[1]);

  467.         //send idle
  468.         SWIF_send_symbol(IDLE_SYM);

  469.         P2OUT &= SET_TX_HIGH;
  470.         P2OUT &= SET_TX_HIGH;
  471.         P2OUT &= SET_TX_HIGH;
  472.         P2OUT |= SET_TX_LOW;


  473. }
  474. //------------------------------------------------------------------------------
  475. // unsigned char SWIF_Transfer
  476. //
  477. //  DESCRIPTION:
  478. //  perform SWIF transfer
  479. // unsigned char *ctrl_data: data package
  480. //  return: none
  481. //------------------------------------------------------------------------------

  482. unsigned char  SWIF_Transfer(unsigned char *ctrl_data)
  483. {

  484.         unsigned char swif_capture_cmd;
  485.         unsigned char swif_capture_data[2];
  486.         unsigned char rw_flag;
  487.         unsigned char data_width;


  488.         init_swif_set(ctrl_data[FPGA_SPI_CFG]);
  489.         // init_swif_set(7);

  490.         //get address
  491.         swif_capture_cmd = ctrl_data[FPGA_SPI_ADDR_H];

  492.         //get read/write flag
  493.         rw_flag = (ctrl_data[FPGA_SPI_CMD]>>1)&1;

  494.         swif_capture_cmd |= ((( ctrl_data[FPGA_SPI_CMD]>>1)&1 ) <<7);

  495.         data_width = (ctrl_data[FPGA_SPI_CMD]>>3) & 3;
  496.         //get data
  497.         swif_capture_data[0] =  ctrl_data[FPGA_SPI_DATA_H];//if the data is 16 bits, it hold the MSB byte, if it is 8bit, it holds LSB
  498.         swif_capture_data[1] =  ctrl_data[FPGA_SPI_DATA_L];//if the data is 16 bits, it hold the LSB byte,

  499.         if (rw_flag) {// rw_flag ==1: read)
  500.                 SWIF_read_reg(swif_capture_cmd,swif_capture_data);

  501.                 ctrl_data[FPGA_SPI_DATA_H] = swif_capture_data[0];//if the data is 16 bits, it hold the MSB byte, if it is 8bit, it holds LSB
  502.                 ctrl_data[FPGA_SPI_DATA_L] = swif_capture_data[1];//if the data is 16 bits, it hold the LSB byte,

  503.         } else {
  504.                 SWIF_write_reg(swif_capture_cmd, swif_capture_data, data_width);
  505.         }


  506.         return 0;


  507. }

  508. //-------------------------------------------------------------------------------------------



externally 发表于 2019-12-23 19:40 | 显示全部楼层
感谢楼主分享!学习一下
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:qq群: 嵌入式系统arm初学者 224636155←← +→→点击-->小 i 精品课全集,21ic公开课~~←←→→点击-->小 i 精品课全集,给你全方位的技能策划~~←←

2841

主题

19330

帖子

110

粉丝
快速回复 在线客服 返回列表 返回顶部