Initial commit
mbed-dev-master/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F437xG/TARGET_UBLOX_C030/min_battery_voltage.h@0:bb348c97df44, 2020-09-16 (annotated)
- Committer:
- lypinator
- Date:
- Wed Sep 16 01:11:49 2020 +0000
- Revision:
- 0:bb348c97df44
Added PWM
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lypinator | 0:bb348c97df44 | 1 | /* mbed Microcontroller Library |
lypinator | 0:bb348c97df44 | 2 | * Copyright (c) 2006-2017 ARM Limited |
lypinator | 0:bb348c97df44 | 3 | * |
lypinator | 0:bb348c97df44 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
lypinator | 0:bb348c97df44 | 5 | * you may not use this file except in compliance with the License. |
lypinator | 0:bb348c97df44 | 6 | * You may obtain a copy of the License at |
lypinator | 0:bb348c97df44 | 7 | * |
lypinator | 0:bb348c97df44 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
lypinator | 0:bb348c97df44 | 9 | * |
lypinator | 0:bb348c97df44 | 10 | * Unless required by applicable law or agreed to in writing, software |
lypinator | 0:bb348c97df44 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
lypinator | 0:bb348c97df44 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
lypinator | 0:bb348c97df44 | 13 | * See the License for the specific language governing permissions and |
lypinator | 0:bb348c97df44 | 14 | * limitations under the License. |
lypinator | 0:bb348c97df44 | 15 | */ |
lypinator | 0:bb348c97df44 | 16 | |
lypinator | 0:bb348c97df44 | 17 | #ifndef MIN_BATTERY_VOLTAGE_H |
lypinator | 0:bb348c97df44 | 18 | #define MIN_BATTERY_VOLTAGE_H |
lypinator | 0:bb348c97df44 | 19 | |
lypinator | 0:bb348c97df44 | 20 | #include "hal/i2c_api.h" |
lypinator | 0:bb348c97df44 | 21 | |
lypinator | 0:bb348c97df44 | 22 | #ifdef __cplusplus |
lypinator | 0:bb348c97df44 | 23 | extern"C"{ |
lypinator | 0:bb348c97df44 | 24 | #endif |
lypinator | 0:bb348c97df44 | 25 | |
lypinator | 0:bb348c97df44 | 26 | #define BQ24295_I2C_ADDRESS (0x6B) |
lypinator | 0:bb348c97df44 | 27 | #define I2C_FREQUENCY 100000 |
lypinator | 0:bb348c97df44 | 28 | #define MIN_BATTERY_VOLTAGE_MASK (0x87) |
lypinator | 0:bb348c97df44 | 29 | |
lypinator | 0:bb348c97df44 | 30 | /** Initializes an instance of class BatteryChargerI2c which is using the STM HAL I2C APIs |
lypinator | 0:bb348c97df44 | 31 | * This allows longer USB cables or USB ports with lower output voltages to power the board correctly. |
lypinator | 0:bb348c97df44 | 32 | */ |
lypinator | 0:bb348c97df44 | 33 | |
lypinator | 0:bb348c97df44 | 34 | void set_minimum_battery_voltage(void); |
lypinator | 0:bb348c97df44 | 35 | char read_from_i2c(int slave_addr, int reg_addr, int* data_read, i2c_t i2c_obj); |
lypinator | 0:bb348c97df44 | 36 | char write_to_i2c(int slave_addr, int reg_addr,int data_write, i2c_t i2c_obj); |
lypinator | 0:bb348c97df44 | 37 | |
lypinator | 0:bb348c97df44 | 38 | #ifdef __cplusplus |
lypinator | 0:bb348c97df44 | 39 | } |
lypinator | 0:bb348c97df44 | 40 | #endif |
lypinator | 0:bb348c97df44 | 41 | |
lypinator | 0:bb348c97df44 | 42 | #endif // MIN_BATTERY_VOLTAGE_H |