Cypress CY4672 manual Requesting a New Battery Reading, Obtaining the RadioParams Report

Models: CY4672

1 126
Download 126 pages 13.98 Kb
Page 96
Image 96

Bridge

The RadioParams Report is 8 bytes long and has the 6 data fields listed in Table 5-4.

Table 5-4. USB Report Format

Byte

Use

 

Range

0

Report ID #

0x04

1

Battery Level

0

– 0x0A

2

Channel #

0

– 0x4D

3

PN Code

0

– 0x30

4-5

Corrupt Packets

0

– 0xFFFF

6-7

Packets Transferred

0

– 0xFFFF

5.4.4.1Requesting a New Battery Reading

When the Bridge receives a control endpoint request from the host with the following parameters, it returns an 8-byte RadioParams report over the control endpoint. An attached LP device sends an updated battery report whenever a reconnect or a change in the battery level occurs.

Control endpoint request for new battery reading. Table 5-5. USB Set Report

 

 

 

Value

bmRequestType

0x21

(To Device, Type = Class, Recipient = Interface)

Request Code

0x09

(Set Report)

wValue

0x0304

(Feature Report, ReportID = 4)

wIndex

0x0000

= Kbd, 0x0001 = mouse

5.4.4.2Obtaining the RadioParams Report

When the bridge receives, from the host, a control endpoint request with the parameters listed on Table 5-6, it returns an 8-byte RadioParams report over the control endpoint.

Control endpoint request for RadioParams report are listed. Table 5-6. USB Get Report

 

 

Value

bmRequestType

0xA1 (From Device, Type = Class, Recipient = Interface)

Request Code

0x01 (Get Report)

wValue

0x0304

(Feature Report, ReportID = 4)

wIndex

0x0000

= Kbd, 0x0001 = mouse

When the bridge receives the Get Report control request code, it returns a RadioParams report and then resets the Packets Transferred parameter for the specified device to zero.

The Link Quality value is updated whenever the bridge receives a radio packet from the wireless device.

Battery Level is only updated when the device sends an updated battery level report.

At startup, the Battery Level, Corrupt Packets and Packets Transferred are initialized to zero.

96

CY4672 Reference Design Guide, Document # 001-16968 Revision **

[+] Feedback

Page 96
Image 96
Cypress CY4672 manual Requesting a New Battery Reading, Obtaining the RadioParams Report