mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			- Added definiton for i2c_reset;
- Removed unneeded code from i2c and serial modules.pull/5144/head
							parent
							
								
									86639587dd
								
							
						
					
					
						commit
						7cf9bf5c3d
					
				| 
						 | 
				
			
			@ -191,7 +191,14 @@ int i2c_write(i2c_t *obj, int address, const char *data, int length, int stop)
 | 
			
		|||
 | 
			
		||||
void i2c_reset(i2c_t *obj)
 | 
			
		||||
{
 | 
			
		||||
    return;
 | 
			
		||||
    ADI_I2C_RESULT      I2C_Return;
 | 
			
		||||
    ADI_I2C_HANDLE      I2C_Handle = *obj->pI2C_Handle;
 | 
			
		||||
 | 
			
		||||
    I2C_Return = adi_i2c_Reset(I2C_Handle);
 | 
			
		||||
    if (I2C_Return) {
 | 
			
		||||
        obj->error = I2C_EVENT_ERROR;
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -206,33 +213,4 @@ int i2c_byte_write(i2c_t *obj, int data)
 | 
			
		|||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if DEVICE_I2CSLAVE
 | 
			
		||||
void i2c_slave_mode(i2c_t *obj, int enable_slave)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int i2c_slave_receive(i2c_t *obj)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int i2c_slave_read(i2c_t *obj, char *data, int length)
 | 
			
		||||
{
 | 
			
		||||
    return length;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int i2c_slave_write(i2c_t *obj, const char *data, int length)
 | 
			
		||||
{
 | 
			
		||||
    return length;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void i2c_slave_address(i2c_t *obj, int idx, uint32_t address, uint32_t mask)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
#endif  // #if DEVICE_I2CSLAVE
 | 
			
		||||
 | 
			
		||||
#endif  // #if DEVICE_I2C
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -302,44 +302,6 @@ void serial_break_clear(serial_t *obj)
 | 
			
		|||
    adi_uart_ForceTxBreak(hDevice[obj->index], false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#if DEVICE_SERIAL_ASYNCH
 | 
			
		||||
uint8_t serial_tx_active(serial_t *obj)
 | 
			
		||||
{
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uint8_t serial_rx_active(serial_t *obj)
 | 
			
		||||
{
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int serial_irq_handler_asynch(serial_t *obj)
 | 
			
		||||
{
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int serial_tx_asynch(serial_t *obj, const void *tx, size_t tx_length, uint8_t tx_width, uint32_t handler, uint32_t event, DMAUsage hint)
 | 
			
		||||
{
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void serial_rx_asynch(serial_t *obj, void *rx, size_t rx_length, uint8_t rx_width, uint32_t handler, uint32_t event, uint8_t char_match, DMAUsage hint)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void serial_tx_abort_asynch(serial_t *obj)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void serial_rx_abort_asynch(serial_t *obj)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
void serial_irq_handler(serial_t *obj, uart_irq_handler handler, uint32_t id)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue