WO2018010431A1 - 一种指示灯的显示控制方法、装置及移动热点ufi设备 - Google Patents

一种指示灯的显示控制方法、装置及移动热点ufi设备 Download PDF

Info

Publication number
WO2018010431A1
WO2018010431A1 PCT/CN2017/073945 CN2017073945W WO2018010431A1 WO 2018010431 A1 WO2018010431 A1 WO 2018010431A1 CN 2017073945 W CN2017073945 W CN 2017073945W WO 2018010431 A1 WO2018010431 A1 WO 2018010431A1
Authority
WO
WIPO (PCT)
Prior art keywords
rtc
indicator light
ufi
ufi device
enter
Prior art date
Application number
PCT/CN2017/073945
Other languages
English (en)
French (fr)
Inventor
郭涛
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018010431A1 publication Critical patent/WO2018010431A1/zh

Links

Images

Definitions

  • the invention relates to the technical field of indicator display control, in particular to a display control method and device for an indicator light and a mobile hotspot UFI device.
  • GPIO General Purpose Input Output
  • gpio General Purpose Input Output
  • the indicators are displayed in the following ways. : Lights up, goes out, and flashes. Among them, turning on and off is to set the high and low processing of gpio.
  • the flashing uses the system clock as the clock source, which is realized by timer timing, but in standby, the clock source is When the power consumption is reduced, the corresponding timer is no longer working, and the corresponding timer is invalid, which in turn makes it impossible to use the resources of the processor itself to realize the blinking display function of the indicator light during standby.
  • the object of the embodiments of the present invention is to provide a display control method and device for an indicator light and a mobile hotspot UFI device, which are used to solve the problem that the existing mobile hotspot UFI device cannot use the resources of the processor itself to realize the blinking display of the indicator light during standby. .
  • an embodiment of the present invention provides a display control method for an indicator light, including:
  • the UFI device is controlled to enter a sleep state, and after receiving the hardware interrupt signal sent by the RTC at the hardware interrupt time, the indicator light of the UFI device is controlled to display a preset duration.
  • the step of detecting whether the mobile hotspot UFI device needs to enter a sleep state includes:
  • the UFI device does not detect the Wi-Fi access signal and the USB data line insertion signal within the preset detection period, it is detected that the UFI device needs to enter a sleep state.
  • the step of setting a hardware interrupt time of the real-time clock RTC in the UFI device includes:
  • the UFI device needs to enter a sleep state, set a predetermined time value and obtain a current time value of the RTC;
  • the step of controlling the indicator light of the UFI device to blink to display the preset duration after receiving the hardware interrupt signal sent by the RTC at the time of the hardware interruption includes:
  • the indicator light After receiving the hardware interrupt signal sent by the RTC at the hardware interrupt time, the indicator light is flashed to display the preset duration through the general-purpose input/output GPIO interface.
  • the display control method further includes:
  • the UFI device is controlled to enter a sleep state, and after receiving the hardware interrupt signal sent by the RTC at the reset hardware interrupt time, the indicator light of the UFI device is flashed to display the preset duration.
  • an embodiment of the present invention further provides a display control device for an indicator light, including:
  • the detecting module is configured to detect whether the mobile hotspot UFI device needs to enter a sleep state
  • the first control module is configured to control the UFI device to enter a sleep state, and after receiving the hardware interrupt signal sent by the RTC at the hardware interrupt time, control the indicator light of the UFI device to blink for a preset duration.
  • the detecting module is configured to detect that the UFI device needs to enter a sleep state if the UFI device does not detect the Wi-Fi access signal and the USB data line insertion signal within a preset detection period.
  • the setting module includes:
  • the determining submodule is configured to add the predetermined time value and the current time value of the RTC to obtain a hardware interrupt time of the RTC.
  • the first control module is configured to, after receiving the hardware interrupt signal sent by the RTC at the hardware interrupt time, control the indicator light to display a preset duration by using a general-purpose input/output GPIO interface.
  • the display control device of the indicator light further includes:
  • Resetting the module if it is determined that the UFI device still needs to enter a sleep state, resetting the hardware interruption time of the RTC;
  • a second control module configured to control the UFI device to enter a sleep state, and after receiving the hardware interrupt signal sent by the RTC at the reset hardware interrupt time, controlling the indicator light of the UFI device to flash the display Set the duration.
  • Embodiments of the present invention also provide a mobile hotspot UFI device, including display control means for the indicator light as described above.
  • Another embodiment of the present invention provides a computer storage medium, where the computer storage medium stores execution instructions for performing one or a combination of the steps in the foregoing method embodiments.
  • the above technical solution of the embodiment of the present invention detects whether the mobile hotspot UFI device needs to enter a sleep state; if the UFI device needs to enter a sleep state, set a hardware interrupt time of the real time clock RTC in the UFI device; and control the UFI device After entering the sleep state, and after receiving the hardware interrupt signal sent by the RTC at the hardware interrupt time, the indicator light of the UFI device is flashed to display the preset duration.
  • the flashing display function of the UFI device can be realized by the real-time clock RTC, and the special respiratory lamp chip is not needed, thereby reducing the product cost of the UFI device.
  • FIG. 1 is a first working flowchart of a display control method for an indicator light according to an embodiment of the present invention
  • FIG. 2 is a first working flowchart of a display control method of an indicator light according to an embodiment of the present invention
  • FIG. 3 is a block diagram showing the structure of a display control device for an indicator light according to an embodiment of the present invention.
  • system clock and the real-time clock RTC are first described as follows.
  • RTC is a chip circuit on a UFI device that is powered by a battery. Even if the system is powered off, the date and time can be maintained, which is completely determined by hardware.
  • the system clock is determined by the timing/counting chip on the device. It is the operation of the chip controlled by the operating system.
  • the basic unit of the system clock is the counting period of the device chip. After the device is powered on, the operating system will take the time data in the RTC to initialize the system clock, and then form the system clock by counting down the counting chip. Therefore, the system clock is not a real clock, but a counter. The system clock only takes effect when it is powered on and is completely controlled by the operating system, so it is also called a soft clock or a system clock.
  • the system clock After the device is powered on, the system clock is started.
  • the system clock is used as the process.
  • the timer clock source of course, the RTC is always working, whether it is powered on or off.
  • an embodiment of the present invention provides a display control method and device for an indicator light and a mobile hotspot UFI device, which solves the problem that the existing mobile hotspot UFI device cannot use the resources of the processor itself to realize the blinking display of the indicator light during standby. problem.
  • a display control method for an indicator light includes:
  • Step 11 Detect whether the mobile hotspot UFI device needs to enter a sleep state.
  • the UFI device does not detect the Wi-Fi access signal and the USB data line insertion signal within a preset detection period, it is detected that the UFI device needs to enter a sleep state.
  • the preset detection period can be set according to different requirements. It is assumed that the preset detection period is 10 minutes.
  • the upper layer will have a main process to control the state of the entire system, work, sleep, or Shut down and other different states.
  • the main process can read the status of each module by means of timed query.
  • the main process queries within 10 minutes that there is no user access on the Wi-Fi module and no USB cable is inserted (this query process can also be initiated by the underlying module). Reporting the message to the upper-layer main process to let the main process know the status of the current module.
  • the main process will notify each upper-layer module to hang and call The way of the interface, to notify all modules of the underlying kernel to go to sleep. Because the system clock is maintained by the underlying kernel, when the kernel goes to sleep, the system clock is also turned off and no longer works, so that the entire device actually enters the sleep state, and the RTC at this time is determined by the hardware module, so Still working properly.
  • Step 12 If the UFI device needs to enter a sleep state, set a hardware interrupt time of the real-time clock RTC in the UFI device.
  • the UFI device needs to enter a sleep state, set a predetermined time value and acquire a current time value of the RTC; add the predetermined time value and a current time value of the RTC to obtain the RTC hardware interrupt time.
  • the device when the device is switched from the working state to the sleep state, all modules of the kernel are dormant at this time, and the system clock is also turned off. At this time, only the RTC is still working. At this time, the RTC is used as a clock source for timing.
  • the main process needs the LED upper module to set the time when the breathing light is off. At this time, the current clock of the RTC is read, and the breathing light set before the sleep is extinguished. The time parameter, the two add up to get the corresponding time value of the next interrupt.
  • Step 13 Control the UFI device to enter a sleep state, and after receiving the hardware interrupt signal sent by the RTC at the hardware interrupt time, control the indicator light of the UFI device to blink for a preset duration.
  • the indicator light is flashed to display a preset duration by using a general-purpose input/output GPIO interface.
  • the device after the device is completely hibernated, when the RTC reaches the corresponding value, a hardware interrupt is generated, and the entire system is woken up, and the interface function is called to light the indicator light, and the device continues to enter the sleep after being extinguished again. State, repeat the previous action, continue to loop until the USB cable is inserted or the button is pressed, the device is completely woken up.
  • the indicator light of the UFI device is blinked.
  • the display control method further includes:
  • the UFI device is controlled to enter a sleep state, and after receiving the hardware interrupt signal sent by the RTC at the reset hardware interrupt time, the indicator light of the UFI device is flashed to display the preset duration.
  • the above technical solution of the embodiment of the present invention detects whether the mobile hotspot UFI device needs to enter a sleep state; if the UFI device needs to enter a sleep state, set a hardware interrupt time of the real time clock RTC in the UFI device; and control the UFI device After entering the sleep state, and after receiving the hardware interrupt signal sent by the RTC at the hardware interrupt time, the indicator light of the UFI device is flashed to display the preset duration.
  • the UFI device enters a dormant state. After the state, the real-time clock RTC can realize the flashing display function of the UFI device, eliminating the need for a special breathing light chip, which reduces the product cost of the UFI device.
  • the purpose of blinking of the indicator light during standby is to remind the user that the device is in a standby state, and the time when the indicator light is extinguished is far greater than the time of lighting, so that the problem of large standby current does not occur.
  • the invention adopts the gpio of the cpu itself to realize the function of blinking of the indicator light during standby, fully utilizes the resources of the cpu itself, and does not need to use the breathing lamp chip of other manufacturers, which greatly saves the product cost and has high use value.
  • a display control method for an indicator light includes:
  • Step 21 The UFI device is powered on, the system clock is started, and all processes start working.
  • Step 22 The main process of the UFI device detects whether there is a Wi-Fi access signal and a USB data line insertion signal within a preset detection period.
  • Step 23 If the Wi-Fi access signal and the USB data line insertion signal are not detected, the upper LED light process sets the breathing light to extinguish the time, and reads the current clock value of the RTC, and adds the two to obtain the next breathing light. The moment of lighting, otherwise, jump to step 22.
  • Step 24 The main process notifies all modules to suspend the current work, and notifies all modules of the underlying connotation to enter a sleep state.
  • Step 25 Determine whether the current time is the time when the next breathing lamp is lit.
  • Step 26 If yes, the RTC generates an interrupt signal to wake up the UFI device and illuminate the indicator light, otherwise it jumps to step 24.
  • Step 27 After the indicator light is turned on and no wake-up operation is detected, the device is notified that it needs to continue to sleep, and the process proceeds to step 23.
  • the upper-layer main process when the main process detects that there is no Wi-Fi user access and the USB cable is inserted, the upper-layer main process notifies the LED module to set the time when the breathing light is off, and implements the callback function, and the RTC thread simultaneously Will read the current time value old, and convert the current time to the Gregorian calendar time, and add the time value set by the previous led module to get new The time is new, because the accuracy of the RTC is second, and all set time values are in seconds.
  • the main process will call the sys node: echo mem>/sys/power/state, so that all the modules of the kernel enter the sleep state, and the whole device actually goes to sleep.
  • RTC is always working.
  • the RTC module will generate a hardware interrupt, which will wake up the device.
  • the main process will notify the LED module to call the callback function to light the breathing light.
  • the call is completed, , set the time value of the next interrupt occurs, and then the device continues to sleep, and continues to cycle.
  • the above technical solution realizes the function of the breathing lamp during standby by RTC, fully utilizes the characteristics of the system clock and the RTC during the working and sleeping of the device, and realizes the purpose of using the resources of the cpu itself to realize the breathing lamp during standby, thus achieving the function.
  • the cost of adding a breathing light chip on the hardware is reduced.
  • an embodiment of the present invention further provides a display control device for an indicator light, including:
  • the detecting module 31 is configured to detect whether the mobile hotspot UFI device needs to enter a sleep state
  • the setting module 32 is configured to set a hardware interrupt time of the real-time clock RTC in the UFI device if the UFI device needs to enter a sleep state;
  • the first control module 33 is configured to control the UFI device to enter a sleep state, and after receiving the hardware interrupt signal sent by the RTC at the hardware interrupt time, control the indicator light of the UFI device to display a preset duration .
  • the detecting module 31 is configured to detect if the UFI device does not detect the Wi-Fi access signal and the USB data line insertion signal within a preset detection period. The UFI device needs to go to sleep.
  • the display control device for the indicator light of the embodiment of the present invention, the setting module 32 includes:
  • Setting sub-module 321 to be set to be set if the UFI device needs to enter a sleep state a predetermined time value and obtaining a current time value of the RTC;
  • the determining sub-module 322 is configured to add the predetermined time value and the current time value of the RTC to obtain a hardware interrupt time of the RTC.
  • the first control module 33 is configured to control the general-purpose input/output GPIO interface after receiving the hardware interrupt signal sent by the RTC at the hardware interrupt time.
  • the indicator flashes to show the preset duration.
  • the reset module 34 is configured to reset the hardware interrupt time of the RTC if it is detected that the UFI device still needs to enter a sleep state;
  • the second control module 35 is configured to control the UFI device to enter a sleep state, and after receiving the hardware interrupt signal sent by the RTC at the reset hardware interrupt time, controlling the indicator light of the UFI device to flash the The preset duration.
  • the device is a device corresponding to the foregoing method embodiment, and all implementations in the foregoing method embodiments are applicable to the embodiment of the device, and the same technical effects can be achieved.
  • Embodiments of the present invention also provide a mobile hotspot UFI device, including display control means for the indicator light as described above.
  • Embodiments of the present invention also provide a storage medium.
  • the foregoing storage medium stores an execution instruction, where the execution instruction is used to perform one or a combination of the steps in the foregoing method embodiments.
  • the foregoing storage medium may include, but is not limited to, a USB flash drive, a Read-Only Memory (ROM), and a Random Access Memory (RAM).
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • the display control method and device for the indicator light of the embodiment of the present invention and the mobile hotspot UFI device detect whether the mobile hotspot UFI device needs to enter a sleep state; if the UFI device needs to enter a sleep state, setting a hardware interrupt time of the real-time clock RTC in the UFI device; controlling the UFI device to enter a sleep state, and controlling the hardware interrupt signal sent by the RTC at the hardware interrupt time to control the The UFI device's indicator flashes to indicate the preset duration.
  • the flashing display function of the UFI device can be realized by the real-time clock RTC, and the special respiratory lamp chip is not needed, thereby reducing the product cost of the UFI device.
  • the display control method and apparatus for the indicator light and the mobile hotspot UFI device provided by the embodiments of the present invention have the following beneficial effects: the UFI device can be instructed by the real-time clock RTC after the UFI device enters the sleep state.
  • the flashing display function eliminates the need for a dedicated breathing light chip, reducing the cost of the UFI device.

Landscapes

  • Telephone Function (AREA)

Abstract

本发明实施例提供了一种指示灯的显示控制方法、装置及移动热点UFI设备,用以解决现有终端设备在待机时无法利用处理器本身的资源实现指示灯闪烁显示的问题。本发明实施例的显示控制方法包括:检测移动热点UFI设备是否需要进入休眠状态;若所述UFI设备需要进入休眠状态,则设置所述UFI设备中实时时钟RTC的硬件中断时刻;控制所述UFI设备进入休眠状态,并在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示预设时长。本发明实施例中在UFI设备进入休眠状态后,通过实时时钟RTC便可实现UFI设备的指示灯闪烁显示功能,无需采用专门的呼吸灯芯片,降低了UFI设备的产品成本。

Description

一种指示灯的显示控制方法、装置及移动热点UFI设备 技术领域
本发明涉及指示灯显示控制的技术领域,特别是指一种指示灯的显示控制方法、装置及移动热点UFI设备。
背景技术
目前很多移动热点UFI(可携带路由器)设备中采用主处理器上的通用输入/输出口(General Purpose Input Output,简称为GPIO或gpio)实现指示灯的显示,指示灯的显示方式有以下几种:点亮、熄灭以及闪烁,其中点亮和熄灭就是对gpio进行置高置低处理,闪烁采用的是以系统时钟为时钟源,通过定时器定时的方式实现,但是在待机时该时钟源为了降低功耗,不再工作,相应的定时器也就无效,进而导致无法利用处理器本身的资源实现待机时指示灯的闪烁显示功能。
发明内容
本发明实施例的目的在于提供一种指示灯的显示控制方法、装置及移动热点UFI设备,用以解决现有移动热点UFI设备在待机时无法利用处理器本身的资源实现指示灯闪烁显示的问题。
为了实现上述目的,本发明实施例提供了一种指示灯的显示控制方法,包括:
检测移动热点UFI设备是否需要进入休眠状态;
若所述UFI设备需要进入休眠状态,则设置所述UFI设备中实时时钟RTC的硬件中断时刻;
控制所述UFI设备进入休眠状态,并在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示预设时长。
其中,所述检测移动热点UFI设备是否需要进入休眠状态的步骤包括:
若所述UFI设备在预设检测周期内未检测到Wi-Fi接入信号及USB数据线插入信号,则检测出所述UFI设备需要进入休眠状态。
其中,所述若所述UFI设备需要进入休眠状态,则设置所述UFI设备中实时时钟RTC的硬件中断时刻的步骤包括:
若所述UFI设备需要进入休眠状态,则设置一预定时间值并获取所述RTC的当前时刻值;
将所述预定时间值和所述RTC的当前时刻值相加,得到所述RTC的硬件中断时刻。
其中,所述在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示预设时长的步骤包括:
在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,通过通用输入/输出GPIO接口控制所述指示灯闪烁显示预设时长。
其中,所述控制所述UFI设备进入休眠状态,并在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示预设时长的步骤之后,所述显示控制方法还包括:
若检测出所述UFI设备仍需进入休眠状态,则重新设置所述RTC的硬件中断时刻;
控制所述UFI设备进入休眠状态,并在接收到所述RTC在重新设置的硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示所述预设时长。
为实现上述目的,本发明的实施例还提供了一种指示灯的显示控制装置,包括:
检测模块,设置为检测移动热点UFI设备是否需要进入休眠状态;
设置模块,设置为若所述UFI设备需要进入休眠状态,则设置所述 UFI设备中实时时钟RTC的硬件中断时刻;
第一控制模块,设置为控制所述UFI设备进入休眠状态,并在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示预设时长。
其中,所述检测模块设置为若所述UFI设备在预设检测周期内未检测到Wi-Fi接入信号及USB数据线插入信号,则检测出所述UFI设备需要进入休眠状态。
其中,所述设置模块包括:
设置子模块,设置为若所述UFI设备需要进入休眠状态,则设置一预定时间值并获取所述RTC的当前时刻值;
确定子模块,设置为将所述预定时间值和所述RTC的当前时刻值相加,得到所述RTC的硬件中断时刻。
其中,所述第一控制模块设置为在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,通过通用输入/输出GPIO接口控制所述指示灯闪烁显示预设时长。
其中,上述指示灯的显示控制装置,还包括:
重新设置模块,设置为若检测出所述UFI设备仍需进入休眠状态,则重新设置所述RTC的硬件中断时刻;
第二控制模块,设置为控制所述UFI设备进入休眠状态,并在接收到所述RTC在重新设置的硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示所述预设时长。
本发明的实施例还提供了一种移动热点UFI设备,包括如上所述的指示灯的显示控制装置。
本发明另一实施例提供了一种计算机存储介质,所述计算机存储介质存储有执行指令,所述执行指令用于执行上述方法实施例中的步骤之一或其组合。
本发明实施例具有以下有益效果:
本发明实施例的上述技术方案,检测移动热点UFI设备是否需要进入休眠状态;若所述UFI设备需要进入休眠状态,则设置所述UFI设备中实时时钟RTC的硬件中断时刻;控制所述UFI设备进入休眠状态,并在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示预设时长。本发明实施例中在UFI设备进入休眠状态后,通过实时时钟RTC便可实现UFI设备的指示灯闪烁显示功能,无需采用专门的呼吸灯芯片,降低了UFI设备的产品成本。
附图说明
图1为本发明实施例的指示灯的显示控制方法的第一工作流程图;
图2为本发明实施例的指示灯的显示控制方法的第一工作流程图;
图3为本发明实施例的指示灯的显示控制装置的结构框图。
具体实施方式
为使本发明实施例要解决的技术问题、技术方案和优点更加清楚,下面将结合具体实施例及附图进行详细描述。
为使本领域的技术人员能更好地理解本发明实施例的技术方案,先对系统时钟及实时时钟RTC作如下说明。
RTC是UFI设备上的一块芯片电路,是由电池供电的,即使系统断电,也可以维持日期和时间,即完全是由硬件决定的;而系统时钟是由设备上的定时/计数芯片决定的,是由操作系统控制这个芯片的工作,该系统时钟的基本单位就是设备芯片的计数周期。在设备开机之后,操作系统会取得RTC中的时间数据来初始化系统时钟,然后通过计数芯片的向下计数形成系统时钟,因此,系统时钟并不是真正意义上的时钟,而是一个计数器。该系统时钟只有在开机时才会生效,并且完全由操作系统控制,所以又被称之为软时钟或者是系统时钟。
设备在系统开机之后,会启动系统时钟,该系统时钟会作为各个进程 的定时器时钟源,当然RTC是一直在工作的,不管是开机还是关机状态。
基于此,本发明的实施例提供了一种指示灯的显示控制方法、装置及移动热点UFI设备,解决了现有移动热点UFI设备在待机时无法利用处理器本身的资源实现指示灯闪烁显示的问题。
第一实施例:
如图1所示,本发明实施例的指示灯的显示控制方法,包括:
步骤11:检测移动热点UFI设备是否需要进入休眠状态。
具体的,若所述UFI设备在预设检测周期内未检测到Wi-Fi接入信号及USB数据线插入信号,则检测出所述UFI设备需要进入休眠状态。
这里的,预设检测周期可根据不同需求进行设定,假定上述预设检测周期为10分钟,在设备正常工作时,上层会有一个主的进程来控制整个系统的状态,工作、休眠,还是关机等不同的状态。这个主进程可以通过定时查询的方式读取各个模块的状态,当主进程在10分钟内查询到Wi-Fi模块上没有用户接入,同时没有USB线插入时(这个查询过程也可以通过底层模块主动给上层主进程上报消息的方式来让主进程获知当前模块的状态,如果没有Wi-Fi用户接入以及没有USB线插入时),这时主进程就会通知各个上层模块挂起,并且通过调用接口的方式,通知底层内核的所有模块进入休眠状态。因为系统时钟是由底层内核维护的,当内核进入休眠时,也同时将系统时钟关闭,不再工作,这样整个设备真正进入了休眠状态,而此时的RTC由于是由硬件模块决定的,所以仍正常工作。
步骤12:若所述UFI设备需要进入休眠状态,则设置所述UFI设备中实时时钟RTC的硬件中断时刻。
可选的,若所述UFI设备需要进入休眠状态,则设置一预定时间值并获取所述RTC的当前时刻值;将所述预定时间值和所述RTC的当前时刻值相加,得到所述RTC的硬件中断时刻。
本发明实施例中,当设备由工作状态切换到休眠状态时,此时内核所有模块都休眠,系统时钟也会处于关闭状态,此时只有RTC依然在工作, 此时借用RTC作为时钟源进行计时。为了实现待机时的呼吸灯功能,在设备休眠之前,主进程需要led上层模块设置好呼吸灯熄灭的时间,此时就会读取RTC当前的时钟,并加上在休眠之前设置的呼吸灯熄灭的时间参数,两者相加就会获取到下一次中断相应的时刻值。
步骤13:控制所述UFI设备进入休眠状态,并在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示预设时长。
可选的,在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,通过通用输入/输出GPIO接口控制所述指示灯闪烁显示预设时长。
本发明实施例中在设备整个休眠之后,当RTC走到对应的值时,就会产生一个硬件中断,这时会唤醒整个系统,并且调用接口函数点亮指示灯,再次熄灭之后设备继续进入休眠状态,重复之前的动作,继续循环下去,直到有USB线插入或者按键按下等操作时,设备被彻底唤醒。
可选地,本发明实施例中,在上述控制所述UFI设备进入休眠状态,并在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示预设时长的步骤之后,所述显示控制方法还包括:
若检测出所述UFI设备仍需进入休眠状态,则重新设置所述RTC的硬件中断时刻;
控制所述UFI设备进入休眠状态,并在接收到所述RTC在重新设置的硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示所述预设时长。
本发明实施例的上述技术方案,检测移动热点UFI设备是否需要进入休眠状态;若所述UFI设备需要进入休眠状态,则设置所述UFI设备中实时时钟RTC的硬件中断时刻;控制所述UFI设备进入休眠状态,并在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示预设时长。本发明实施例中在UFI设备进入休眠状 态后,通过实时时钟RTC便可实现UFI设备的指示灯闪烁显示功能,无需采用专门的呼吸灯芯片,降低了UFI设备的产品成本。
另外,本发明实施例中,待机时指示灯闪烁的目的是为了提醒用户该设备处于待机状态,指示灯熄灭的时间远远大于点亮的时间,因此不会导致待机电流大的问题出现,本发明发明采用cpu本身的gpio实现了待机时指示灯闪烁的功能,充分利用了cpu本身的资源,而无需采用其他厂家的呼吸灯芯片,大大节约了产品成本,具有很高的使用价值。
第二实施例:
如图2所示,本发明实施例的指示灯的显示控制方法,包括:
步骤21:UFI设备开机,系统时钟启动,所有进程开始工作。
步骤22:UFI设备的主进程在预设检测周期内检测是否有Wi-Fi接入信号及USB数据线插入信号。
步骤23:若未检测到Wi-Fi接入信号及USB数据线插入信号,则上层led灯进程设置呼吸灯熄灭时间,并读取RTC当前的时钟值,将两者相加得到下次呼吸灯点亮的时刻,否则,跳转到步骤22。
步骤24:由主进程通知所有模块挂起当前的工作,同时通知底层内涵的所有模块进入休眠状态。
步骤25:判断当前时刻是否为下次呼吸灯点亮的时刻。
步骤26:若是,则RTC产生中断信号唤醒UFI设备,并点亮指示灯,否则跳转到步骤24。
步骤27:点亮完指示灯,未检测到唤醒操作,则通知设备需要继续休眠,并跳转到步骤23。
本发明实施例中,当主进程检测到没有Wi-Fi用户接入以及USB线插入时,上层的主进程就会通知led灯模块设置呼吸灯熄灭的时间,采用回调函数的方式实现,同时RTC线程会读取当前的时刻值old,并将当前时间转为格里高利历法时间,并加上之前led模块设置的时间值,得到新 的时间new,因为RTC的精度是秒级的,所有设置的时间值是以秒为单位的。设置完之后,此时主进程会调用sys节点:echo mem>/sys/power/state,这样让内核所有模块进入休眠状态,此时整个设备真正进入休眠状态。
但是RTC是一直在工作的,当RTC走到new时刻时,RTC模块就会产生一个硬件中断,此时会唤醒设备,这时主进程会通知led模块调用回调函数点亮呼吸灯,调用完之后,设置下一个中断发生的时刻值,然后设备再继续进入休眠状态,并继续循环下去。
上述技术方案通过RTC实现待机时呼吸灯的功能,充分利用了系统时钟和RTC在设备工作和休眠时的特点,实现了采用cpu本身的资源实现待机时呼吸灯的目的,这样既实现了功能,同时又减少了硬件上外加呼吸灯芯片的成本。
第三实施例:
如图3所示,本发明的实施例还提供了一种指示灯的显示控制装置,包括:
检测模块31,设置为检测移动热点UFI设备是否需要进入休眠状态;
设置模块32,设置为若所述UFI设备需要进入休眠状态,则设置所述UFI设备中实时时钟RTC的硬件中断时刻;
第一控制模块33,设置为控制所述UFI设备进入休眠状态,并在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示预设时长。
本发明实施例的指示灯的显示控制装置,所述检测模块31设置为若所述UFI设备在预设检测周期内未检测到Wi-Fi接入信号及USB数据线插入信号,则检测出所述UFI设备需要进入休眠状态。
本发明实施例的指示灯的显示控制装置,所述设置模块32包括:
设置子模块321,设置为若所述UFI设备需要进入休眠状态,则设置 一预定时间值并获取所述RTC的当前时刻值;
确定子模块322,设置为将所述预定时间值和所述RTC的当前时刻值相加,得到所述RTC的硬件中断时刻。
本发明实施例的指示灯的显示控制装置,所述第一控制模块33设置为在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,通过通用输入/输出GPIO接口控制所述指示灯闪烁显示预设时长。
本发明实施例的指示灯的显示控制装置,还包括:
重新设置模块34,设置为若检测出所述UFI设备仍需进入休眠状态,则重新设置所述RTC的硬件中断时刻;
第二控制模块35,设置为控制所述UFI设备进入休眠状态,并在接收到所述RTC在重新设置的硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示所述预设时长。
需要说明的是,该装置是与上述方法实施例对应的装置,上述方法实施例中所有实现方式均适用于该装置的实施例中,也能达到相同的技术效果。
本发明的实施例还提供了一种移动热点UFI设备,包括如上所述的指示灯的显示控制装置。
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质中存储有执行指令,该执行指令用于执行上述方法实施例中的步骤之一或其组合。
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
本发明实施例的指示灯的显示控制方法、装置及移动热点UFI设备,检测移动热点UFI设备是否需要进入休眠状态;若所述UFI设备需要进入 休眠状态,则设置所述UFI设备中实时时钟RTC的硬件中断时刻;控制所述UFI设备进入休眠状态,并在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示预设时长。本发明实施例中在UFI设备进入休眠状态后,通过实时时钟RTC便可实现UFI设备的指示灯闪烁显示功能,无需采用专门的呼吸灯芯片,降低了UFI设备的产品成本。
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
工业实用性
如上所述,本发明实施例提供的一种指示灯的显示控制方法、装置及移动热点UFI设备具有以下有益效果:能够在UFI设备进入休眠状态后,通过实时时钟RTC便可实现UFI设备的指示灯闪烁显示功能,无需采用专门的呼吸灯芯片,降低了UFI设备的产品成本。

