|
InPlay API
|
HAL SYNC7816. More...
Functions | |
| void * | hal_sync7816_open (sync7816_init_t *init) |
| Init sync7816 device. More... | |
| void | hal_sync7816_close (void *dev) |
| Close sync7816 device. More... | |
| void | hal_sync7816_stop (void *dev) |
| Send stop signal to device. More... | |
| int | hal_sync7816_answer_to_rst (void *dev, uint32_t *pval) |
| Get answer to reset. More... | |
| int | fm4428_read_cmd (void *dev, uint32_t cmd, uint32_t addr, uint32_t *rx_data, uint32_t rx_len) |
| Send read command for fm4428 chip. More... | |
| int | fm4428_read_byte (void *dev, uint32_t addr, int protect, uint8_t *rx_data) |
| Read one byte for fm4428 chip. More... | |
| int | fm4428_write_cmd (void *dev, uint32_t cmd, uint32_t addr, uint8_t data, uint32_t wait_clk) |
| Send write command for fm4428 chip. More... | |
| int | fm4428_write_byte (void *dev, uint32_t addr, uint8_t data) |
| Write one byte for fm4428 chip. More... | |
| int | fm4428_unlock (void *dev, uint8_t psc1, uint8_t psc2) |
| Unlock fm4428 chip for write. More... | |
| int | fm4442_read_cmd (void *dev, uint32_t cmd, uint32_t addr, uint32_t *rx_data, uint32_t rx_len) |
| Send read command for fm4442 chip. More... | |
| int | fm4442_write_cmd (void *dev, uint32_t cmd, uint32_t addr, uint8_t data) |
| Send write command for fm4442 chip. More... | |
HAL SYNC7816.
| int fm4428_read_byte | ( | void * | dev, |
| uint32_t | addr, | ||
| int | protect, | ||
| uint8_t * | rx_data | ||
| ) |
Read one byte for fm4428 chip.
| [in] | dev | Sync7816 device struct |
| [in] | addr | Address |
| [in] | protect | 1 is protect, 0 is not protect. |
| [out] | rx_data | Data that read out from bus |
| int fm4428_read_cmd | ( | void * | dev, |
| uint32_t | cmd, | ||
| uint32_t | addr, | ||
| uint32_t * | rx_data, | ||
| uint32_t | rx_len | ||
| ) |
Send read command for fm4428 chip.
| [in] | dev | Sync7816 device struct |
| [in] | cmd | Command |
| [in] | addr | Address |
| [out] | rx_data | Data that read out from bus |
| [in] | rx_len | Rx bit length. Max value is 32 bit. |
| int fm4428_unlock | ( | void * | dev, |
| uint8_t | psc1, | ||
| uint8_t | psc2 | ||
| ) |
Unlock fm4428 chip for write.
| [in] | dev | Sync7816 device struct |
| [in] | psc1 | psc1 code |
| [in] | psc2 | psc2 code |
| int fm4428_write_byte | ( | void * | dev, |
| uint32_t | addr, | ||
| uint8_t | data | ||
| ) |
Write one byte for fm4428 chip.
| [in] | dev | Sync7816 device struct |
| [in] | addr | Address |
| [in] | data | Data that write to bus |
| int fm4428_write_cmd | ( | void * | dev, |
| uint32_t | cmd, | ||
| uint32_t | addr, | ||
| uint8_t | data, | ||
| uint32_t | wait_clk | ||
| ) |
Send write command for fm4428 chip.
| [in] | dev | Sync7816 device struct |
| [in] | cmd | Command |
| [in] | addr | Address |
| [in] | data | Data that write to bus |
| [in] | wait_clk | Wait clock for operation finish |
| int fm4442_read_cmd | ( | void * | dev, |
| uint32_t | cmd, | ||
| uint32_t | addr, | ||
| uint32_t * | rx_data, | ||
| uint32_t | rx_len | ||
| ) |
Send read command for fm4442 chip.
| [in] | dev | Sync7816 device struct |
| [in] | cmd | Command |
| [in] | addr | Address |
| [out] | rx_data | Data that read out from bus |
| [in] | rx_len | Rx bit length. Max value is 16 bit. |
| int fm4442_write_cmd | ( | void * | dev, |
| uint32_t | cmd, | ||
| uint32_t | addr, | ||
| uint8_t | data | ||
| ) |
Send write command for fm4442 chip.
| [in] | dev | Sync7816 device struct |
| [in] | cmd | Command |
| [in] | addr | Address |
| [in] | data | Data that write to bus |
| int hal_sync7816_answer_to_rst | ( | void * | dev, |
| uint32_t * | pval | ||
| ) |
Get answer to reset.
| [in] | dev | sync7816 device struct |
| [out] | pval | data pointer of answer to reset |
| void hal_sync7816_close | ( | void * | dev | ) |
Close sync7816 device.
| [in] | dev | sync7816 device struct |
| void* hal_sync7816_open | ( | sync7816_init_t * | init | ) |
Init sync7816 device.
| [in] | init | Initial parameters, see sync7816_init_t |
| void hal_sync7816_stop | ( | void * | dev | ) |
Send stop signal to device.
| [in] | dev | sync7816 device struct |