More Chinese (auto) translation

This commit is contained in:
Philippe Teuwen
2023-08-25 19:40:46 +02:00
parent 7ff6a0b3a2
commit 2ba2ca92fd
4 changed files with 17 additions and 17 deletions
+8 -8
View File
@@ -96,11 +96,11 @@ void board_lite_high_voltage_set(void) {
void hw_connect_init(void) {
#if defined(PROJECT_CHAMELEON_LITE)
board_lite_high_voltage_set(); // lite需要关闭dcdc并且抬高内核电压
board_lite_high_voltage_set(); // lite needs to turn off dcdc and raise the core voltage
#endif
// TODO 请实现此处,实现硬件版本号的读取
// 测试的时候可以直接改写此版本号
// TODO: Please implement here to read the hardware version number
// You can directly rewrite this version number when testing
m_hw_ver = 1;
@@ -210,31 +210,31 @@ uint8_t hw_get_version_code(void) {
return m_hw_ver;
}
// 初始化设备的LED灯珠
// Initialize the LED light beads of the device
void init_leds(void) {
uint32_t *led_pins = hw_get_led_array();
uint32_t *led_rgb_pins = hw_get_rgb_array();
// 初始化卡槽那几颗LED灯的GPIO(其他的LED由其他的模块控制)
// Initialize the GPIO of the LED lights in the card slot (other LEDs are controlled by other modules)
for (uint8_t i = 0; i < RGB_LIST_NUM; i++) {
nrf_gpio_cfg_output(led_pins[i]);
nrf_gpio_pin_clear(led_pins[i]);
}
// 初始化RGB脚
// Initialize RGB pin
for (uint8_t i = 0; i < RGB_CTRL_NUM; i++) {
nrf_gpio_cfg_output(led_rgb_pins[i]);
nrf_gpio_pin_set(led_rgb_pins[i]);
}
// 设置FIELD LED脚为输出且灭掉场灯
// set FIELD The LED pin is output and the field light is turned off
nrf_gpio_cfg_output(LED_FIELD);
TAG_FIELD_LED_OFF()
}
/**
* @brief Function for enter tag emulation mode
* @param color: 0 表示r, 1表示g, 2表示b
* @param color: 0 means r, 1 means g, 2 means b
*/
void set_slot_light_color(uint8_t color) {
nrf_gpio_pin_set(LED_R);
+1 -1
View File
@@ -85,7 +85,7 @@ extern uint32_t g_reader_power;
#endif
// 通用场灯的操作定义
// Operational Definitions for General Field Lights
#define TAG_FIELD_LED_ON() nrf_gpio_pin_clear(LED_FIELD);
#define TAG_FIELD_LED_OFF() nrf_gpio_pin_set(LED_FIELD);
@@ -386,13 +386,13 @@ static bool dfu_enter_check(void)
(nrf_gpio_pin_read(NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN) == 1))
{
bool is_usb_attach = false;
// 如果按钮一直是按下的状态,则等待用户释放按钮,期间检测USB插入,如果是插入状态,则进入DFU模式
// If the button is always pressed, wait for the user to release the button, during which the USB plug-in is detected, and if it is plugged in, enter the DFU mode
while (nrf_gpio_pin_read(NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN) == 1) {
is_usb_attach = check_usb_attach();
}
NRF_LOG_DEBUG("DFU mode requested via button.");
// 按钮按下,但是USB没插入,则进入普通APP模式,
// 按钮按下,并且USB插入,则进入bootloader模式
// When the button is pressed, but the USB is not plugged in, it will enter the normal APP mode.
// When the button is pressed and the USB is plugged in, it enters the bootloader mode
return is_usb_attach;
}
@@ -234,11 +234,11 @@ static void nrfx_nfct_field_event_handler(volatile nrfx_nfct_field_state_t field
{
/*
* 经过思考,既然低功耗读头无法成功唤醒的原因是读头发送太快,而唤醒NFC外设需要时间,恰巧错过了此通信时序。
* 那我们就需要在首次唤醒NFC模块后,让其留存一段时间,这段时间就是大概能让低功耗读头正常通信的时间。
* 唤醒NFC模块这段过程是为了让外设和时钟稳定的一个过程,特别是在NRF52840上,那么我们就不能改动唤醒到场侦测事件的这个过程
* 假设从场丢失事件的回调关闭为切入点,我们可以假装关闭NFC外设(只分发场丢失事件,而不关闭外设),但是实际上留存着事件监听一段时间,假设在这段时间里接收到数据,我们可以立刻将事件转发给观察者
* 以达到及时处理数据消息的目的,在一段时间内无消息可处理之后,我们可以正式关闭NFC外设,达到节省电量资源的目的。
* After thinking, since the reason why the low-power reading head cannot be successfully woken up is that the reading head sends too fast, and it takes time to wake up the NFC peripheral, it happened to miss this communication timing.
* Then we need to keep the NFC module for a period of time after waking it up for the first time. This period of time is about the time for the low-power reading head to communicate normally.
* The process of waking up the NFC module is to stabilize the peripherals and the clock, especially on the nRF52840, so we cannot change the process of waking up the presence detection event
* Assuming that the callback from the field loss event is closed as the entry point, we can pretend to turn off the NFC peripheral (only distribute the field loss event, but not close the peripheral), but actually keep the event listening for a period of time, assuming that during this time receivedto the data, we can immediately forward the event to the observer
* In order to achieve the purpose of processing data messages in a timely manner, after there is no message to process for a period of time, we can officially turn off the NFC peripherals to achieve the purpose of saving power resources.
*/
#if defined(NRF52833_XXAA) || defined(NRF52840_XXAA)
nrf_nfct_int_disable(NRFX_NFCT_RX_INT_MASK | NRFX_NFCT_TX_INT_MASK);