# US 2014/0196004 A1 · Software interface for a hardware device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2014/0196004 A1
- Document ID: US20140196004A1
- Status: Published application
- Kind: A1
- Application number: 13/734,712
- Filed: 2013-01-04
- Published: 2014-07-10
- Earliest claimed: 2013-01-04
- Assignees: Microsoft Corporation
- Applicants: Microsoft Corporation
- Inventors: Yaron Weinsberg; Jinsong Yu; Maxim Grabarnik; Davide Massarenti
- Web page: https://patentgrep.com/patent/US20140196004A1

## CPC

- G06F 8/30: Creation or generation of source code
- G06F 9/4411: {Configuring for operating with peripheral devices; Loading of device drivers}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Automatically generating code used with device drivers for interfacing with hardware. The method includes receiving a machine readable description of a hardware device, including at least one of hardware registers or shared memory structures of the hardware device. The method further includes determining an operating system with which the hardware device is to be used. The method further includes processing the machine readable description on a code generation tool to automatically generate code for a hardware driver for the hardware device specific to the determined operating system.

## Claims

### Claim 1

In a computing environment, a method of automatically generating code used with device drivers for interfacing with hardware, the method comprising:
receiving a machine readable description of a hardware device, including at least one of hardware registers or shared memory structures of the hardware device;
determining an operating system with which the hardware device is to be used; and
processing the machine readable description on a code generation tool to automatically generate code for a hardware driver for the hardware device specific to the determined operating system.

### Claim 2 (depends on 1)

The method of claim 1, wherein generating code for a hardware driver comprises generating hardware access methods for reading and writing to registers and interpreting fields of the registers.

### Claim 3 (depends on 1)

The method of claim 1, wherein generating code for a hardware driver comprises generating methods for reading and writing to shared structures fields.

### Claim 4 (depends on 1)

The method of claim 1, wherein generating code for a hardware driver comprises generating memory allocators for hardware interface entities expressed in the machine readable description of the hardware device.

### Claim 5 (depends on 1)

The method of claim 1, wherein generating code for a hardware driver comprises generating log modules that interpret and trace hardware interface entities.

### Claim 6 (depends on 1)

The method of claim 1, wherein generating code for a hardware driver comprises generating debugger extensions that visualize hardware interface entities.

### Claim 7 (depends on 1)

The method of claim 1, wherein the machine readable description of a hardware device is provided by a hardware vendor.

### Claim 8 (depends on 1)

The method of claim 1, wherein the generated code for the hardware driver is generated as managed code.

### Claim 9

A computer readable medium comprising machine readable instructions that when executed by one or more processors cause one or more processors to perform the following:
receiving a machine readable description of a hardware device, including at least one of hardware registers or shared memory structures of the hardware device;
determining an operating system with which the hardware device is to be used; and
processing the machine readable description on a code generation tool to automatically generate code for a hardware driver for the hardware device specific to the determined operating system.

### Claim 10 (depends on 9)

The computer readable medium of claim 9, wherein generating code for a hardware driver comprises generating hardware access methods for reading and writing to registers and interpreting fields of the registers.

### Claim 11 (depends on 9)

The computer readable medium of claim 9, wherein generating code for a hardware driver comprises generating methods for reading and writing to shared structures fields.

### Claim 12 (depends on 9)

The computer readable medium of claim 9, wherein generating code for a hardware driver comprises generating memory allocators for hardware interface entities expressed in the machine readable description of the hardware device.

### Claim 13 (depends on 9)

The computer readable medium of claim 9, wherein generating code for a hardware driver comprises generating log modules that interpret and trace hardware interface entities.

### Claim 14 (depends on 9)

The computer readable medium of claim 9, wherein generating code for a hardware driver comprises generating debugger extensions that visualize hardware interface entities.

### Claim 15 (depends on 9)

The computer readable medium of claim 9, wherein the machine readable description of a hardware device is provided by a hardware vendor.

### Claim 16 (depends on 9)

The computer readable medium of claim 9, wherein the generated code for the hardware driver is generated as managed code.

### Claim 17

In a computing environment, a system for automatically generating code used with device drivers for interfacing with hardware, the system comprising:
One or more processors;
One or more computer readable memory, wherein the computer readable memory comprise computer executable instructions that when executed by one or more of the one or more processors, cause one or more of the one or more processors to implement a code generation tool configured to perform the following:
receiving a machine readable description of a hardware device, including at least one of hardware registers or shared memory structures of the hardware device;
determining an operating system with which the hardware device is to be used; and
processing the machine readable description on a code generation tool to automatically generate code for a hardware driver for the hardware device specific to the determined operating system.

### Claim 18 (depends on 17)

The system of claim 17, wherein generating code for a hardware driver comprises generating hardware access methods for reading and writing to registers and interpreting fields of the registers.

### Claim 19 (depends on 17)

The system of claim 17, wherein generating code for a hardware driver comprises generating methods for reading and writing to shared structures fields.

### Claim 20 (depends on 17)

The system of claim 17, wherein generating code for a hardware driver comprises generating memory allocators for hardware interface entities expressed in the machine readable description of the hardware device.
