struct ID { uint8_t manufacturer; /**< Manufacturer id **/ uint8_t device[2]; /**< Device id **/ uint8_t extendedInfoLength; /**< Extended device information string length **/ };
void ATD45DB161D::ReadManufacturerAndDeviceID(struct ATD45DB161D::ID *id) { DF_CS_inactive; /* Make sure to toggle CS signal in order */ DF_CS_active; /* to reset Dataflash command decoder */ /* Send status read command */ spi_transfer(AT45DB161D_READ_MANUFACTURER_AND_DEVICE_ID);
/* Manufacturer ID */ id->manufacturer = spi_transfer(0xff); /* Device ID (part 1) */ id->device[0] = spi_transfer(0xff); /* Device ID (part 2) */ id->device[1] = spi_transfer(0xff); /* Extended Device Information String Length */ id->extendedInfoLength = spi_transfer(0xff); }
->这个符号好像keil不实,这是为什末呢
|