URL
https://opencores.org/ocsvn/neorv32/neorv32/trunk
[/] [neorv32/] [trunk/] [sw/] [lib/] [source/] [neorv32_twi.c] - Diff between revs 12 and 23
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 12 |
Rev 23 |
Line 110... |
Line 110... |
TWI_CT &= ~((uint32_t)(1 << TWI_CT_MACK));
|
TWI_CT &= ~((uint32_t)(1 << TWI_CT_MACK));
|
}
|
}
|
|
|
|
|
/**********************************************************************//**
|
/**********************************************************************//**
|
|
* Check if TWI is busy.
|
|
*
|
|
* @note This function is blocking.
|
|
*
|
|
* @return 0 if idle, 1 if busy
|
|
**************************************************************************/
|
|
int neorv32_twi_busy(void) {
|
|
|
|
if (TWI_CT & (1 << TWI_CT_BUSY)) {
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
/**********************************************************************//**
|
* Generate START condition and send first byte (address including R/W bit).
|
* Generate START condition and send first byte (address including R/W bit).
|
*
|
*
|
* @note Blocking function.
|
* @note Blocking function.
|
*
|
*
|
* @param[in] a Data byte including 7-bit address and R/W-bit (lsb).
|
* @param[in] a Data byte including 7-bit address and R/W-bit (lsb).
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.