Code covered by the BSD License  

Highlights from
MPC555 Motor Control Function Blockset

MPC555 Motor Control Function Blockset

by

 

20 Mar 2006 (Updated )

Additional I/O blocks for MPC555 target - specifically targetting TPU functionality

mpc555_mtrctrl_ucoderoot(src_or_assembler)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function output = mpc555_mtrctrl_ucoderoot(src_or_assembler)
%
% This function returns the path to where the Motorola microcode source
% files are being stored or the path where the Motorola microcode
% assembler is being stored
%
function output = mpc555_mtrctrl_ucoderoot(src_or_assembler)

% Get the filename of this function
thisFile = mfilename('fullpath');
% Split it into parts
[thisPath,thisName] = fileparts(thisFile);
[thisPath,thisName] = fileparts(thisPath);
[thisPath,thisName] = fileparts(thisPath);

switch lower(src_or_assembler)
    case 'src'
        % Return the source directory
        output = [thisPath, filesep, 'microcode', filesep, 'src'];
    case 'tpumasm'
        % Return the assembler directory
        output = [thisPath, filesep, 'microcode', filesep, 'assembler'];
    otherwise
        error('Invalid choice - valid choices are ''src'' or ''tpumasm''');
end

end

Contact us