2020-07-01 23:44:57 +08:00
|
|
|
/*
|
2021-03-21 22:23:24 +08:00
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
2020-07-01 23:44:57 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2020-06-27 AHTYDHD the first version
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __DRV_PWM_H__
|
|
|
|
#define __DRV_PWM_H__
|
2020-06-24 19:54:42 +08:00
|
|
|
|
2021-09-11 18:09:22 +08:00
|
|
|
#include <stdint.h>
|
2020-06-24 19:54:42 +08:00
|
|
|
#include<rtdevice.h>
|
|
|
|
#include<rthw.h>
|
|
|
|
|
|
|
|
struct tm4c123_pwm
|
|
|
|
{
|
2020-07-01 23:44:57 +08:00
|
|
|
struct tm4c123_pwm_config *config;
|
|
|
|
struct rt_device_pwm pwm_device;
|
2020-06-24 19:54:42 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/* tm4c123 config class */
|
|
|
|
struct tm4c123_pwm_config
|
|
|
|
{
|
2020-07-01 23:44:57 +08:00
|
|
|
rt_uint8_t channel;
|
|
|
|
char *name;
|
|
|
|
uint32_t counterMode;
|
|
|
|
uint32_t syncMode;
|
2020-06-24 19:54:42 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
int rt_hw_pwm_init(void);
|
|
|
|
|
2020-07-01 23:44:57 +08:00
|
|
|
#endif /*__DRV_PWM_H__*/
|
2020-06-24 19:54:42 +08:00
|
|
|
|
2021-03-21 22:23:24 +08:00
|
|
|
/************************** end of file ******************/
|