Skip to content

Commit 57ab2fc

Browse files
committed
Correct typos in comments and documentation
1 parent 5395cdd commit 57ab2fc

File tree

8 files changed

+38
-38
lines changed

8 files changed

+38
-38
lines changed

examples/BatteryCharger/BatteryCharger.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
Battery charge Example
2+
Battery Charge Example
33
44
This example shows how to configure and enable charge mode on Arduino MKR boards
55
66
Circuit:
77
- Arduino MKR board
8-
- 750 mAh lipo battery
8+
- 750 mAh LiPo battery
99
1010
created 21 Aug 2019
1111
by Riccardo Rizzo
@@ -46,8 +46,8 @@ void setup() {
4646
}
4747

4848
// Set the charge current to 375 mA
49-
// the charge current should be definde as maximum at (C for hour)/2h
50-
// to avoid battery explosion (for example for a 750mAh battery set to 0.375 A)
49+
// the charge current should be defined as maximum at (C for hour)/2h
50+
// to avoid battery explosion (for example for a 750 mAh battery set to 0.375 A)
5151
if (!PMIC.setChargeCurrent(0.375)) {
5252
Serial.println("Error in set charge current");
5353
}
@@ -77,4 +77,4 @@ void loop() {
7777
//isbatteryconnected = false;
7878
}
7979
delay(100);
80-
}
80+
}

examples/BatteryChargerInterrupt/BatteryChargerInterrupt.ino

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
Battery charge Interrupt Example
2+
Battery Charge Interrupt Example
33
44
This example shows how to configure and enable charge mode on Arduino MKR boards
55
66
Circuit:
77
- Arduino MKR board
8-
- 750 mAh lipo battery
8+
- 750 mAh LiPo battery
99
1010
created 21 Aug 2019
1111
by Riccardo Rizzo
@@ -15,15 +15,15 @@
1515

1616
#include <Arduino_PMIC.h>
1717

18-
volatile unsigned long time_last_interrurpt = millis();
18+
volatile unsigned long time_last_interrupt = millis();
1919

