mirror of
https://github.com/HwzLoveDz/AXP202-PMIC.git
synced 2026-11-18 06:49:21 +00:00
example
This commit is contained in:
parent
c5bfeec8a5
commit
e7a4a4ba2a
Binary file not shown.
@ -24,7 +24,7 @@ SOFTWARE.
|
|||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
#include <axp20x.h>
|
#include <axp20x.h>
|
||||||
|
|
||||||
AXP20X_Class axp;
|
// AXP20X_Class axp;
|
||||||
|
|
||||||
const uint8_t i2c_sda = 21;
|
const uint8_t i2c_sda = 21;
|
||||||
const uint8_t i2c_scl = 22;
|
const uint8_t i2c_scl = 22;
|
||||||
@ -34,7 +34,7 @@ void setup()
|
|||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
Wire.begin(i2c_sda, i2c_scl);
|
Wire.begin(i2c_sda, i2c_scl);
|
||||||
|
|
||||||
int ret = axp.begin(Wire);
|
int ret = axp.begin(Wire, 0x34);
|
||||||
|
|
||||||
if (ret == AXP_FAIL) {
|
if (ret == AXP_FAIL) {
|
||||||
Serial.println("AXP Power begin failed");
|
Serial.println("AXP Power begin failed");
|
||||||
|
|||||||
@ -24,7 +24,7 @@ SOFTWARE.
|
|||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
#include <axp20x.h>
|
#include <axp20x.h>
|
||||||
|
|
||||||
AXP20X_Class axp;
|
// AXP20X_Class axp;
|
||||||
|
|
||||||
const uint8_t i2c_sda = 21;
|
const uint8_t i2c_sda = 21;
|
||||||
const uint8_t i2c_scl = 22;
|
const uint8_t i2c_scl = 22;
|
||||||
|
|||||||
@ -25,7 +25,7 @@ SOFTWARE.
|
|||||||
#include <axp20x.h>
|
#include <axp20x.h>
|
||||||
|
|
||||||
|
|
||||||
AXP20X_Class axp;
|
// AXP20X_Class axp;
|
||||||
bool axpIrq = 0;
|
bool axpIrq = 0;
|
||||||
uint8_t second = 0;
|
uint8_t second = 0;
|
||||||
uint32_t timer = 0;
|
uint32_t timer = 0;
|
||||||
|
|||||||
@ -24,7 +24,7 @@ SOFTWARE.
|
|||||||
|
|
||||||
#include "axp20x.h"
|
#include "axp20x.h"
|
||||||
|
|
||||||
AXP20X_Class axp;
|
// AXP20X_Class axp;
|
||||||
const uint8_t i2c_sda = 21;
|
const uint8_t i2c_sda = 21;
|
||||||
const uint8_t i2c_scl = 22;
|
const uint8_t i2c_scl = 22;
|
||||||
const uint8_t slave_address = AXP192_SLAVE_ADDRESS; //use axp192
|
const uint8_t slave_address = AXP192_SLAVE_ADDRESS; //use axp192
|
||||||
|
|||||||
@ -24,7 +24,7 @@ SOFTWARE.
|
|||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
#include <axp20x.h>
|
#include <axp20x.h>
|
||||||
|
|
||||||
AXP20X_Class axp;
|
// AXP20X_Class axp;
|
||||||
bool axpIrq = 0;
|
bool axpIrq = 0;
|
||||||
|
|
||||||
const uint8_t i2c_sda = 21;
|
const uint8_t i2c_sda = 21;
|
||||||
|
|||||||
@ -1,14 +0,0 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
#
|
|
||||||
# Example OpenOCD configuration file for ESP32-S3 connected via builtin USB-JTAG adapter.
|
|
||||||
#
|
|
||||||
# For example, OpenOCD can be started for ESP32-S3 debugging on
|
|
||||||
#
|
|
||||||
# openocd -f board/esp32s3-builtin.cfg
|
|
||||||
#
|
|
||||||
|
|
||||||
# Source the JTAG interface configuration file
|
|
||||||
source [find interface/esp_usb_jtag.cfg]
|
|
||||||
# Source the ESP32-S3 configuration file
|
|
||||||
source [find target/esp32s3.cfg]
|
|
||||||
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"name":"Arduino on ESP32-S3",
|
|
||||||
"toolchainPrefix":"xtensa-esp32s3-elf",
|
|
||||||
"svdFile":"esp32s3.svd",
|
|
||||||
"request":"attach",
|
|
||||||
"overrideAttachCommands":[
|
|
||||||
"set remote hardware-watchpoint-limit 2",
|
|
||||||
"monitor reset halt",
|
|
||||||
"monitor gdb_sync",
|
|
||||||
"thb setup",
|
|
||||||
"c"
|
|
||||||
],
|
|
||||||
"overrideRestartCommands":[
|
|
||||||
"monitor reset halt",
|
|
||||||
"monitor gdb_sync"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
|||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
#include <axp20x.h>
|
#include <axp20x.h>
|
||||||
|
|
||||||
AXP20X_Class axp;
|
// AXP20X_Class axp;
|
||||||
|
|
||||||
const uint8_t i2c_sda = 21;
|
const uint8_t i2c_sda = 21;
|
||||||
const uint8_t i2c_scl = 22;
|
const uint8_t i2c_scl = 22;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
#include <axp20x.h>
|
#include <axp20x.h>
|
||||||
|
|
||||||
AXP20X_Class axp;
|
// AXP20X_Class axp;
|
||||||
|
|
||||||
const uint8_t i2c_sda = 21;
|
const uint8_t i2c_sda = 21;
|
||||||
const uint8_t i2c_scl = 22;
|
const uint8_t i2c_scl = 22;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
#include <axp20x.h>
|
#include <axp20x.h>
|
||||||
|
|
||||||
AXP20X_Class axp;
|
// AXP20X_Class axp;
|
||||||
|
|
||||||
const uint8_t i2c_sda = 21;
|
const uint8_t i2c_sda = 21;
|
||||||
const uint8_t i2c_scl = 22;
|
const uint8_t i2c_scl = 22;
|
||||||
|
|||||||
@ -1,14 +0,0 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
#
|
|
||||||
# Example OpenOCD configuration file for ESP32-S3 connected via builtin USB-JTAG adapter.
|
|
||||||
#
|
|
||||||
# For example, OpenOCD can be started for ESP32-S3 debugging on
|
|
||||||
#
|
|
||||||
# openocd -f board/esp32s3-builtin.cfg
|
|
||||||
#
|
|
||||||
|
|
||||||
# Source the JTAG interface configuration file
|
|
||||||
source [find interface/esp_usb_jtag.cfg]
|
|
||||||
# Source the ESP32-S3 configuration file
|
|
||||||
source [find target/esp32s3.cfg]
|
|
||||||
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"name":"Arduino on ESP32-S3",
|
|
||||||
"toolchainPrefix":"xtensa-esp32s3-elf",
|
|
||||||
"svdFile":"esp32s3.svd",
|
|
||||||
"request":"attach",
|
|
||||||
"overrideAttachCommands":[
|
|
||||||
"set remote hardware-watchpoint-limit 2",
|
|
||||||
"monitor reset halt",
|
|
||||||
"monitor gdb_sync",
|
|
||||||
"thb setup",
|
|
||||||
"c"
|
|
||||||
],
|
|
||||||
"overrideRestartCommands":[
|
|
||||||
"monitor reset halt",
|
|
||||||
"monitor gdb_sync"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user