mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			Add i2c_init_direct() function to HAL API
							parent
							
								
									bbd90b604b
								
							
						
					
					
						commit
						618bd18ef5
					
				| 
						 | 
				
			
			@ -64,6 +64,14 @@ enum {
 | 
			
		|||
    I2C_ERROR_BUS_BUSY = -2
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    int peripheral;
 | 
			
		||||
    PinName sda_pin;
 | 
			
		||||
    int sda_function;
 | 
			
		||||
    PinName scl_pin;
 | 
			
		||||
    int scl_function;
 | 
			
		||||
} i2c_pinmap_t;
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			@ -136,6 +144,14 @@ extern "C" {
 | 
			
		|||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/** Initialize the I2C peripheral. It sets the default parameters for I2C
 | 
			
		||||
 *  peripheral, and configures its specifieds pins.
 | 
			
		||||
 *
 | 
			
		||||
 *  @param obj  The I2C object
 | 
			
		||||
 *  @param pinmap  Pinmap pointer to strucure which holds static pinmap
 | 
			
		||||
 */
 | 
			
		||||
void i2c_init_direct(i2c_t *obj, const i2c_pinmap_t *pinmap);
 | 
			
		||||
 | 
			
		||||
/** Initialize the I2C peripheral. It sets the default parameters for I2C
 | 
			
		||||
 *  peripheral, and configures its specifieds pins.
 | 
			
		||||
 *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue