Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion examples/nordic/nrf5x/src/i2c_accel.zig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ pub fn main() !void {
uart.apply(.{
.tx_pin = board.uart_tx,
.rx_pin = board.uart_rx,
.baud_rate = .@"115200",
});

nrf.uart.init_logger(uart);
Expand Down
1 change: 0 additions & 1 deletion examples/nordic/nrf5x/src/i2c_bus_scan.zig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ pub fn main() !void {
uart.apply(.{
.tx_pin = board.uart_tx,
.rx_pin = board.uart_rx,
.baud_rate = .@"115200",
});

nrf.uart.init_logger(uart);
Expand Down
1 change: 0 additions & 1 deletion examples/nordic/nrf5x/src/i2c_hall_effect.zig
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub fn main() !void {
uart.apply(.{
.tx_pin = board.uart_tx,
.rx_pin = board.uart_rx,
.baud_rate = .@"115200",
});

nrf.uart.init_logger(uart);
Expand Down
1 change: 0 additions & 1 deletion examples/nordic/nrf5x/src/i2c_temp.zig
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pub fn main() !void {
uart.apply(.{
.tx_pin = board.uart_tx,
.rx_pin = board.uart_rx,
.baud_rate = .@"115200",
});

nrf.uart.init_logger(uart);
Expand Down
1 change: 0 additions & 1 deletion examples/nordic/nrf5x/src/spi_master.zig
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ pub fn main() !void {
uart.apply(.{
.tx_pin = board.uart_tx,
.rx_pin = board.uart_rx,
.baud_rate = .@"115200",
});

nrf.uart.init_logger(uart);
Expand Down
5 changes: 0 additions & 5 deletions examples/nordic/nrf5x/src/uart.zig
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ pub fn main() !void {
uart.apply(.{
.tx_pin = board.uart_tx,
.rx_pin = board.uart_rx,
// .control_flow = .{
// .cts_pin = board.uart_cts,
// .rts_pin = board.uart_rts,
// },
.baud_rate = .@"115200",
});

nrf.uart.init_logger(uart);
Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/adc.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const adc = rp2xxx.adc;
const time = rp2xxx.time;

const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = gpio.num(0);

pub const microzig_options = microzig.Options{
Expand All @@ -19,7 +18,6 @@ pub fn main() !void {
// init uart logging
uart_tx_pin.set_function(.uart);
uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});
rp2xxx.uart.init_logger(uart);
Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/cyw43.zig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const drivers = microzig.hal.drivers;
const CYW43_Pio_Device = drivers.CYW43_Pio_Device;

const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = gpio.num(0);

pub const microzig_options = microzig.Options{
Expand All @@ -24,7 +23,6 @@ pub fn main() !void {
// init uart logging
uart_tx_pin.set_function(.uart);
uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});
rp2xxx.uart.init_logger(uart);
Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/dma.zig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const gpio = rp2xxx.gpio;
const dma = rp2xxx.dma;

const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = gpio.num(0);

const hello: []const u8 = "Hello, world! (from DMA)";
Expand All @@ -28,7 +27,6 @@ pub fn main() !void {
uart_tx_pin.set_function(.uart);

uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});

Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/i2c_accel.zig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const I2C_Device = rp2xxx.drivers.I2C_Device;
const ICM_20948 = microzig.drivers.sensor.ICM_20948;

const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = gpio.num(0);
const i2c0 = i2c.instance.num(0);

Expand All @@ -25,7 +24,6 @@ pub fn main() !void {
// init uart logging
uart_tx_pin.set_function(.uart);
uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});
rp2xxx.uart.init_logger(uart);
Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/i2c_bus_scan.zig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const i2c = rp2xxx.i2c;
const gpio = rp2xxx.gpio;

const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = gpio.num(0);

pub const microzig_options = microzig.Options{
Expand All @@ -21,7 +20,6 @@ pub fn main() !void {
// init uart logging
uart_tx_pin.set_function(.uart);
uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});
rp2xxx.uart.init_logger(uart);
Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/interrupts.zig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const interrupt = microzig.cpu.interrupt;

const led = rp2xxx.gpio.num(25);
const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = rp2xxx.gpio.num(0);

const chip = rp2xxx.compatibility.chip;
Expand Down Expand Up @@ -53,7 +52,6 @@ pub fn main() !void {
// init uart logging
uart_tx_pin.set_function(.uart);
uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});
rp2xxx.uart.init_logger(uart);
Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/mlx90640.zig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const MLX90640 = sensor.MLX90640;
const time = rp2xxx.time;

const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = gpio.num(0);

var i2c0 = i2c.instance.num(0);
Expand Down Expand Up @@ -71,7 +70,6 @@ pub fn main() !void {
fn init() !void {
uart_tx_pin.set_function(.uart);
uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});

Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/rp2040_only/flash_id.zig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const gpio = rp2xxx.gpio;
const flash = rp2xxx.flash;

const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = gpio.num(0);

pub fn panic(message: []const u8, _: ?*std.builtin.StackTrace, _: ?usize) noreturn {
Expand All @@ -25,7 +24,6 @@ pub fn main() !void {
// init uart logging
uart_tx_pin.set_function(.uart);
uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});
rp2xxx.uart.init_logger(uart);
Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/rp2040_only/flash_program.zig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const clocks = rp2xxx.clocks;

const led = gpio.num(25);
const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = gpio.num(0);

const flash_target_offset: u32 = 256 * 1024;
Expand All @@ -30,7 +29,6 @@ pub fn main() !void {
// init uart logging
uart_tx_pin.set_function(.uart);
uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});
rp2xxx.uart.init_logger(uart);
Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/rp2040_only/i2c_slave.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const i2c = rp2xxx.i2c;
const time = rp2xxx.time;

const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = gpio.num(0);

const pin_config = rp2xxx.pins.GlobalConfiguration{
Expand Down Expand Up @@ -35,7 +34,6 @@ pub fn main() !void {
// init uart logging
uart_tx_pin.set_function(.uart);
uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});
rp2xxx.uart.init_logger(uart);
Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/rp2040_only/random.zig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const rand = rp2xxx.rand;

const led = gpio.num(25);
const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = gpio.num(0);

pub fn panic(message: []const u8, _: ?*std.builtin.StackTrace, _: ?usize) noreturn {
Expand All @@ -29,7 +28,6 @@ pub fn main() !void {
// init uart logging
uart_tx_pin.set_function(.uart);
uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});
rp2xxx.uart.init_logger(uart);
Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/rp2040_only/usb_hid.zig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const usb = rp2xxx.usb;

const led = gpio.num(25);
const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = gpio.num(0);

const usb_dev = rp2xxx.usb.Usb(.{});
Expand Down Expand Up @@ -68,7 +67,6 @@ pub fn main() !void {
// init uart logging
uart_tx_pin.set_function(.uart);
uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});
rp2xxx.uart.init_logger(uart);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const pin_config = hal.pins.GlobalConfiguration{
};

const pins = pin_config.pins();
const baud_rate = 115200;

pub const microzig_options = microzig.Options{
.log_level = .debug,
Expand All @@ -31,7 +30,6 @@ pub fn main() !void {
pin_config.apply();

uart0.apply(.{
.baud_rate = baud_rate,
.clock_config = hal.clock_config,
});

Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/rp2350_only/random_data.zig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const pin_config = hal.pins.GlobalConfiguration{
};

const pins = pin_config.pins();
const baud_rate = 115200;

pub const microzig_options = microzig.Options{
.log_level = .debug,
Expand All @@ -27,7 +26,6 @@ pub fn main() !void {
pin_config.apply();

uart0.apply(.{
.baud_rate = baud_rate,
.clock_config = hal.clock_config,
});

Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/spi_loopback_dma.zig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const gpio = rp2xxx.gpio;
const dma = rp2xxx.dma;

const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = gpio.num(0);

const BUF_LEN = 0x100;
Expand All @@ -22,7 +21,6 @@ pub fn main() !void {
uart_tx_pin.set_function(.uart);

uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});

Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/spi_slave.zig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const gpio = rp2xxx.gpio;
const chip = rp2xxx.compatibility.chip;

const uart = rp2xxx.uart.instance.num(0);
const uart_baud_rate = 115200;
const uart_tx_pin = gpio.num(0);

pub const microzig_options = microzig.Options{
Expand Down Expand Up @@ -37,7 +36,6 @@ pub fn main() !void {

uart_tx_pin.set_function(.uart);
uart.apply(.{
.baud_rate = uart_baud_rate,
.clock_config = rp2xxx.clock_config,
});

Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/stepper_driver.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const GPIO_Device = rp2xxx.drivers.GPIO_Device;
const A4988 = microzig.drivers.stepper.A4988;

const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = gpio.num(0);

pub fn panic(message: []const u8, _: ?*std.builtin.StackTrace, _: ?usize) noreturn {
Expand All @@ -25,7 +24,6 @@ pub fn main() !void {
// init uart logging
uart_tx_pin.set_function(.uart);
uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});
rp2xxx.uart.init_logger(uart);
Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/stepper_driver_dumb.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const GPIO_Device = rp2xxx.drivers.GPIO_Device;
const ULN2003 = microzig.drivers.stepper.ULN2003;

const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = gpio.num(0);

pub fn panic(message: []const u8, _: ?*std.builtin.StackTrace, _: ?usize) noreturn {
Expand All @@ -25,7 +24,6 @@ pub fn main() !void {
// init uart logging
uart_tx_pin.set_function(.uart);
uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});
rp2xxx.uart.init_logger(uart);
Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/uart_echo.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const clocks = rp2xxx.clocks;

const led = gpio.num(25);
const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = gpio.num(0);
const uart_rx_pin = gpio.num(1);

Expand All @@ -21,7 +20,6 @@ pub fn main() !void {
}

uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});

Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/uart_log.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const gpio = rp2xxx.gpio;

const led = gpio.num(25);
const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = gpio.num(0);

pub fn panic(message: []const u8, _: ?*std.builtin.StackTrace, _: ?usize) noreturn {
Expand All @@ -28,7 +27,6 @@ pub fn main() !void {
uart_tx_pin.set_function(.uart);

uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});

Expand Down
2 changes: 0 additions & 2 deletions examples/raspberrypi/rp2xxx/src/usb_cdc.zig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const usb = rp2xxx.usb;

const led = gpio.num(25);
const uart = rp2xxx.uart.instance.num(0);
const baud_rate = 115200;
const uart_tx_pin = gpio.num(0);
const uart_rx_pin = gpio.num(1);

Expand Down Expand Up @@ -72,7 +71,6 @@ pub fn main() !void {
}

uart.apply(.{
.baud_rate = baud_rate,
.clock_config = rp2xxx.clock_config,
});

Expand Down
1 change: 0 additions & 1 deletion examples/stmicro/stm32/src/stm32f1xx/adc.zig
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ pub fn main() !void {
ADC_pin2.set_input_mode(.analog);

try uart.apply_runtime(.{
.baud_rate = 115200,
.clock_speed = rcc.get_clock(.USART1),
});

Expand Down
Loading
Loading