您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ spi_read函数代码示例

51自学网 2021-06-03 08:09:49
  C++
这篇教程C++ spi_read函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中spi_read函数的典型用法代码示例。如果您正苦于以下问题:C++ spi_read函数的具体用法?C++ spi_read怎么用?C++ spi_read使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了spi_read函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: SPI0_Handler

void SPI0_Handler(void) {		uint16_t us_data;	uint32_t us_tx_data;					uint8_t p_pcs;		uint32_t status = spi_read_status(_spi_base);			if (status & SPI_SR_RDRF) {				if ( spi_read( _spi_base, &us_data,	&p_pcs ) == SPI_OK ) {			// store received byte			fifo_push_uint8(_this->_spi_rx_fifo_desc, us_data);						// If handler defined - call it with instance and received byte.			if (_this->_call_back)			{				_this->_call_back(_this, (uint8_t)us_data);			}		}	}			if (status & SPI_SR_TDRE) {		// more bytes to send?				if ( fifo_pull_uint32(_this->_spi_tx_fifo_desc, &us_tx_data) == FIFO_OK ) {			_spi_base->SPI_TDR = us_tx_data;		} else {			// No			// Disable SPI TX interrupt			spi_disable_interrupt(_spi_base, SPI_IDR_TDRE);			_spi_active = 0;		}	}}
开发者ID:scj-devel,项目名称:hvm-scj,代码行数:33,


示例2: bfin_get_num_params

void bfin_get_num_params(volatile u32* num) {  u16 x;  app_pause();  // command   spi_selectChip(BFIN_SPI, BFIN_SPI_NPCS);  spi_write(BFIN_SPI, MSG_GET_NUM_PARAMS_COM);  spi_unselectChip(BFIN_SPI, BFIN_SPI_NPCS);  print_dbg("/r/n : spi_write MSG_GET_NUM_PARAMS");  // read num  spi_selectChip(BFIN_SPI, BFIN_SPI_NPCS);  spi_write(BFIN_SPI, 0); //dont care  spi_read(BFIN_SPI, &x);  spi_unselectChip(BFIN_SPI, BFIN_SPI_NPCS);    *num = (u8)(x & 0xff);  print_dbg("/r/n : spi_read numparams: ");  print_dbg_ulong(*num);  app_resume();}
开发者ID:bensteinberg,项目名称:aleph,代码行数:25,


示例3: pfio_read_input

uint8_t pfio_read_input(void){    // XOR by 0xFF so we get the right outputs.    // before a turned off input would read as 1,    // confusing developers.    return spi_read(INPUT_PORT) ^ 0xFF;}
开发者ID:m15k,项目名称:piface,代码行数:7,


示例4: platform_wifi_spi_rx_dma_irq

void platform_wifi_spi_rx_dma_irq(void){  uint8_t junk1;  uint16_t junk2;  pdc_packet_t pdc_spi_packet = { 0, 1 };  Pdc* spi_pdc  = spi_get_pdc_base( wifi_spi.port );    uint32_t status = spi_read_status( wifi_spi.port );  uint32_t mask = spi_read_interrupt_mask( wifi_spi.port );    if ( ( mask & SPI_IMR_RXBUFF ) && ( status & SPI_SR_RXBUFF ) )  {    pdc_disable_transfer( spi_pdc, PERIPH_PTCR_RXTDIS | PERIPH_PTCR_TXTDIS );    pdc_rx_init( spi_pdc, &pdc_spi_packet, NULL );    pdc_tx_init( spi_pdc, &pdc_spi_packet, NULL );    spi_disable_interrupt( wifi_spi.port, SPI_IER_RXBUFF );  }    if ( ( mask & SPI_IMR_ENDTX ) && ( status & SPI_SR_ENDTX ) )  {    pdc_disable_transfer( spi_pdc, PERIPH_PTCR_TXTDIS );    pdc_tx_init( spi_pdc, &pdc_spi_packet, NULL );    spi_disable_interrupt( wifi_spi.port, SPI_IER_ENDTX );    /* Clear SPI RX data in a SPI send sequence */    spi_read( wifi_spi.port, &junk2, &junk1);  }    mico_rtos_set_semaphore( &spi_transfer_finished_semaphore );}
开发者ID:OfficeKit,项目名称:OfficeKit_Embed_MiCO,代码行数:29,


示例5: w25qxx_probe

//芯片探测int w25qxx_probe(void){    uint32_t i;    uint16_t id;    uint8_t buf[4];    buf[0] = W25X_ManufactDeviceID;    buf[1] = 0;    buf[2] = 0;    buf[3] = 0;    /* read id */    spi_write(&device, buf, 4, false);    spi_read(&device, buf, 2, true);    id = ((buf[0]<<8) + buf[1]);    W25QXX_TRACE("ID:%d/r/n", id);    //see if we find a match    for(i = 0; i< ARRAY_SIZE(w25qxx_attr_table);i++)    {        if(w25qxx_attr_table[i].id == id)        {            // find a match            w25qxx_type.name = w25qxx_attr_table[i].name;            w25qxx_type.id = w25qxx_attr_table[i].id;            w25qxx_type.size = w25qxx_attr_table[i].size;            w25qxx_power_up();            buf[0] = w25qxx_read_sr();            W25QXX_TRACE("SR:0x%X/r/n", buf[0]);            buf[0] = w25qxx_read_sr2();            W25QXX_TRACE("SR2:0x%X/r/n", buf[0]);            // enable full access to all memory regin, something like unlock chip.            w25qxx_write_sr(0x00);            return SPI_EOK;         }    }    return SPI_ERROR;}
开发者ID:liubins313,项目名称:rt-thread-1.2.0-k60,代码行数:36,


示例6: eeprom_get_status_reg

/*----------------------------------------------------------------------*/static void eeprom_get_status_reg(u8 *status) {	spi_chip_select(ENABLE);	spi_write(RDSR_CMD);	*status = spi_read();			spi_chip_select(DISABLE);}
开发者ID:stas2z,项目名称:linux-3.10-witi,代码行数:8,


示例7: spi_eeprom_read

/*----------------------------------------------------------------------*/unsigned char spi_eeprom_read(u16 address, u16 nbytes, u8 *dest){	u8	status;	u16	cnt = 0;	int i = 0;	do {		i++;		eeprom_get_status_reg(&status);			}	while((status & (1<<RDY)) && (i < max_ee_busy_loop));	if (i == max_ee_busy_loop)		return (status);	/* eeprom ready */	if (!(status & (1<<RDY))) {			spi_chip_select(ENABLE);		/* read op */		spi_write(READ_CMD);		spi_write((u8)(address >> 8));		/* MSB byte First */		spi_write((u8)(address & 0x00FF));	/* LSB byte */		while (cnt < nbytes) {			*(dest++) = spi_read();			cnt++;		}		status = 0;		/* deassert cs */		spi_chip_select(DISABLE);	} 
开发者ID:StephenMacras,项目名称:dsl-n55u-bender,代码行数:32,


示例8: main

int main(void){	int counter = 0;	uint16_t rx_value = 0x42;/* Setup Rx/Tx buffers for USART */	buffer_init(send_buffer,BUFFER_SIZE);	buffer_init(receive_buffer,BUFFER_SIZE);	clock_setup();	gpio_setup();	usart_setup();    usart_print_string("SPI-DMA Test/n/r");	spi_setup();	while (1) {        gpio_toggle(GPIOA, GPIO1);#ifdef LOOPBACK/* Print what is going to be sent on the SPI bus */		usart_print_string("Sending  packet ");        usart_print_int(counter);        usart_print_string("/n/r");		spi_send(SPI1, (uint8_t) counter);		rx_value = spi_read(SPI1);		usart_print_string("Received  packet ");        usart_print_int(rx_value);        usart_print_string("/n/r");        counter++;#else/* This is a 1-byte "reset" command to SD card */		spi_send(SPI1, 0x40);		spi_send(SPI1, 0x00);		spi_send(SPI1, 0x00);		spi_send(SPI1, 0x00);		spi_send(SPI1, 0x00);		spi_send(SPI1, 0x95);	/* Read the byte that just came in (use a loopback between MISO and MOSI	 * to get the same byte back)	 */		rx_value = spi_read(SPI1);#endif	}	return 0;}
开发者ID:JamesLinus,项目名称:ARM-Ports,代码行数:47,


示例9: bfin_get_param

// get parameter values32 bfin_get_param(u8 idx) {  ParamValueCommon pval;  u16 x;    app_pause();  // command  spi_selectChip(BFIN_SPI, BFIN_SPI_NPCS);  spi_write(BFIN_SPI, MSG_GET_PARAM_COM);  spi_unselectChip(BFIN_SPI, BFIN_SPI_NPCS);  // idx  spi_selectChip(BFIN_SPI, BFIN_SPI_NPCS);  spi_write(BFIN_SPI, idx);  spi_unselectChip(BFIN_SPI, BFIN_SPI_NPCS);  /// read value  spi_selectChip(BFIN_SPI, BFIN_SPI_NPCS);  spi_write(BFIN_SPI, 0); // don't care  spi_read(BFIN_SPI, &x);  spi_unselectChip(BFIN_SPI, BFIN_SPI_NPCS);  pval.asByte[0] = (u8)x;  spi_selectChip(BFIN_SPI, BFIN_SPI_NPCS);  spi_write(BFIN_SPI, 0); // don't care  spi_read(BFIN_SPI, &x);  spi_unselectChip(BFIN_SPI, BFIN_SPI_NPCS);  pval.asByte[1] = (u8)x;  spi_selectChip(BFIN_SPI, BFIN_SPI_NPCS);  spi_write(BFIN_SPI, 0); // don't care  spi_read(BFIN_SPI, &x);  spi_unselectChip(BFIN_SPI, BFIN_SPI_NPCS);  pval.asByte[2] = (u8)x;  spi_selectChip(BFIN_SPI, BFIN_SPI_NPCS);  spi_write(BFIN_SPI, 0); // don't care  spi_read(BFIN_SPI, &x);  spi_unselectChip(BFIN_SPI, BFIN_SPI_NPCS);  pval.asByte[3] = (u8)x;  app_resume();  return pval.asInt;  }
开发者ID:bensteinberg,项目名称:aleph,代码行数:47,


示例10: w25qxx_read_sr2

//芯片读static uint8_t w25qxx_read_sr2(void){    uint8_t buf[1];    buf[0] = W25X_ReadStatusReg2;    spi_write(&device, buf, 1, false); //false = 保持片选,继续发送    spi_read(&device, buf, 1, true);    return buf[0];}
开发者ID:liubins313,项目名称:rt-thread-1.2.0-k60,代码行数:9,


示例11: accel_sensor_write_reg

static void accel_sensor_write_reg(spi_chip_t * chip, uint8_t reg_base) {	if (spi_lock_dev(chip->spi_dev) <0)		return;	spi_write(chip, reg_base);	//printf("Writing %#x/r/n", ((reg_base + 1) << 8) | 0x8000 | ((value >> 8) & 0xff));	spi_read(chip);	spi_unlock_dev(chip->spi_dev);}
开发者ID:rtr14,项目名称:libfsw_sensor,代码行数:8,


示例12: spi_get

ssize_t spi_get(struct spi_driver_t *self_p,                uint8_t *data_p){    ASSERTN(self_p != NULL, EINVAL);    ASSERTN(data_p != NULL, EINVAL);    return (spi_read(self_p, data_p, 1));}
开发者ID:eerimoq,项目名称:simba,代码行数:8,


示例13: ms5611_convert_pressure

static inline uint32_t ms5611_convert_pressure(void){	uint32_t data;	spi_select();	spi_write(0x48);	//highest resolution option	spi_deselect();	//delay_ms(10);	delay_ms(10);	spi_select();	spi_write(0x00);	data = ((uint32_t)spi_read())<<16;	data+= ((uint32_t)spi_read())<<8;	data+= ((uint32_t)spi_read());	spi_deselect();	delay_ms(1);	return data;}
开发者ID:melsabae,项目名称:shc_one_month,代码行数:17,


示例14: as3935_set_tuning_capacitor

void ICACHE_FLASH_ATTR as3935_set_tuning_capacitor(uint8_t cap){	HSPI_INIT_STUF;	as3935.x8.d8=spi_read(8);	as3935.x8.a8.TUN_CAP=cap;		os_printf("/nsetting tun cap to: %d, %d/n",tuncaplookuptable[cap],cap );	spi_write(8,as3935.x8.d8);		}
开发者ID:na1pir,项目名称:as3935_esp8266_iot,代码行数:8,


示例15: adc_convert

// perform a conversion on all 4 channelsstatic void adc_convert(u16 (*dst)[4]) {#if 1#else  u16 cmd, val;  // data into AD7923 is a left-justified 12-bit value in a 16-bit word  // so, always lshift the command before sending  cmd = ( AD7923_CMD_BASE ) << 4;  spi_selectChip(ADC_SPI, ADC_SPI_NPCS);  spi_write(ADC_SPI, cmd);  spi_unselectChip(ADC_SPI, ADC_SPI_NPCS);  // get channel 0, setup channel 1  cmd = ( AD7923_CMD_BASE | AD7923_CTL_ADD0 ) << 4;  spi_selectChip(ADC_SPI, ADC_SPI_NPCS);  spi_write(ADC_SPI, cmd);  spi_read(ADC_SPI, &val);  spi_unselectChip(ADC_SPI, ADC_SPI_NPCS);  (*dst)[0] = val & 0xfff;   // get channel 1, setup channel 2  cmd = ( AD7923_CMD_BASE | AD7923_CTL_ADD1 ) << 4;  spi_selectChip(ADC_SPI, ADC_SPI_NPCS);  spi_write(ADC_SPI, cmd);  spi_read(ADC_SPI, &val);  spi_unselectChip(ADC_SPI, ADC_SPI_NPCS);  (*dst)[1] = val & 0xfff;  // get channel 2, setup channel 3  cmd = ( AD7923_CMD_BASE | AD7923_CTL_ADD1 | AD7923_CTL_ADD0 ) << 4;  spi_selectChip(ADC_SPI, ADC_SPI_NPCS);  spi_write(ADC_SPI, cmd);  spi_read(ADC_SPI, &val);  spi_unselectChip(ADC_SPI, ADC_SPI_NPCS);  (*dst)[2] = val & 0xfff;  // get channel 3, dummy write  cmd = ( AD7923_CMD_BASE ) << 4;  spi_selectChip(ADC_SPI, ADC_SPI_NPCS);  spi_write(ADC_SPI, cmd);  spi_read(ADC_SPI, &val);  spi_unselectChip(ADC_SPI, ADC_SPI_NPCS);  (*dst)[3] = val & 0xfff;#endif}
开发者ID:Someone101,项目名称:aleph,代码行数:47,


示例16: test_spi_baud_rate_change

void test_spi_baud_rate_change(void) {	delay_ms(1);	uint16_t data1 = 0b0101011101001001;	spi_set_selector_bit_length(SPI0, SPI_SELECTOR_0, SPI_BITS_16);	spi_set_selector_clk_polarity(SPI0, SPI_SELECTOR_0, SPI_POLARITY_LOW);	spi_set_selector_clk_phase(SPI0, SPI_SELECTOR_0, SPI_PHASE_LOW);	// test case begin	spi_set_selector_baud_rate(SPI0, SPI_SELECTOR_0, 1);	spi_write(SPI0, data1); // We send both bytes as 16 consecutive bits	delay_ms(1);	TEST_ASSERT_EQUAL_HEX32(data1, spi_read(SPI0));	// new test	spi_set_selector_baud_rate(SPI0, SPI_SELECTOR_0, 2);	spi_write(SPI0, data1); // We send both bytes as 16 consecutive bits	delay_ms(1);	TEST_ASSERT_EQUAL_HEX32(data1, spi_read(SPI0));}
开发者ID:PrinceBalabis,项目名称:mahm3lib,代码行数:17,


示例17: ms5611_read_s24

/* * Reads an int24 from the MS5611 address `adr`, stores it to `d`. */static void ms5611_read_s24(uint8_t adr, int32_t* d){    uint32_t data_received; //To store result    uint8_t adc_adr = 0x00; //Command to read ADC from baro    spi_enable(MS5611_SPID);    // The SPI peripheral is enabled. // CHIBIOS spiSelect(&MS5611_SPID);    spi_send8(MS5611_SPID, adr); // Data is written to the SPI interface after the previous write transfer has finished.        //TODO: Sleep for 1 ms    /*     * Wait for conversion to complete. There doesn't appear to be any way     * to do this without timing it, unfortunately.     *     * If we just watch the clock we'll consume enormous CPU time for little     * gain. Instead we'll sleep for "roughly" 1ms and then wait until at least     * the desired 0.6ms have passed.     */        spi_send8(MS5611_SPID, adc_adr); // Asks the device to send the results from the ADC.    data_received = spi_read(MS5611_SPID); //A ADC_READ command returns a 3 byte result    *d = data_received;        /*    //OLD CODE:    uint8_t adc_adr = 0x00, rx[3];    int32_t t0;        */    /* Start conversion */    //spiSelect(&MS5611_SPID);    //spiSend(&MS5611_SPID, 1, (void*)&adr);        /*     * Wait for conversion to complete. There doesn't appear to be any way     * to do this without timing it, unfortunately.     *     * If we just watch the clock we'll consume enormous CPU time for little     * gain. Instead we'll sleep for "roughly" 1ms and then wait until at least     * the desired 0.6ms have passed.     */   // t0 = halGetCounterValue();    //chThdSleepMilliseconds(1);    //while(halGetCounterValue() - t0 < US2RTT(600)) {   //     chThdYield();    //}    /* Deassert CS */    //spiUnselect(&MS5611_SPID);    /* Read ADC result *///    spiSelect(&MS5611_SPID);  //  spiSend(&MS5611_SPID, 1, (void*)&adc_adr);   // spiReceive(&MS5611_SPID, 3, (void*)rx);    //spiUnselect(&MS5611_SPID);   // *d = rx[0] << 16 | rx[1] << 8 | rx[2];}
开发者ID:cuspaceflight,项目名称:Woodchuck,代码行数:61,


示例18: mrb_rs_gyro_initialize

static mrb_valuemrb_rs_gyro_initialize(mrb_state *mrb, mrb_value self){	//TODO update default value with parameters	// gpio 7, 8, 9, 10, 11    unsigned int ra;    unsigned int ra2;	unsigned int rcv_data = 0;    ra=GET32(AUX_ENABLES);    ra|=2; //enable spi0    PUT32(AUX_ENABLES,ra);    ra=GET32(GPFSEL0);    ra&=~(7<<27); //gpio9	//MISO    ra|=4<<27;    //alt0    //ra|=1<<27;    //output    ra&=~(7<<24); //gpio8	//CE0    ra|=4<<24;    //alt0    ra&=~(7<<21); //gpio7	//CE1; not used    //ra|=4<<21;    //alt0    ra|=1<<21;    //output    PUT32(GPFSEL0,ra);    ra=GET32(GPFSEL1);    ra&=~(7<<0); //gpio10	//MOSI    ra|=4<<0;    //alt0    ra&=~(7<<3); //gpio11	//SCLK    ra|=4<<3;    //alt0    PUT32(GPFSEL1,ra);    *SPI_CONTROL = 0;	*SPI_CONTROL &= ~(1 << SPI_CS_CSPOL0); //LOW	*SPI_CONTROL &= ~((1 << SPI_CS_CS0) | (1 << SPI_CS_CS1));//CS0	// clear send/receive buffer	*SPI_CONTROL |= (1 << SPI_CS_CLEAR_RX) | (1 << SPI_CS_CLEAR_TX);	*SPI_CONTROL |= SPI_CS_MODE_00;    *SPI_CLK = 128;    // read "Who am I" reg(0x0F) for test    rcv_data = spi_read(0x0F);   // 0xD4 is collect    if(rcv_data != 0xd4){    	return mrb_false_value();    }    // delay 500msec    for(ra2=0;ra2<0x500000;ra2++) dummy(ra2);    spi_write(0x20, 0xCF);    spi_write(0x23, (0x01000000));    // delay 500msec    for(ra2=0;ra2<0x500000;ra2++) dummy(ra2);	return self;}
开发者ID:yamanekko,项目名称:mruby-rs-robot,代码行数:58,


示例19: RTC_read_alarm

void RTC_read_alarm(){   int8 RTC_buffer;      RTC_buffer = 0;      setup_spi(SPI_MASTER|SPI_MODE_0_0|SPI_CLK_DIV_16);      output_bit(RTC_CS, ENABLE);   RTC_buffer = spi_read(0x0A);   RTC_Al_Mon_Reg = spi_read(RTC_buffer);   RTC_Al_DOM_Reg = spi_read(RTC_buffer);   RTC_Al_Hr_Reg = spi_read(RTC_buffer);   RTC_Al_Min_Reg = spi_read(RTC_buffer);   RTC_Al_Sec_Reg = spi_read(RTC_buffer);   RTC_Flags_Reg = spi_read(RTC_buffer);   output_bit(RTC_CS, DISABLE);      RTC_Al_Mon_Reg = RTC_Al_Mon_Reg & 0b00011111;   RTC_Al_Mon_Reg = Bcd2Dec(RTC_Al_Mon_Reg);   RTC_Al_DOM_Reg = RTC_Al_DOM_Reg & 0b00111111;   RTC_Al_DOM_Reg = Bcd2Dec(RTC_Al_DOM_Reg);   RTC_Al_Hr_Reg = RTC_Al_Hr_Reg & 0b00111111;   RTC_Al_Hr_Reg = Bcd2Dec(RTC_Al_Hr_Reg);   RTC_Al_Min_Reg = RTC_Al_Min_Reg & 0b01111111;   RTC_Al_Min_Reg = Bcd2Dec(RTC_Al_Min_Reg);   RTC_Al_Sec_Reg = RTC_Al_Sec_Reg & 0b01111111;   RTC_Al_Sec_Reg = Bcd2Dec(RTC_Al_Sec_Reg);}
开发者ID:frazahod,项目名称:SUBGEN-NuLAB-EcoLAB-,代码行数:29,


示例20: EEPROM_chipErase

/********************************************************************************	The Chip Erase function will erase all bits (0xFF) in the array. **	While the device is executing the chipErase() function, the WriteInProcess() *	macro can be read to determine when the Chip Erase function is complete.********************************************************************************/void EEPROM_chipErase(){	unsigned short r_data = 0;	unsigned char r_pcs;		_EEPROM_wren();	spi_write(SPI, CE, spi_get_pcs(3),  1);	while((spi_read_status(SPI) & SPI_SR_RDRF) == 0);	spi_read(SPI, (uint16_t*) &r_data, (uint8_t*) &r_pcs);}
开发者ID:josefvargasr,项目名称:AppTemplateV1.1,代码行数:16,


示例21: enc28j60_readOp

uint8_t enc28j60_readOp(enc28j60_connection* c, uint8_t op, uint8_t address) {  uint8_t ret;    spi_cs_on(c->cs_pin);  // issue read command  spi_write(op | (address & ADDR_MASK));  // read data  ret = spi_read();  // do dummy read if needed (for mac and mii, see datasheet page 29)  if(address & 0x80)     ret = spi_read();    // release CS  spi_cs_off(c->cs_pin);    return ret;}
开发者ID:BramvdKroef,项目名称:arduino-enc28j60,代码行数:18,


示例22: spidata_read

int spidata_read(unsigned char * buffer, int len){  int result = spi_read(ctx2050_data_dev, buffer, len);  if (result < 0)  {    printk(PREFIX "data read fail %d/n", result);  }  return result;}
开发者ID:philsmd,项目名称:sharpfin,代码行数:9,


示例23: ads7843_readY

//读Y坐标的数据uint32_t ads7843_readY(int * value){    uint8_t buf[2];    buf[0] = ADS7843_CMD_READ_Y;    spi_write(&device, buf, 1, false);    spi_read(&device, buf, 2, true);    *value = ((buf[0]<<8) + buf[1])>>4; //12bit mode    return SPI_EOK;}
开发者ID:liubins313,项目名称:rt-thread-1.2.0-k60,代码行数:10,


示例24: ssp_isr

void ssp_isr(void){   if(spi_data_is_in()) {         disable_interrupts(INT_SSP);          x = spi_read();//Leitura do Valor recebido pela comunica
C++ spi_register_driver函数代码示例
C++ spi_message_init函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。