Claims (11)

  1. 一种指示灯的显示控制方法,包括:
    检测移动热点UFI设备是否需要进入休眠状态;
    若所述UFI设备需要进入休眠状态,则设置所述UFI设备中实时时钟RTC的硬件中断时刻;
    控制所述UFI设备进入休眠状态,并在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示预设时长。
  2. 根据权利要求1所述的指示灯的显示控制方法,其中,所述检测移动热点UFI设备是否需要进入休眠状态的步骤包括:
    若所述UFI设备在预设检测周期内未检测到Wi-Fi接入信号及USB数据线插入信号,则检测出所述UFI设备需要进入休眠状态。
  3. 根据权利要求1所述的指示灯的显示控制方法,其中,所述若所述UFI设备需要进入休眠状态,则设置所述UFI设备中实时时钟RTC的硬件中断时刻的步骤包括:
    若所述UFI设备需要进入休眠状态,则设置一预定时间值并获取所述RTC的当前时刻值;
    将所述预定时间值和所述RTC的当前时刻值相加,得到所述RTC的硬件中断时刻。
  4. 根据权利要求1所述的指示灯的显示控制方法,其中,所述在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示预设时长的步骤包括:
    在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,通过通用输入/输出GPIO接口控制所述指示灯闪烁显示预设时长。
  5. 根据权利要求1所述的指示灯的显示控制方法,其中,所述 控制所述UFI设备进入休眠状态,并在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示预设时长的步骤之后,所述显示控制方法还包括:
    若检测出所述UFI设备仍需进入休眠状态,则重新设置所述RTC的硬件中断时刻;
    控制所述UFI设备进入休眠状态,并在接收到所述RTC在重新设置的硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示所述预设时长。
  6. 一种指示灯的显示控制装置,包括:
    检测模块,设置为检测移动热点UFI设备是否需要进入休眠状态;
    设置模块,设置为若所述UFI设备需要进入休眠状态,则设置所述UFI设备中实时时钟RTC的硬件中断时刻;
    第一控制模块,设置为控制所述UFI设备进入休眠状态,并在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示预设时长。
  7. 根据权利要求6所述的指示灯的显示控制装置,其中,所述检测模块设置为若所述UFI设备在预设检测周期内未检测到Wi-Fi接入信号及USB数据线插入信号,则检测出所述UFI设备需要进入休眠状态。
  8. 根据权利要求6所述的指示灯的显示控制装置,其中,所述设置模块包括:
    设置子模块,设置为若所述UFI设备需要进入休眠状态,则设置一预定时间值并获取所述RTC的当前时刻值;
    确定子模块,设置为将所述预定时间值和所述RTC的当前时刻值相加,得到所述RTC的硬件中断时刻。
  9. 根据权利要求6所述的指示灯的显示控制装置,其中,所述第一控制模块设置为在接收到所述RTC在所述硬件中断时刻发出的硬件中断信号后,通过通用输入/输出GPIO接口控制所述指示灯闪烁显示预设时长。
  10. 根据权利要求6所述的指示灯的显示控制装置,其中,还包括:
    重新设置模块,设置为若检测出所述UFI设备仍需进入休眠状态,则重新设置所述RTC的硬件中断时刻;
    第二控制模块,设置为控制所述UFI设备进入休眠状态,并在接收到所述RTC在重新设置的硬件中断时刻发出的硬件中断信号后,控制所述UFI设备的指示灯闪烁显示所述预设时长。
  11. 一种移动热点UFI设备,包括如权利要求6至10任一项所述的指示灯的显示控制装置。
PCT/CN2017/073945 2016-07-12 2017-02-17 一种指示灯的显示控制方法、装置及移动热点ufi设备 WO2018010431A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610545860.2A CN107612836A (zh) 2016-07-12 2016-07-12 一种指示灯的显示控制方法、装置及移动热点ufi设备
CN201610545860.2 2016-07-12

Publications (1)

Publication Number Publication Date
WO2018010431A1 true WO2018010431A1 (zh) 2018-01-18

Family

ID=60951916

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/073945 WO2018010431A1 (zh) 2016-07-12 2017-02-17 一种指示灯的显示控制方法、装置及移动热点ufi设备

Country Status (2)

Country Link
CN (1) CN107612836A (zh)
WO (1) WO2018010431A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114024784A (zh) * 2021-09-28 2022-02-08 浙江大华技术股份有限公司 通信设备控制方法、通信设备和计算机存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112959938A (zh) * 2021-03-22 2021-06-15 一汽奔腾轿车有限公司 一种用于人车互动的汽车灯光律动控制方法

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202205339U (zh) * 2011-08-09 2012-04-25 浙江胜昔信息科技有限公司 一种传感器WiFi传输装置
CN105430719A (zh) * 2014-09-02 2016-03-23 中兴通讯股份有限公司 一种无线访问接入点终端及其智能节电的方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202205339U (zh) * 2011-08-09 2012-04-25 浙江胜昔信息科技有限公司 一种传感器WiFi传输装置
CN105430719A (zh) * 2014-09-02 2016-03-23 中兴通讯股份有限公司 一种无线访问接入点终端及其智能节电的方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114024784A (zh) * 2021-09-28 2022-02-08 浙江大华技术股份有限公司 通信设备控制方法、通信设备和计算机存储介质
CN114024784B (zh) * 2021-09-28 2024-05-28 浙江大华技术股份有限公司 通信设备控制方法、通信设备和计算机存储介质

Also Published As

Publication number Publication date
CN107612836A (zh) 2018-01-19

Similar Documents

Publication Publication Date Title
US20140075230A1 (en) Waking An Electronic Device
JP6014248B2 (ja) 電源オフ状態におけるアラーム実現方法、モバイル端末、プログラム及び記録媒体
JP5906516B2 (ja) 初期エンドユーザ相互作用応答性を向上させる推論型システム起動
RU2631241C2 (ru) Электронная аппаратура, способ и устройство для активизации этой электронной аппаратуры
JP3406594B2 (ja) コンピュータ電力管理システム
US8108704B2 (en) Method for automatically switching power states
WO2017166613A1 (zh) 一种控制终端使用时间的方法、装置和电子设备
TW201626153A (zh) 智慧電子裝置、智慧電子裝置喚醒螢幕的系統與方法
WO2018010431A1 (zh) 一种指示灯的显示控制方法、装置及移动热点ufi设备
US20120249431A1 (en) Electronic device with a page turning function during a sleep mode of the electronic device
TW201523443A (zh) 電子裝置作業系統自動喚醒方法及系統
WO2015180607A1 (zh) 一种终端
WO2014190619A1 (zh) 一种移动终端功耗的管控装置及方法、移动终端
RU2016117390A (ru) Способ и устройство для пробуждения mcu
TW201516648A (zh) 移動裝置低電量開機控制方法及系統
TWI502351B (zh) 電子裝置及其防止資料丟失的方法
CN112235742A (zh) NB-IoT通讯模组内嵌程序的燃气表及数据处理方法
CN106602156B (zh) 一种电源管理方法及装置
RU2017133875A (ru) Гибкое изменение яркости дисплея
CN103024543A (zh) 机顶盒低功耗实现方法和实现装置
US9672048B2 (en) Electronic device and method for waking up operating system thereof
CN109582505A (zh) 一种bios选项默认值的恢复系统、方法及装置
WO2021175194A1 (zh) 终端定时开机的方法及终端
US20120091823A1 (en) Mobile storage device and method for managing power consumption of the mobile storage device
CN112735090A (zh) 基于老人防丢和摔倒报警的方法、系统、存储介质、终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17826770

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17826770

Country of ref document: EP

Kind code of ref document: A1