Skip to content

Commit 1906b3b

Browse files
authored
Fix a bunch of typos on stm32 hal/examples (#629)
1 parent 0ed66b3 commit 1906b3b

5 files changed

Lines changed: 13 additions & 12 deletions

File tree

examples/stmicro/stm32/src/semihosting.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub fn main() void {
1212
semihosting.Debug.print("Hello World\n", .{});
1313

1414
const args = semihosting.Debug.get_cmd_args(&some_buf) catch return;
15-
semihosting.Debug.print("recive args: {s}\n", .{args});
15+
semihosting.Debug.print("receive args: {s}\n", .{args});
1616

1717
semihosting.Debug.print("feature support: STDOUT FILE: {any}, EXIT CODE {any}\n", .{
1818
semihosting.Debug.check_extensions(0, 1),

examples/stmicro/stm32/src/stm32f1xx/usb_cdc.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ fn get_descriptor(setup: []const u8, epc: EpControl) void {
228228
}
229229
}
230230

231-
fn set_addr(recive_addr: u7, epc: EpControl) void {
232-
device_addr = recive_addr;
231+
fn set_addr(receive_addr: u7, epc: EpControl) void {
232+
device_addr = receive_addr;
233233
epc.ZLP(.force_data1) catch unreachable;
234234
}
235235

examples/stmicro/stm32/src/stm32f1xx/usb_hid.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ fn get_descriptor(setup: []const u8, epc: EpControl) void {
168168
epc.USB_send(buffer[0..length], .force_data1) catch unreachable;
169169
}
170170

171-
fn set_addr(recive_addr: u7, epc: EpControl) void {
172-
device_addr = recive_addr;
171+
fn set_addr(receive_addr: u7, epc: EpControl) void {
172+
device_addr = receive_addr;
173173
epc.ZLP(.force_data1) catch unreachable;
174174
}
175175

port/stmicro/stm32/src/hals/STM32F103/clocks/clocknodes.zig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub const ClockNodesTypes = union(enum) {
5656
};
5757

5858
pub const ClockError = struct {
59-
recive: f32 = 0,
59+
receive: f32 = 0,
6060
limit: f32 = 0,
6161
node: *const ClockNode,
6262
};
@@ -150,16 +150,16 @@ pub const ClockNode = struct {
150150
const name = get_name_from_error(err);
151151
const error_msg = switch (err) {
152152
.NoParent => "No Parent list!",
153-
.Overflow => |data| comptimePrint("Overflow | Recive: {d} max: {d}", .{ data.recive, data.limit }),
154-
.Underflow => |data| comptimePrint("Underflow | Recive: {d} min: {d}", .{ data.recive, data.limit }),
153+
.Overflow => |data| comptimePrint("Overflow | Received: {d} max: {d}", .{ data.receive, data.limit }),
154+
.Underflow => |data| comptimePrint("Underflow | Received: {d} min: {d}", .{ data.receive, data.limit }),
155155
else => unreachable,
156156
};
157157
const main_msg = comptimePrint("Error on node {s} => {s}\n", .{ name, error_msg });
158158
switch (err) {
159159
.NoParent => @compileError(main_msg),
160160
.Overflow, .Underflow => |node| {
161161
const parent = get_parent(node.node) orelse unreachable;
162-
const tree = comptimePrint("TREE TRACE: {s} -> {s}: {d} <- ERROR\n\n", .{ print_tree(parent), node.node.name, node.recive });
162+
const tree = comptimePrint("TREE TRACE: {s} -> {s}: {d} <- ERROR\n\n", .{ print_tree(parent), node.node.name, node.receive });
163163
@compileError(comptimePrint("{s}{s}", .{ main_msg, tree }));
164164
},
165165
else => unreachable,
@@ -213,15 +213,15 @@ pub const ClockNode = struct {
213213
.Overflow = .{
214214
.node = self,
215215
.limit = limit.max,
216-
.recive = value,
216+
.receive = value,
217217
},
218218
};
219219
} else if (value < limit.min) {
220220
return .{
221221
.Underflow = .{
222222
.node = self,
223223
.limit = limit.min,
224-
.recive = value,
224+
.receive = value,
225225
},
226226
};
227227
}

port/stmicro/stm32/src/hals/STM32F103/rcc.zig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ var corrent_clocks: ClockOutputs = validate_clocks(.{});
107107

108108
//NOTE: procedural style or loop through all elements of the struct?
109109
/// Configures the system clocks
110-
/// NOTE: to configure the backup domain clocks (RTC) it is necessary to enable it through the power register before configuring the clocks
110+
/// NOTE: to configure the backup domain clocks (RTC) it is necessary to enable it through the power
111+
/// register before configuring the clocks
111112
pub fn clock_init(comptime config: ClockTree.Config) ClockInitError!void {
112113
const clck = comptime validate_clocks(config);
113114

0 commit comments

Comments
 (0)