MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / GetSpeed

Method GetSpeed

Kernel/src/net/8254x.cpp:137–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135 }
136
137 int Intel8254x::GetSpeed(){
138 int spd = ReadMem32(I8254_REGISTER_STATUS) & STATUS_SPEED;
139 spd >>= 6;
140
141 switch(spd){
142 case SPEED_10:
143 spd = 10;
144 break;
145 case SPEED_100:
146 spd = 100;
147 break;
148 case SPEED_1000:
149 case SPEED_1000_ALT:
150 spd = 1000;
151 break;
152 default:
153 spd = 0;
154 break;
155 }
156
157 return spd;
158 }
159
160 void Intel8254x::UpdateLink(){
161 int _link = (ReadMem32(I8254_REGISTER_STATUS) | STATUS_LINK_UP);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected