Browse Source

正常的

simulating_SPI_by_software
tianjialong 2 years ago
parent
commit
650b9f173d
  1. 28
      app/MDK-ARM/app.uvguix.29643
  2. 13
      usersrc/usermain.c

28
app/MDK-ARM/app.uvguix.29643
File diff suppressed because it is too large
View File

13
usersrc/usermain.c

@ -70,19 +70,12 @@ void set_spi_table_sel(uint8_t startoff)
void set_spi_table_sck(uint8_t startoff)
{
bool clocklevel = true;
bool clocklevel = false;
for (size_t i = 0; i < spi_table_type_size; i++)
{
if (i < startoff)
{
if (i == (startoff - 1))
{
table[SPI_SCK_TYPE][i] = 0;
}
else
{
table[SPI_SCK_TYPE][i] = 1;
}
table[SPI_SCK_TYPE][i] = 1;
}
else if (i >= startoff && i < (startoff + 32))
{
@ -134,7 +127,7 @@ void dotable(uint8_t txdata)
set_spi_table_sel(sel_startoff);
set_spi_table_sck(clock_startoff);
// set_spi_table_mosi(mosi_startoff, txdata);
set_spi_table_mosi(mosi_startoff, txdata);
for (size_t i = 0; i < spi_table_type_size; i++)
{

Loading…
Cancel
Save