brickOS Kernel Developer v0.9.0
MotorState Struct Reference

the motor status type. More...

#include <dmotor.h>

Collaboration diagram for MotorState:

Public Attributes

union { 
 
   unsigned   assembler 
 assures word alignment for assembler More...
 
   struct { 
 
      unsigned char   delta 
 the speed setting More...
 
      volatile unsigned char   sum 
 running sum More...
 
   }   c 
 
access 
 provides access from C and assembler
 
unsigned char dir
 output pattern when sum overflows
 

Detailed Description

the motor status type.

Definition at line 54 of file dmotor.h.

Member Data Documentation

◆ [union]

union { ... } MotorState::access

provides access from C and assembler

Referenced by motor_a_speed(), motor_b_speed(), and motor_c_speed().

◆ assembler

unsigned MotorState::assembler

assures word alignment for assembler

Definition at line 56 of file dmotor.h.

◆ [struct]

struct { ... } MotorState::c

◆ delta

unsigned char MotorState::delta

the speed setting

Definition at line 59 of file dmotor.h.

Referenced by motor_a_speed(), motor_b_speed(), and motor_c_speed().

◆ dir

unsigned char MotorState::dir

output pattern when sum overflows

Definition at line 66 of file dmotor.h.

◆ sum

volatile unsigned char MotorState::sum

running sum

Definition at line 61 of file dmotor.h.


The documentation for this struct was generated from the following file: