mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			code style fix #2
							parent
							
								
									d18735dd31
								
							
						
					
					
						commit
						0430b94896
					
				| 
						 | 
				
			
			@ -135,7 +135,9 @@ float analogin_read(analogin_t *obj){
 | 
			
		|||
    uint32_t AnaloginDatMsk      = 0xFFFF;
 | 
			
		||||
    uint8_t  AnaloginIdx         = 0;
 | 
			
		||||
    uint32_t AnalogDat           = 0;
 | 
			
		||||
    uint32_t Offset = 0x2980;
 | 
			
		||||
 | 
			
		||||
    //no auto-calibration implemented yet, uses hard coded calibrate
 | 
			
		||||
    uint32_t Offset        = 0x2980;
 | 
			
		||||
    uint32_t AnalogDatFull = 0xAA00;
 | 
			
		||||
 | 
			
		||||
    PSAL_ADC_MNGT_ADPT      pSalADCMngtAdpt     = NULL;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -81,8 +81,6 @@ void flash_init(flash_t *obj)
 | 
			
		|||
    }
 | 
			
		||||
    flashobj.SpicInitPara.flashtype = SpicInitParaAllClk[0][0].flashtype;
 | 
			
		||||
    
 | 
			
		||||
    //DBG_8195A("Flash ID is = %x %x %x \n",SpicInitParaAllClk[0][0].id[0],SpicInitParaAllClk[0][0].id[1],SpicInitParaAllClk[0][0].id[2]);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
void flash_turnon()
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -474,7 +472,7 @@ int  flash_burst_read(flash_t *obj, uint32_t address, uint32_t Length, uint8_t *
 | 
			
		|||
 | 
			
		||||
    // Wait flash busy done (wip=0)
 | 
			
		||||
    SpicWaitWipDoneRefinedRtl8195A(flashobj.SpicInitPara);
 | 
			
		||||
    SpicUserReadRtl8195A(Length, address, data,SpicOneBitMode);
 | 
			
		||||
    SpicUserReadRtl8195A(Length, address, data, SpicOneBitMode);
 | 
			
		||||
    SpicDisableRtl8195A();
 | 
			
		||||
    return 1;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -554,17 +554,6 @@ int i2c_slave_write(i2c_t *obj, const char *data, int length) {
 | 
			
		|||
    return 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/** \brief Description of i2c_slave_set_for_rd_req
 | 
			
		||||
 *  
 | 
			
		||||
 *    i2c_slave_set_for_rd_req is used to set/clear i2c slave RD_REQ interrupt mask.
 | 
			
		||||
 *    If RD_REQ interrupt is set, slave could invoke read request callback when it gets 
 | 
			
		||||
 *    a read command from other i2c master.
 | 
			
		||||
 *    
 | 
			
		||||
 *   \param i2c_t *obj  : i2c object
 | 
			
		||||
 *   \param int set     : set or clear for read request. Once it's set, i2c would invoke read request callback when a
 | 
			
		||||
 *                        read command is sent to it.
 | 
			
		||||
 *   \return result
 | 
			
		||||
 */
 | 
			
		||||
#endif // CONFIG_I2C_SLAVE_EN
 | 
			
		||||
 | 
			
		||||
#endif // CONFIG_I2C_EN
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -66,12 +66,12 @@ uint32_t us_ticker_read()
 | 
			
		|||
 | 
			
		||||
    tick_cnt = HalTimerOp.HalTimerReadCount(SYS_TIM_ID);
 | 
			
		||||
    tick_cnt = 0xffffffff - tick_cnt;   // it's a down counter
 | 
			
		||||
    ticks_125ms = tick_cnt/(GTIMER_CLK_HZ/8);
 | 
			
		||||
    ticks_remain = tick_cnt - (ticks_125ms*(GTIMER_CLK_HZ/8));
 | 
			
		||||
    us_tick = ticks_125ms * 125000;
 | 
			
		||||
    us_tick += (ticks_remain * 1000000)/GTIMER_CLK_HZ;
 | 
			
		||||
    ticks_125ms = tick_cnt/(GTIMER_CLK_HZ/8);  //use 125ms as a intermediate unit; 
 | 
			
		||||
    ticks_remain = tick_cnt - (ticks_125ms*(GTIMER_CLK_HZ/8));  //calculate the remainder
 | 
			
		||||
    us_tick = ticks_125ms * 125000;  //change unit to us, 125ms is 125000 us
 | 
			
		||||
    us_tick += (ticks_remain * 1000000)/GTIMER_CLK_HZ;  //also use us as unit
 | 
			
		||||
 | 
			
		||||
    return ((uint32_t)us_tick);
 | 
			
		||||
    return ((uint32_t)us_tick);  //return ticker value in micro-seconds (us)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void us_ticker_set_interrupt(timestamp_t timestamp) 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue