1 /*******************************************************************
2 Components for embedded applications builded for
3 laboratory and medical instruments firmware
5 pxmcc_rocon.h - multi axis motion controller coprocessor
6 RoCoN specific extensions
8 (C) 2001-2014 by Pavel Pisa pisa@cmp.felk.cvut.cz
9 (C) 2002-2014 by PiKRON Ltd. http://www.pikron.com
11 This file can be used and copied according to next
13 - GPL - GNU Public License
14 - other license provided by project originators
16 *******************************************************************/
24 typedef struct pxmc_rocon_state_t {
26 uint32_t steps_pos_prev;
27 uint32_t cur_d_cum_prev;
28 uint32_t cur_q_cum_prev;
29 int32_t cur_d_err_sum;
30 int32_t cur_q_err_sum;
38 #define pxmc_rocon_state_offs(_fld) \
39 (((size_t)&((pxmc_rocon_state_t *)0L)->_fld) - \
40 ((size_t)&((pxmc_rocon_state_t *)0L)->base))
42 extern int pxmc_rocon_vin_act;
43 extern unsigned pxmc_rocon_lxpwr_chips;
45 int pxmc_rocon_pwm_direct_wr(unsigned chan, unsigned pwm, int en);
47 #endif /*_APPL_PXMC_H_*/