mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
The temperature calculation currently uses fixed point operations. Change it to use floating point for better readability and maintenance. Also changes disable_fpu() to accept parameter which serves as optimization barrier to prevent floating point operations after disabling FPU. BUG=chrome-os-partner:7801 TEST=In console, tempremote "tempremote 29715 -105000 6390" gives 28506. Change-Id: Ib766904b8feb9a78eac9f7cd53afeca85091c5a5 Signed-off-by: Vic Yang <victoryang@chromium.org>
20 lines
617 B
C
20 lines
617 B
C
/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/* FPU module for Chrome EC operating system */
|
|
|
|
#ifndef __EC_FPU_H
|
|
#define __EC_FPU_H
|
|
|
|
/* Enables FPU. Note that this function also disables interrupt. */
|
|
void enable_fpu(void);
|
|
|
|
/* Disables FPU. This function also enables interrupt.
|
|
* The value passed in serves as optimization barrier. This value would be
|
|
* calculated before FPU is disabled regardless of compiler optimization. */
|
|
void disable_fpu(int32_t);
|
|
|
|
#endif /* __EC_FPU_H */
|