2020
void setup() {
2121
Serial.begin(9600);
2222
while (!Serial) {
2323
; // wait for serial port to connect. Needed for native USB port only
2424
}
2525

26-
// Attach the PMIC irq pin
26+
// Attach the PMIC IRQ pin
2727
attachInterrupt(digitalPinToInterrupt(PMIC_IRQ_PIN), batteryConnected, FALLING);
2828

2929
if (!PMIC.begin()) {
@@ -51,7 +51,7 @@ void setup() {
5151
}
5252

5353
// Set the charge current to 375 mA
54-
// the charge current should be definde as maximum at (C for hour)/2h
54+
// the charge current should be defined as maximum at (C for hour)/2h
5555
// to avoid battery explosion (for example for a 750mAh battery set to 0.375 A)
5656
if (!PMIC.setChargeCurrent(0.375)) {
5757
Serial.println("Error in set charge current");
@@ -60,7 +60,7 @@ void setup() {
6060
}
6161

6262
void loop() {
63-
if (millis() - time_last_interrurpt > 100) {
63+
if (millis() - time_last_interrupt > 100) {
6464
// Enable the Charger
6565
if (!PMIC.enableCharge()) {
6666
Serial.println("Error enabling Charge mode");
@@ -93,5 +93,5 @@ void loop() {
9393
}
9494

9595
void batteryConnected() {
96-
time_last_interrurpt = millis();
97-
}
96+
time_last_interrupt = millis();
97+
}

examples/PMICBoostMode/PMICBoostMode.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
PMIC Boost mode Example
2+
PMIC Boost Mode Example
33
44
This example shows how to enable boost mode on Arduino MKR boards
55
@@ -20,15 +20,15 @@ int usb_mode = UNKNOWM_MODE;
2020
void setup()
2121
{
2222
// Serial1 shall be used to print messages because the programming
23-
// Port is busy by the guest device
23+
// port is busy with the guest device
2424
Serial1.begin(9600);
2525
if (!PMIC.begin()) {
2626
Serial1.println("Failed to initialize PMIC!");
2727
while (1);
2828
}
2929

30-
// Enable boost mode, this mode allow to use the board as host and
31-
// connect guest device like keyboard
30+
// Enable boost mode, this mode allows using the board as host to
31+
// connect a guest device such as a keyboard
3232
if (!PMIC.enableBoostMode()) {
3333
Serial1.println("Error enabling Boost Mode");
3434
}
@@ -40,9 +40,9 @@ void loop() {
4040
if (actual_mode != usb_mode) {
4141
usb_mode = actual_mode;
4242
if (actual_mode == BOOST_MODE) {
43-
// if the boost mode was correctly enabled 5V should appear on 5V pin
43+
// if the boost mode was correctly enabled, 5 V should appear on 5V pin
4444
// and on the USB connector
4545
Serial1.println("Boost mode status enabled");
4646
}
4747
}
48-
}
48+
}

examples/PMICFaultCheck/PMICFaultCheck.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
PMIC fault Check Example
2+
PMIC Fault Check Example
33
44
This example shows how to check the PMIC fault states
55
@@ -37,7 +37,7 @@ void loop() {
3737
break;
3838
case THERMAL_SHUTDOWN: Serial.println("Thermal shutdown occurred");
3939
break;
40-
case CHARGE_SAFETY_TIME_EXPIRED: Serial.println("Charge safetly timer expired");
40+
case CHARGE_SAFETY_TIME_EXPIRED: Serial.println("Charge safety timer expired");
4141
break;
4242
case NO_CHARGE_FAULT: Serial.println("No Charge fault");
4343
break;
@@ -62,4 +62,4 @@ void loop() {
6262
break;
6363
default: break;
6464
}
65-
}
65+
}

keywords.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#######################################
2-
# Syntax Coloring Map For Arduino_PMIC
2+
# Syntax Coloring Map For Arduino_BQ24195
33
#######################################
44
# Class
55
#######################################
@@ -73,4 +73,4 @@ USB_HOST_MODE LITERAL1
7373
ADAPTER_PORT_MODE LITERAL1
7474
BOOST_MODE LITERAL1
7575

76-
PMIC_IRQ_PIN LITERAL1
76+
PMIC_IRQ_PIN LITERAL1

src/Arduino_PMIC.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
This file is part of the Arduino_PMIC library.
2+
This file is part of the Arduino_BQ24195 library.
33
Copyright (c) 2019 Arduino SA. All rights reserved.
44
55
This library is free software; you can redistribute it and/or

src/BQ24195.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
This file is part of the Arduino_PMIC library.
2+
This file is part of the Arduino_BQ24195 library.
33
Copyright (c) 2019 Arduino SA. All rights reserved.
44
55
This library is free software; you can redistribute it and/or
@@ -147,7 +147,7 @@ bool PMICClass::enableCharge() {
147147

148148
/*******************************************************************************
149149
* Function Name : enableBoostMode
150-
* Description : Enables PMIC boost mode, allow to generate 5V from battery
150+
* Description : Enables PMIC boost mode, allow to generate 5 V from battery
151151
* Input : NONE
152152
* Return : 0 on Error, 1 on Success
153153
*******************************************************************************/
@@ -278,10 +278,10 @@ bool PMICClass::setInputVoltageLimit(float voltage) {
278278
voltage = 3.88;
279279
}
280280

281-
// round(((desired voltage - base_voltage_offset) / minimum_votage_value) * LSB value)
281+
// round(((desired voltage - base_voltage_offset) / minimum_voltage_value) * LSB value)
282282
// where:
283283
// - BASE_VOLTAGE_OFFSET = 3.88 V;
284-
// - minimum_votage_value = 0.008 V (80 mV);
284+
// - minimum_voltage_value = 0.008 V (80 mV);
285285
// - LSB value = 8;
286286
// after mask with & 0x78 to set only the input voltage bits
287287
return writeRegister(INPUT_SOURCE_REGISTER, (mask | (round((voltage - 3.88) * 100) & 0x78)));
@@ -543,7 +543,7 @@ bool PMICClass::resetWatchdog() {
543543
/*******************************************************************************
544544
* Function Name : setMinimumSystemVoltage
545545
* Description : Set the minimum acceptable voltage to feed the onboard
546-
mcu and module
546+
MCU and module
547547
* Input : Minimum system voltage in Volt
548548
* Return : 0 Error, 1 Success
549549
*******************************************************************************/
@@ -887,7 +887,7 @@ bool PMICClass::disableBATFET(void) {
887887
* Function Name : enableChargeFaultINT
888888
* Description : Enable interrupt during Charge fault
889889
* Input : NONE
890-
* Return : 0 on Error, 1 on Succes
890+
* Return : 0 on Error, 1 on Success
891891
*******************************************************************************/
892892
bool PMICClass::enableChargeFaultINT() {
893893
int DATA = readRegister(MISC_CONTROL_REGISTER);
@@ -905,7 +905,7 @@ bool PMICClass::enableChargeFaultINT() {
905905
* Function Name : disableChargeFaultINT
906906
* Description : Disable interrupt during Charge fault
907907
* Input : NONE
908-
* Return : 0 on Error, 1 on Succes
908+
* Return : 0 on Error, 1 on Success
909909
*******************************************************************************/
910910
bool PMICClass::disableChargeFaultINT() {
911911
int DATA = readRegister(MISC_CONTROL_REGISTER);
@@ -923,7 +923,7 @@ bool PMICClass::disableChargeFaultINT() {
923923
* Function Name : enableBatFaultINT
924924
* Description : Enable interrupt during battery fault
925925
* Input : NONE
926-
* Return : 0 on Error, 1 on Succes
926+
* Return : 0 on Error, 1 on Success
927927
*******************************************************************************/
928928
bool PMICClass::enableBatFaultINT(){
929929
int DATA = readRegister(MISC_CONTROL_REGISTER);
@@ -941,7 +941,7 @@ bool PMICClass::enableBatFaultINT(){
941941
* Function Name : disableBatFaultINT
942942
* Description : Disable interrupt during battery fault
943943
* Input : NONE
944-
* Return : 0 on Error, 1 on Succes
944+
* Return : 0 on Error, 1 on Success
945945
*******************************************************************************/
946946
bool PMICClass::disableBatFaultINT() {
947947
int DATA = readRegister(MISC_CONTROL_REGISTER);
@@ -1024,7 +1024,7 @@ bool PMICClass::isPowerGood(void) {
10241024
* Function Name : isHot
10251025
* Description : Check if is in Thermal Regulation
10261026
* Input : NONE
1027-
* Return : 0 on Nomral state, 1 on Thermal Regulation state
1027+
* Return : 0 on Normal state, 1 on Thermal Regulation state
10281028
*******************************************************************************/
10291029
bool PMICClass::isHot(void) {
10301030

@@ -1087,7 +1087,7 @@ bool PMICClass::isBattConnected(void) {
10871087
}
10881088

10891089
/*******************************************************************************
1090-
* Function Name : readSystemStatusRegeister
1090+
* Function Name : readSystemStatusRegister
10911091
* Description : Query the PMIC and returns the System Status Register value
10921092
* Input : NONE
10931093
* Return : -1 on Error, System Status Register byte on Success
@@ -1236,4 +1236,4 @@ int PMICClass::writeRegister(byte address, byte val) {
12361236
return 1;
12371237
}
12381238

1239-
PMICClass PMIC(Wire);
1239+
PMICClass PMIC(Wire);

src/BQ24195.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
This file is part of the Arduino_PMIC library.
2+
This file is part of the Arduino_BQ24195 library.
33
Copyright (c) 2019 Arduino SA. All rights reserved.
44
55
This library is free software; you can redistribute it and/or

0 commit comments

Comments
 (0)