91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 262KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-01
  • 語言: 其他
  • 標簽: STM8??SPI??

資源簡介

STM8 SPI從機通訊程序,調試通過,直接可用。

資源截圖

代碼片段和文件信息

/**
??******************************************************************************
??*?@file?GPIO_IOToggle_PollingMode\main.c
??*?@brief?This?file?contains?the?main?function?for?GPIO??IOToggle_PollingMode?example.
??*?@author?STMicroelectronics?-?MCD?Application?Team
??*?@version?V1.1.0
??*?@date?02/27/2009
??******************************************************************************
??*
??*?THE?PRESENT?FIRMWARE?WHICH?IS?FOR?GUIDANCE?ONLY?AIMS?AT?PROVIDING?CUSTOMERS
??*?WITH?CODING?INFORMATION?REGARDING?THEIR?PRODUCTS?IN?ORDER?FOR?THEM?TO?SAVE
??*?TIME.?AS?A?RESULT?STMICROELECTRONICS?SHALL?NOT?BE?HELD?LIABLE?FOR?ANY
??*?DIRECT?INDIRECT?OR?CONSEQUENTIAL?DAMAGES?WITH?RESPECT?TO?ANY?CLAIMS?ARISING
??*?FROM?THE?CONTENT?OF?SUCH?FIRMWARE?AND/OR?THE?USE?MADE?BY?CUSTOMERS?OF?THE
??*?CODING?INFORMATION?CONTAINED?HEREIN?IN?CONNECTION?WITH?THEIR?PRODUCTS.
??*
??*?

©?COPYRIGHT?2009?STMicroelectronics


??*?@image?html?logo.bmp
??******************************************************************************
??*/

/*?Includes?------------------------------------------------------------------*/
#include?“stm8s.h“
#include?“define.h“
#include?“stm8s_gpio.h“
#include?“stm8s_tim4.h“
#include?“spi_slave.h“



/*?Private?macro?-------------------------------------------------------------*/
//#define?countof(a)?(sizeof(a)?/?sizeof(*(a)))
//#define??BufferSize?(countof(Tx_Buffer))


/**
??*?@addtogroup?IOToggle_PollingMode
??*?@{
??*/

/*?Private?function?prototypes?-----------------------------------------------*/
void?Delay?(u16?nCount);

/*?Private?functions?---------------------------------------------------------*/

void?Delay(u16?nCount)
{
??/*?Decrement?nCount?value?*/
??while?(nCount?!=?0)
??{
????nCount--;
??}
}

/*?Public?functions?----------------------------------------------------------*/

/**
??*?@brief?Example?firmware?main?entry?point.
??*?@par?Parameters:
??*?None
??*?@retval?void?None
??*?@par?Required?preconditions:
??*?None
??*?@par?Library?functions?called:
??*?-?GPIO_Init()
??*?-?GPIO_ReadInputData()
??*?-?GPIO_WriteHigh()
??*?-?GPIO_WriteLow()
??*/
?
u8?spidata;
u8?i;


void?main(void)
{
//懸浮輸入
??GPIO_Init(SPI_CS_PORT??SPI_CS??GPIO_MODE_IN_FL_NO_IT?);?
SPI_SLAVE_Init(); /*?SPI初始化*/

i=1;
while?(1)
??{
//spidata=SPI_SLAVE_SendByte(8);/*必須要先發一個隨機數目的讓SPI能進中斷*/
????//Delay(100);
spidata=SPI_SLAVE_SendByte(i);/*必須要先發一個隨機數目的讓SPI能進中斷*/

}
}
/**
??*?@brief?Reports?the?name?of?the?source?file?and?the?source?line?number?where
??*?the?assert?error?has?occurred.
??*?User?can?add?his?own?implementation?to?report?the?file?name?and?line?number.
??*?ex:?printf(“Wrong?parameters?value:?file?%s?on?line?%d\r\n“?file?line)
??*?@retval?void?None
??*?@par?Required?preconditions:
??*?None
??*?@par?Called?functions:
??*?None
??*/
#ifdef?FULL_ASSERT
void?assert_failed(u8?*file?u16?line)
#else
void?assert_failed(v

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????1954??2015-03-23?13:46??STM_SPI_SLAVE\stm8_interrupt_vector.c

?????文件????????292??2015-03-20?16:03??STM_SPI_SLAVE\checkres.spy

?????文件???????1794??2015-03-27?10:59??STM_SPI_SLAVE\wirestm.dep

?????文件??????13153??2015-03-20?16:03??STM_SPI_SLAVE\wirestm.stp

?????文件????????203??2015-03-27?10:59??STM_SPI_SLAVE\WireSTM.stw

?????文件????????906??2015-03-27?10:30??STM_SPI_SLAVE\wirestm.pdb

?????文件??????96842??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s.h

?????文件??????13654??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_adc1.h

?????文件??????11029??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_adc2.h

?????文件???????4873??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_awu.h

?????文件???????3474??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_beep.h

?????文件??????24992??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_can.h

?????文件??????17672??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_clk.h

?????文件???????4566??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_exti.h

?????文件??????12201??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_flash.h

?????文件???????6289??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_gpio.h

?????文件??????15333??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_i2c.h

?????文件???????5008??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_itc.h

?????文件???????4580??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_iwdg.h

?????文件???????2809??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_rst.h

?????文件??????12769??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_spi.h

?????文件??????24970??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_tim1.h

?????文件??????13568??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_tim2.h

?????文件??????12475??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_tim3.h

?????文件???????5133??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_tim4.h

?????文件??????18985??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_tim5.h

?????文件???????9165??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_tim6.h

?????文件???????3453??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_type.h

?????文件??????15112??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_uart1.h

?????文件??????17364??2009-03-02?10:00??STM_SPI_SLAVE\library\inc\stm8s_uart2.h

............此處省略68個文件信息

評論

共有 條評論