Hardware manual

54
Another improvement is that we decided to create one standard for all compilations. In other
words, now always when we compile PXMC we get two libraries:
pxmc
pxmcbsp
C functions described in
point 5.3. Second library (PXMC Board Support) has our functions, which can be hardware
dependent and/or others functions which shouldn't be a part of standard PXMC library. Of
course to get right board support library, during compilation we need to set up mentioned
above CONFIG_PXMC_VARIANT variable properly.
After doing all above steps, we can very easily link both these libraries with any application just
by typing in Makefile.omk the following line:
program_name_LIBS = pxmcbsp pxmc ...
Where the program_name should be changed to the real name of the program which we

6.3. Changes in PXMC original code.
Working with Michal Sojka, we provided two small changes to original code of PXMC. First
change concerns pxms_struct. Namely we added here one field:
short pxms_hal; /* last value read from HALL sensors */
This field has two basic aims. Firstly, it is very useful during de
need first to set PXMS_PTI_b and later PXMS_PHA_b flags. Secondly, it can have some useful
meaning to keep the actual value of a hall sensor.
Second change concerns error flags. Here we added two error flags:
PXMS_E_HAL
PXMS_E_POWER_STA GE
Because these two flags were already described in subsection 5.3.2 I'll not describe them here.