Skip to content

Commit 543efe8

Browse files
added PWM set function
1 parent 97e2090 commit 543efe8

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

cores/asr650x/cores/ASR_Arduino.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,20 @@ typedef enum
4747
CHANGE=3
4848
}IrqModes;
4949

50+
typedef enum {
51+
PWM_CLK_FREQ_48M = 1,
52+
PWM_CLK_FREQ_24M = 2,
53+
PWM_CLK_FREQ_16M = 3,
54+
PWM_CLK_FREQ_12M = 4,
55+
PWM_CLK_FREQ_8M = 5,
56+
PWM_CLK_FREQ_6M = 7,
57+
PWM_CLK_FREQ_4M = 11,
58+
PWM_CLK_FREQ_3M = 15,
59+
PWM_CLK_FREQ_2M = 23,
60+
PWM_CLK_FREQ_1M = 47
61+
} clock_pwm_t;
62+
63+
5064
#define DRIVE_MODE_BITS (3)
5165
#define DRIVE_MODE_IND_MASK (0xFFFFFFFFu >> (32 - DRIVE_MODE_BITS))
5266

@@ -70,6 +84,10 @@ uint32_t millis(void);
7084
uint32_t micros(void);
7185
uint64_t getID(void);
7286
int cubecell_random(int r);
87+
void setPWM_Frequency(clock_pwm_t freq);
88+
void setPWM_ComparePeriod(uint16_t period);
89+
90+
7391
#ifdef __cplusplus
7492
}
7593
#endif

cores/asr650x/projects/CubeCellLib.a

1.54 KB
Binary file not shown.

0 commit comments

Comments
 (0)