Development of PS Drive under WINDOWS10 environment

Source: Internet
Author: User
Tags ssdt

One: Preparation of the development environment

Host development Environment:

    1. Visual Studio Professional
    2. Windows SDK 8.2
    3. Windows Driver Kit 8.2
    4. Windows ADK for Windows 8.1 update

Target Board

    1. WINDOWS10 Build 9879 for x86
    2. Shark Cove BSP

Two. Target Board configuration

Two: Write the driver Code of light sensor.

    1. Open Spbaccelerometer.inx, and modify ACPI. The code is modified as follows:

Modified before:%spbaccelerometer.devicedesc% = Spbaccelerometer_install,acpi\spbaccelerometer

Modified:%spbaccelerometer.devicedesc% = Spbaccelerometer_install,acpi\ps

    1. Open the Adx1345.h and modify the register address and register configuration according to the specifications of the PS sensor that will be used.
    2. Open AccelerometerDevice.cpp, modify the chip initialization configuration and interrupt handler function.
    3. Modify the configuration of the BIOS section

(1) Copy the ASL.exe to the Sharks Cove board.

(2) Open the Command line tool and enter the command ASL/TAB=SSDT. The command creates a file Ssdt.asl

(3) Open the SSDT.ASL and modify the BIOS configuration. The boldface section is the default setting. Configuration can be modified according to the actual situation.

Definitionblock ("SSDT. AML "," SSDT ", 0x01," Intel_ "," Adebtabl ", 0x00001000)

{

Scope (¥)

{

Name (DPTR, 0x3bf2d000)

Name (Eptr, 0x3bf3d000)

Name (CPTR, 0x3bf2d010)

Mutex (Mmut, 0x0)

Method (MDBG, 0x1, serialized)

{

Store (Acquire (Mmut, 0x3e8), Local0)

If (LEqual (Local0, Zero))

{

Operationregion (Ablk, Systemmemory, CPTR, 0x10)

Field (Ablk, BYTEACC, NoLock, Preserve)

{

AAAA, 128

}

Store (Arg0, AAAA)

ADD (CPTR, 0x10, CPTR)

If (Lnot (lless (CPTR, eptr)))

{

ADD (DPTR, 0x10, CPTR)

}

Release (Mmut)

}

Return (LOCAL0)

}

}

Scope (_sb_)

{

Device (SPBA)

{

Name (_hid, "PS")

Name (_uid, 1)

Method (_crs, 0x0, notserialized)

{

Name (RBUF, Resourcetemplate ()

{

I2cserialbus (0x38, controllerinitiated, 400000, Addressingmode7bit, "¥¥_SB. I2c3 ", 0, Resourceconsumer)

Gpioint (Edge, Activehigh, Exclusive, PullDown, 0, "¥¥_SB. GPO2 ") {0x6}

})

Return (RBUF)

}

}//Device (SPBA)

}//Scope (_sb_)

}

(4) Enter the command ASL SSDT.ASL, generate the Ssdt.aml file.

(5) Verify that the test signing on the Shark Cove is on

(6) Enter command asl/loadtable ssdt.aml load SSDT file

    1. Restart Shark Cove. In device management, see if the device is loaded correctly.
    2. Use Traceview.exe to view log information.

Development of PS Drive under WINDOWS10 environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.