v2.0.0
cyw43_driver.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Raspberry Pi (Trading) Ltd.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef _PICO_CYW43_DRIVER_H
8#define _PICO_CYW43_DRIVER_H
9
17#include "pico.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23struct async_context;
24
33bool cyw43_driver_init(struct async_context *context);
34
40void cyw43_driver_deinit(struct async_context *context);
41
42// PICO_CONFIG: CYW43_PIO_CLOCK_DIV_DYNAMIC, Enable runtime configuration of the clock divider for communication with the wireless chip, type=bool, default=0, group=pico_cyw43_driver
43#ifndef CYW43_PIO_CLOCK_DIV_DYNAMIC
44#define CYW43_PIO_CLOCK_DIV_DYNAMIC 0
45#endif
46
47// PICO_CONFIG: CYW43_PIO_CLOCK_DIV_INT, Integer part of the clock divider for communication with the wireless chip, type=bool, default=2, group=pico_cyw43_driver
48#ifndef CYW43_PIO_CLOCK_DIV_INT
49// backwards compatibility using old define
50#ifdef CYW43_PIO_CLOCK_DIV
51#define CYW43_PIO_CLOCK_DIV_INT CYW43_PIO_CLOCK_DIV
52#else
53#define CYW43_PIO_CLOCK_DIV_INT 2
54#endif
55#endif
56
57// PICO_CONFIG: CYW43_PIO_CLOCK_DIV_FRAC, Fractional part of the clock divider for communication with the wireless chip, type=bool, default=0, group=pico_cyw43_driver
58#ifndef CYW43_PIO_CLOCK_DIV_FRAC
59#define CYW43_PIO_CLOCK_DIV_FRAC 0
60#endif
61
62#if CYW43_PIO_CLOCK_DIV_DYNAMIC
63void cyw43_set_pio_clock_divisor(uint16_t clock_div_int, uint8_t clock_div_frac);
64#endif
65
66#ifdef __cplusplus
67}
68#endif
69#endif
cyw43_driver_init
bool cyw43_driver_init(struct async_context *context)
Initializes the lower level cyw43_driver and integrates it with the provided async_context.
Definition: cyw43_driver.c:106
cyw43_driver_deinit
void cyw43_driver_deinit(struct async_context *context)
De-initialize the lowever level cyw43_driver and unhooks it from the async_context.
Definition: cyw43_driver.c:116
pico.h
async_context
Base structure type of all async_contexts. For details about its use, see pico_async_context.
Definition: async_context.h:179